Repository: FeiLiu36/EoH Branch: main Commit: bc1d8810fd72 Files: 1808 Total size: 149.2 MB Directory structure: gitextract_juykhq9w/ ├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── README_CN.md ├── baseline/ │ └── funsearch/ │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── bin_packing/ │ │ └── bin_packing_funsearch.ipynb │ ├── bin_packing_utils.py │ ├── funsearch_bin_packing_llm_api.py │ ├── funsearch_bin_packing_local_llm.py │ ├── implementation/ │ │ ├── code_manipulation.py │ │ ├── config.py │ │ ├── evaluator.py │ │ ├── evaluator_accelerate.py │ │ ├── funsearch.py │ │ ├── profile.py │ │ ├── programs_database.py │ │ └── sampler.py │ ├── llm-server/ │ │ ├── llm_server.py │ │ └── request.py │ └── requiremetns.txt ├── docs/ │ ├── QuickGuide.md │ └── Results/ │ ├── Ablation_EoH_CoevolutionThoughts&Codes/ │ │ ├── C2C/ │ │ │ ├── Run1/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_21.json │ │ │ │ ├── population_generation_22.json │ │ │ │ ├── population_generation_23.json │ │ │ │ ├── population_generation_24.json │ │ │ │ ├── population_generation_25.json │ │ │ │ ├── population_generation_26.json │ │ │ │ ├── population_generation_27.json │ │ │ │ ├── population_generation_28.json │ │ │ │ ├── population_generation_29.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_30.json │ │ │ │ ├── population_generation_31.json │ │ │ │ ├── population_generation_32.json │ │ │ │ ├── population_generation_33.json │ │ │ │ ├── population_generation_34.json │ │ │ │ ├── population_generation_35.json │ │ │ │ ├── population_generation_36.json │ │ │ │ ├── population_generation_37.json │ │ │ │ ├── population_generation_38.json │ │ │ │ ├── population_generation_39.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_40.json │ │ │ │ ├── population_generation_41.json │ │ │ │ ├── population_generation_42.json │ │ │ │ ├── population_generation_43.json │ │ │ │ ├── population_generation_44.json │ │ │ │ ├── population_generation_45.json │ │ │ │ ├── population_generation_46.json │ │ │ │ ├── population_generation_47.json │ │ │ │ ├── population_generation_48.json │ │ │ │ ├── population_generation_49.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_50.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ ├── Run2/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_21.json │ │ │ │ ├── population_generation_22.json │ │ │ │ ├── population_generation_23.json │ │ │ │ ├── population_generation_24.json │ │ │ │ ├── population_generation_25.json │ │ │ │ ├── population_generation_26.json │ │ │ │ ├── population_generation_27.json │ │ │ │ ├── population_generation_28.json │ │ │ │ ├── population_generation_29.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_30.json │ │ │ │ ├── population_generation_31.json │ │ │ │ ├── population_generation_32.json │ │ │ │ ├── population_generation_33.json │ │ │ │ ├── population_generation_34.json │ │ │ │ ├── population_generation_35.json │ │ │ │ ├── population_generation_36.json │ │ │ │ ├── population_generation_37.json │ │ │ │ ├── population_generation_38.json │ │ │ │ ├── population_generation_39.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_40.json │ │ │ │ ├── population_generation_41.json │ │ │ │ ├── population_generation_42.json │ │ │ │ ├── population_generation_43.json │ │ │ │ ├── population_generation_44.json │ │ │ │ ├── population_generation_45.json │ │ │ │ ├── population_generation_46.json │ │ │ │ ├── population_generation_47.json │ │ │ │ ├── population_generation_48.json │ │ │ │ ├── population_generation_49.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_50.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ └── Run3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_26.json │ │ │ ├── population_generation_27.json │ │ │ ├── population_generation_28.json │ │ │ ├── population_generation_29.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_30.json │ │ │ ├── population_generation_31.json │ │ │ ├── population_generation_32.json │ │ │ ├── population_generation_33.json │ │ │ ├── population_generation_34.json │ │ │ ├── population_generation_35.json │ │ │ ├── population_generation_36.json │ │ │ ├── population_generation_37.json │ │ │ ├── population_generation_38.json │ │ │ ├── population_generation_39.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_40.json │ │ │ ├── population_generation_41.json │ │ │ ├── population_generation_42.json │ │ │ ├── population_generation_43.json │ │ │ ├── population_generation_44.json │ │ │ ├── population_generation_45.json │ │ │ ├── population_generation_46.json │ │ │ ├── population_generation_47.json │ │ │ ├── population_generation_48.json │ │ │ ├── population_generation_49.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_50.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── T&C2T2C/ │ │ │ ├── Run1/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_21.json │ │ │ │ ├── population_generation_22.json │ │ │ │ ├── population_generation_23.json │ │ │ │ ├── population_generation_24.json │ │ │ │ ├── population_generation_25.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ ├── Run2/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_21.json │ │ │ │ ├── population_generation_22.json │ │ │ │ ├── population_generation_23.json │ │ │ │ ├── population_generation_24.json │ │ │ │ ├── population_generation_25.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ └── Run3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ └── T2T2C/ │ │ ├── Run1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── Run2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ └── Run3/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_11.json │ │ ├── population_generation_12.json │ │ ├── population_generation_13.json │ │ ├── population_generation_14.json │ │ ├── population_generation_15.json │ │ ├── population_generation_16.json │ │ ├── population_generation_17.json │ │ ├── population_generation_18.json │ │ ├── population_generation_19.json │ │ ├── population_generation_2.json │ │ ├── population_generation_20.json │ │ ├── population_generation_21.json │ │ ├── population_generation_22.json │ │ ├── population_generation_23.json │ │ ├── population_generation_24.json │ │ ├── population_generation_25.json │ │ ├── population_generation_3.json │ │ ├── population_generation_4.json │ │ ├── population_generation_5.json │ │ ├── population_generation_6.json │ │ ├── population_generation_7.json │ │ ├── population_generation_8.json │ │ └── population_generation_9.json │ ├── Ablation_EoH_Dynamic/ │ │ ├── Run1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── Run2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ └── Run3/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_11.json │ │ ├── population_generation_12.json │ │ ├── population_generation_13.json │ │ ├── population_generation_14.json │ │ ├── population_generation_15.json │ │ ├── population_generation_16.json │ │ ├── population_generation_17.json │ │ ├── population_generation_18.json │ │ ├── population_generation_19.json │ │ ├── population_generation_2.json │ │ ├── population_generation_20.json │ │ ├── population_generation_3.json │ │ ├── population_generation_4.json │ │ ├── population_generation_5.json │ │ ├── population_generation_6.json │ │ ├── population_generation_7.json │ │ ├── population_generation_8.json │ │ └── population_generation_9.json │ ├── Ablation_EoH_LLMs/ │ │ ├── CodeLlama34B/ │ │ │ ├── Run1/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ ├── Run2/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ └── Run3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── Gemini/ │ │ │ ├── Run1/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ ├── Run2/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ └── Run3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── TC2T2Cgemini+codellama34b/ │ │ │ ├── Run1/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_21.json │ │ │ │ ├── population_generation_22.json │ │ │ │ ├── population_generation_23.json │ │ │ │ ├── population_generation_24.json │ │ │ │ ├── population_generation_25.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ ├── Run2/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_21.json │ │ │ │ ├── population_generation_22.json │ │ │ │ ├── population_generation_23.json │ │ │ │ ├── population_generation_24.json │ │ │ │ ├── population_generation_25.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ └── Run3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── TC2T2Cgemini+codellama7b/ │ │ │ ├── Run1/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_21.json │ │ │ │ ├── population_generation_22.json │ │ │ │ ├── population_generation_23.json │ │ │ │ ├── population_generation_24.json │ │ │ │ ├── population_generation_25.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ ├── Run2/ │ │ │ │ ├── population_generation_0.json │ │ │ │ ├── population_generation_1.json │ │ │ │ ├── population_generation_10.json │ │ │ │ ├── population_generation_11.json │ │ │ │ ├── population_generation_12.json │ │ │ │ ├── population_generation_13.json │ │ │ │ ├── population_generation_14.json │ │ │ │ ├── population_generation_15.json │ │ │ │ ├── population_generation_16.json │ │ │ │ ├── population_generation_17.json │ │ │ │ ├── population_generation_18.json │ │ │ │ ├── population_generation_19.json │ │ │ │ ├── population_generation_2.json │ │ │ │ ├── population_generation_20.json │ │ │ │ ├── population_generation_21.json │ │ │ │ ├── population_generation_22.json │ │ │ │ ├── population_generation_23.json │ │ │ │ ├── population_generation_24.json │ │ │ │ ├── population_generation_25.json │ │ │ │ ├── population_generation_3.json │ │ │ │ ├── population_generation_4.json │ │ │ │ ├── population_generation_5.json │ │ │ │ ├── population_generation_6.json │ │ │ │ ├── population_generation_7.json │ │ │ │ ├── population_generation_8.json │ │ │ │ └── population_generation_9.json │ │ │ └── Run3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ └── TC2T2Cgemini+gemini/ │ │ ├── Run1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── Run2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ └── Run3/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_11.json │ │ ├── population_generation_12.json │ │ ├── population_generation_13.json │ │ ├── population_generation_14.json │ │ ├── population_generation_15.json │ │ ├── population_generation_16.json │ │ ├── population_generation_17.json │ │ ├── population_generation_18.json │ │ ├── population_generation_19.json │ │ ├── population_generation_2.json │ │ ├── population_generation_20.json │ │ ├── population_generation_21.json │ │ ├── population_generation_22.json │ │ ├── population_generation_23.json │ │ ├── population_generation_24.json │ │ ├── population_generation_25.json │ │ ├── population_generation_3.json │ │ ├── population_generation_4.json │ │ ├── population_generation_5.json │ │ ├── population_generation_6.json │ │ ├── population_generation_7.json │ │ ├── population_generation_8.json │ │ └── population_generation_9.json │ ├── Ablation_EoH_PopSize/ │ │ ├── 10run1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_26.json │ │ │ ├── population_generation_27.json │ │ │ ├── population_generation_28.json │ │ │ ├── population_generation_29.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_30.json │ │ │ ├── population_generation_31.json │ │ │ ├── population_generation_32.json │ │ │ ├── population_generation_33.json │ │ │ ├── population_generation_34.json │ │ │ ├── population_generation_35.json │ │ │ ├── population_generation_36.json │ │ │ ├── population_generation_37.json │ │ │ ├── population_generation_38.json │ │ │ ├── population_generation_39.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_40.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── 10run2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_26.json │ │ │ ├── population_generation_27.json │ │ │ ├── population_generation_28.json │ │ │ ├── population_generation_29.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_30.json │ │ │ ├── population_generation_31.json │ │ │ ├── population_generation_32.json │ │ │ ├── population_generation_33.json │ │ │ ├── population_generation_34.json │ │ │ ├── population_generation_35.json │ │ │ ├── population_generation_36.json │ │ │ ├── population_generation_37.json │ │ │ ├── population_generation_38.json │ │ │ ├── population_generation_39.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_40.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── 10run3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_26.json │ │ │ ├── population_generation_27.json │ │ │ ├── population_generation_28.json │ │ │ ├── population_generation_29.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_30.json │ │ │ ├── population_generation_31.json │ │ │ ├── population_generation_32.json │ │ │ ├── population_generation_33.json │ │ │ ├── population_generation_34.json │ │ │ ├── population_generation_35.json │ │ │ ├── population_generation_36.json │ │ │ ├── population_generation_37.json │ │ │ ├── population_generation_38.json │ │ │ ├── population_generation_39.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_40.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── 20run1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── 20run2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── 20run3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── 5run1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_26.json │ │ │ ├── population_generation_27.json │ │ │ ├── population_generation_28.json │ │ │ ├── population_generation_29.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_30.json │ │ │ ├── population_generation_31.json │ │ │ ├── population_generation_32.json │ │ │ ├── population_generation_33.json │ │ │ ├── population_generation_34.json │ │ │ ├── population_generation_35.json │ │ │ ├── population_generation_36.json │ │ │ ├── population_generation_37.json │ │ │ ├── population_generation_38.json │ │ │ ├── population_generation_39.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_40.json │ │ │ ├── population_generation_41.json │ │ │ ├── population_generation_42.json │ │ │ ├── population_generation_43.json │ │ │ ├── population_generation_44.json │ │ │ ├── population_generation_45.json │ │ │ ├── population_generation_46.json │ │ │ ├── population_generation_47.json │ │ │ ├── population_generation_48.json │ │ │ ├── population_generation_49.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_50.json │ │ │ ├── population_generation_51.json │ │ │ ├── population_generation_52.json │ │ │ ├── population_generation_53.json │ │ │ ├── population_generation_54.json │ │ │ ├── population_generation_55.json │ │ │ ├── population_generation_56.json │ │ │ ├── population_generation_57.json │ │ │ ├── population_generation_58.json │ │ │ ├── population_generation_59.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_60.json │ │ │ ├── population_generation_61.json │ │ │ ├── population_generation_62.json │ │ │ ├── population_generation_63.json │ │ │ ├── population_generation_64.json │ │ │ ├── population_generation_65.json │ │ │ ├── population_generation_66.json │ │ │ ├── population_generation_67.json │ │ │ ├── population_generation_68.json │ │ │ ├── population_generation_69.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_70.json │ │ │ ├── population_generation_71.json │ │ │ ├── population_generation_72.json │ │ │ ├── population_generation_73.json │ │ │ ├── population_generation_74.json │ │ │ ├── population_generation_75.json │ │ │ ├── population_generation_76.json │ │ │ ├── population_generation_77.json │ │ │ ├── population_generation_78.json │ │ │ ├── population_generation_79.json │ │ │ ├── population_generation_8.json │ │ │ ├── population_generation_80.json │ │ │ └── population_generation_9.json │ │ ├── 5run2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_21.json │ │ │ ├── population_generation_22.json │ │ │ ├── population_generation_23.json │ │ │ ├── population_generation_24.json │ │ │ ├── population_generation_25.json │ │ │ ├── population_generation_26.json │ │ │ ├── population_generation_27.json │ │ │ ├── population_generation_28.json │ │ │ ├── population_generation_29.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_30.json │ │ │ ├── population_generation_31.json │ │ │ ├── population_generation_32.json │ │ │ ├── population_generation_33.json │ │ │ ├── population_generation_34.json │ │ │ ├── population_generation_35.json │ │ │ ├── population_generation_36.json │ │ │ ├── population_generation_37.json │ │ │ ├── population_generation_38.json │ │ │ ├── population_generation_39.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_40.json │ │ │ ├── population_generation_41.json │ │ │ ├── population_generation_42.json │ │ │ ├── population_generation_43.json │ │ │ ├── population_generation_44.json │ │ │ ├── population_generation_45.json │ │ │ ├── population_generation_46.json │ │ │ ├── population_generation_47.json │ │ │ ├── population_generation_48.json │ │ │ ├── population_generation_49.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_50.json │ │ │ ├── population_generation_51.json │ │ │ ├── population_generation_52.json │ │ │ ├── population_generation_53.json │ │ │ ├── population_generation_54.json │ │ │ ├── population_generation_55.json │ │ │ ├── population_generation_56.json │ │ │ ├── population_generation_57.json │ │ │ ├── population_generation_58.json │ │ │ ├── population_generation_59.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_60.json │ │ │ ├── population_generation_61.json │ │ │ ├── population_generation_62.json │ │ │ ├── population_generation_63.json │ │ │ ├── population_generation_64.json │ │ │ ├── population_generation_65.json │ │ │ ├── population_generation_66.json │ │ │ ├── population_generation_67.json │ │ │ ├── population_generation_68.json │ │ │ ├── population_generation_69.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_70.json │ │ │ ├── population_generation_71.json │ │ │ ├── population_generation_72.json │ │ │ ├── population_generation_73.json │ │ │ ├── population_generation_74.json │ │ │ ├── population_generation_75.json │ │ │ ├── population_generation_76.json │ │ │ ├── population_generation_77.json │ │ │ ├── population_generation_78.json │ │ │ ├── population_generation_79.json │ │ │ ├── population_generation_8.json │ │ │ ├── population_generation_80.json │ │ │ └── population_generation_9.json │ │ └── 5run3/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_11.json │ │ ├── population_generation_12.json │ │ ├── population_generation_13.json │ │ ├── population_generation_14.json │ │ ├── population_generation_15.json │ │ ├── population_generation_16.json │ │ ├── population_generation_17.json │ │ ├── population_generation_18.json │ │ ├── population_generation_19.json │ │ ├── population_generation_2.json │ │ ├── population_generation_20.json │ │ ├── population_generation_21.json │ │ ├── population_generation_22.json │ │ ├── population_generation_23.json │ │ ├── population_generation_24.json │ │ ├── population_generation_25.json │ │ ├── population_generation_26.json │ │ ├── population_generation_27.json │ │ ├── population_generation_28.json │ │ ├── population_generation_29.json │ │ ├── population_generation_3.json │ │ ├── population_generation_30.json │ │ ├── population_generation_31.json │ │ ├── population_generation_32.json │ │ ├── population_generation_33.json │ │ ├── population_generation_34.json │ │ ├── population_generation_35.json │ │ ├── population_generation_36.json │ │ ├── population_generation_37.json │ │ ├── population_generation_38.json │ │ ├── population_generation_39.json │ │ ├── population_generation_4.json │ │ ├── population_generation_40.json │ │ ├── population_generation_41.json │ │ ├── population_generation_42.json │ │ ├── population_generation_43.json │ │ ├── population_generation_44.json │ │ ├── population_generation_45.json │ │ ├── population_generation_46.json │ │ ├── population_generation_47.json │ │ ├── population_generation_48.json │ │ ├── population_generation_49.json │ │ ├── population_generation_5.json │ │ ├── population_generation_50.json │ │ ├── population_generation_51.json │ │ ├── population_generation_52.json │ │ ├── population_generation_53.json │ │ ├── population_generation_54.json │ │ ├── population_generation_55.json │ │ ├── population_generation_56.json │ │ ├── population_generation_57.json │ │ ├── population_generation_58.json │ │ ├── population_generation_59.json │ │ ├── population_generation_6.json │ │ ├── population_generation_60.json │ │ ├── population_generation_61.json │ │ ├── population_generation_62.json │ │ ├── population_generation_63.json │ │ ├── population_generation_64.json │ │ ├── population_generation_65.json │ │ ├── population_generation_66.json │ │ ├── population_generation_67.json │ │ ├── population_generation_68.json │ │ ├── population_generation_69.json │ │ ├── population_generation_7.json │ │ ├── population_generation_70.json │ │ ├── population_generation_71.json │ │ ├── population_generation_72.json │ │ ├── population_generation_73.json │ │ ├── population_generation_74.json │ │ ├── population_generation_75.json │ │ ├── population_generation_76.json │ │ ├── population_generation_77.json │ │ ├── population_generation_78.json │ │ ├── population_generation_79.json │ │ ├── population_generation_8.json │ │ ├── population_generation_80.json │ │ └── population_generation_9.json │ ├── Ablation_EoH_SelectionStrategy/ │ │ ├── TSRun1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── TSRun2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── TSRun3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── UniformRun1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── UniformRun2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── UniformRun3/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── WSRun1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── WSRun2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ └── WSRun3/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_11.json │ │ ├── population_generation_12.json │ │ ├── population_generation_13.json │ │ ├── population_generation_14.json │ │ ├── population_generation_15.json │ │ ├── population_generation_16.json │ │ ├── population_generation_17.json │ │ ├── population_generation_18.json │ │ ├── population_generation_19.json │ │ ├── population_generation_2.json │ │ ├── population_generation_20.json │ │ ├── population_generation_3.json │ │ ├── population_generation_4.json │ │ ├── population_generation_5.json │ │ ├── population_generation_6.json │ │ ├── population_generation_7.json │ │ ├── population_generation_8.json │ │ └── population_generation_9.json │ ├── Ablation_EoH_UseExpertHeuristic/ │ │ ├── Run1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── Run2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ └── Run3/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_11.json │ │ ├── population_generation_12.json │ │ ├── population_generation_13.json │ │ ├── population_generation_14.json │ │ ├── population_generation_15.json │ │ ├── population_generation_16.json │ │ ├── population_generation_17.json │ │ ├── population_generation_18.json │ │ ├── population_generation_19.json │ │ ├── population_generation_2.json │ │ ├── population_generation_20.json │ │ ├── population_generation_3.json │ │ ├── population_generation_4.json │ │ ├── population_generation_5.json │ │ ├── population_generation_6.json │ │ ├── population_generation_7.json │ │ ├── population_generation_8.json │ │ └── population_generation_9.json │ ├── Prob1_OnlineBinPacking/ │ │ ├── run1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── run2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_20.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ └── run3/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_11.json │ │ ├── population_generation_12.json │ │ ├── population_generation_13.json │ │ ├── population_generation_14.json │ │ ├── population_generation_15.json │ │ ├── population_generation_16.json │ │ ├── population_generation_17.json │ │ ├── population_generation_18.json │ │ ├── population_generation_19.json │ │ ├── population_generation_2.json │ │ ├── population_generation_20.json │ │ ├── population_generation_3.json │ │ ├── population_generation_4.json │ │ ├── population_generation_5.json │ │ ├── population_generation_6.json │ │ ├── population_generation_7.json │ │ ├── population_generation_8.json │ │ └── population_generation_9.json │ ├── Prob2_TSP_GLS/ │ │ ├── run1/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ ├── run2/ │ │ │ ├── population_generation_0.json │ │ │ ├── population_generation_1.json │ │ │ ├── population_generation_10.json │ │ │ ├── population_generation_11.json │ │ │ ├── population_generation_12.json │ │ │ ├── population_generation_13.json │ │ │ ├── population_generation_14.json │ │ │ ├── population_generation_15.json │ │ │ ├── population_generation_16.json │ │ │ ├── population_generation_17.json │ │ │ ├── population_generation_18.json │ │ │ ├── population_generation_19.json │ │ │ ├── population_generation_2.json │ │ │ ├── population_generation_3.json │ │ │ ├── population_generation_4.json │ │ │ ├── population_generation_5.json │ │ │ ├── population_generation_6.json │ │ │ ├── population_generation_7.json │ │ │ ├── population_generation_8.json │ │ │ └── population_generation_9.json │ │ └── run3/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_11.json │ │ ├── population_generation_12.json │ │ ├── population_generation_13.json │ │ ├── population_generation_14.json │ │ ├── population_generation_15.json │ │ ├── population_generation_16.json │ │ ├── population_generation_17.json │ │ ├── population_generation_18.json │ │ ├── population_generation_19.json │ │ ├── population_generation_2.json │ │ ├── population_generation_3.json │ │ ├── population_generation_4.json │ │ ├── population_generation_5.json │ │ ├── population_generation_6.json │ │ ├── population_generation_7.json │ │ ├── population_generation_8.json │ │ └── population_generation_9.json │ └── Prob3_FSS_PGLS/ │ ├── run1/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_2.json │ │ ├── population_generation_3.json │ │ ├── population_generation_4.json │ │ ├── population_generation_5.json │ │ ├── population_generation_6.json │ │ ├── population_generation_7.json │ │ ├── population_generation_8.json │ │ └── population_generation_9.json │ ├── run2/ │ │ ├── population_generation_0.json │ │ ├── population_generation_1.json │ │ ├── population_generation_10.json │ │ ├── population_generation_2.json │ │ ├── population_generation_3.json │ │ ├── population_generation_4.json │ │ ├── population_generation_5.json │ │ ├── population_generation_6.json │ │ ├── population_generation_7.json │ │ ├── population_generation_8.json │ │ └── population_generation_9.json │ └── run3/ │ ├── population_generation_0.json │ ├── population_generation_1.json │ ├── population_generation_10.json │ ├── population_generation_2.json │ ├── population_generation_3.json │ ├── population_generation_4.json │ ├── population_generation_5.json │ ├── population_generation_6.json │ ├── population_generation_7.json │ ├── population_generation_8.json │ └── population_generation_9.json ├── eoh/ │ ├── setup.py │ └── src/ │ └── eoh/ │ ├── __init__.py │ ├── eoh.py │ ├── llm/ │ │ ├── __init__.py │ │ ├── api_general.py │ │ ├── api_hf_inter.py │ │ ├── api_local_llm.py │ │ └── interface_LLM.py │ ├── llm_local_server/ │ │ ├── codellama_instruct_server.py │ │ ├── codellama_server.py │ │ ├── deepseek_coder_server.py │ │ ├── gemma_instruct_server.py │ │ ├── request.py │ │ └── starcoder_server.py │ ├── methods/ │ │ ├── __init__.py │ │ ├── ael/ │ │ │ ├── __init__.py │ │ │ ├── ael.py │ │ │ ├── ael_evolution.py │ │ │ ├── ael_interface_EC.py │ │ │ └── evaluator_accelerate.py │ │ ├── eoh/ │ │ │ ├── __init__.py │ │ │ ├── eoh.py │ │ │ ├── eoh_evolution.py │ │ │ ├── eoh_interface_EC.py │ │ │ └── evaluator_accelerate.py │ │ ├── localsearch/ │ │ │ ├── __init__.py │ │ │ ├── evaluator_accelerate.py │ │ │ ├── ls.py │ │ │ ├── ls_evolution.py │ │ │ └── ls_interface_EC.py │ │ ├── management/ │ │ │ ├── __init__.py │ │ │ ├── ls_greedy.py │ │ │ ├── ls_sa.py │ │ │ └── pop_greedy.py │ │ ├── methods.py │ │ └── selection/ │ │ ├── __init__.py │ │ ├── equal.py │ │ ├── prob_rank.py │ │ ├── roulette_wheel.py │ │ └── tournament.py │ ├── problems/ │ │ ├── __init__.py │ │ ├── machinelearning/ │ │ │ └── L_AutoDA/ │ │ │ ├── README.MD │ │ │ ├── ael_evaluation.py │ │ │ ├── ael_prompts.py │ │ │ ├── attacks/ │ │ │ │ ├── __init__.py │ │ │ │ └── evo_for_ael_no_mem.py │ │ │ ├── runAEL.py │ │ │ └── utils/ │ │ │ ├── __init__.py │ │ │ ├── get_data.py │ │ │ └── get_model.py │ │ ├── optimization/ │ │ │ ├── __init__.py │ │ │ ├── bp_online/ │ │ │ │ ├── __init__.py │ │ │ │ ├── get_instance.py │ │ │ │ ├── prompts.py │ │ │ │ └── run.py │ │ │ └── tsp_greedy/ │ │ │ ├── __init__.py │ │ │ ├── get_instance.py │ │ │ ├── instances.pkl │ │ │ ├── prompts.py │ │ │ └── run.py │ │ └── problems.py │ ├── test/ │ │ └── run.py │ └── utils/ │ ├── __init__.py │ ├── createFolders.py │ ├── createReport.py │ ├── getParas.py │ ├── get_algorithm&code_pop.py │ └── get_all_results.py ├── examples/ │ ├── bp_online/ │ │ ├── evaluation/ │ │ │ ├── evaluation.py │ │ │ ├── get_instance.py │ │ │ ├── heuristic.py │ │ │ ├── results.txt │ │ │ ├── runEval.py │ │ │ └── testingdata/ │ │ │ ├── generate_instances.py │ │ │ ├── test_dataset_100k.pkl │ │ │ ├── test_dataset_10k.pkl │ │ │ ├── test_dataset_1k.pkl │ │ │ ├── test_dataset_2k.pkl │ │ │ └── test_dataset_5k.pkl │ │ ├── results/ │ │ │ └── pops/ │ │ │ └── population_generation_0.json │ │ └── runEoH.py │ ├── bp_online_localLLM/ │ │ ├── evaluation/ │ │ │ ├── evaluation.py │ │ │ ├── get_instance.py │ │ │ ├── heuristic.py │ │ │ ├── results.txt │ │ │ ├── runEval.py │ │ │ └── testingdata/ │ │ │ ├── generate_instances.py │ │ │ ├── test_dataset_100k.pkl │ │ │ ├── test_dataset_10k.pkl │ │ │ ├── test_dataset_1k.pkl │ │ │ ├── test_dataset_2k.pkl │ │ │ └── test_dataset_5k.pkl │ │ └── runEoH.py │ ├── tsp_construct/ │ │ ├── evaluation/ │ │ │ ├── evaluation.py │ │ │ ├── heuristic.py │ │ │ ├── results.txt │ │ │ ├── runEval.py │ │ │ ├── testingdata/ │ │ │ │ ├── instance_data_10.pkl │ │ │ │ ├── instance_data_100.pkl │ │ │ │ ├── instance_data_20.pkl │ │ │ │ ├── instance_data_200.pkl │ │ │ │ └── instance_data_50.pkl │ │ │ └── trainingdata/ │ │ │ └── instances.pkl │ │ └── runEoH.py │ ├── user_bo_caf/ │ │ ├── best_alg.py │ │ ├── instance/ │ │ │ ├── botorch_problem.pkl │ │ │ └── instance_generator.py │ │ ├── prob.py │ │ ├── prompts.py │ │ ├── readme.md │ │ └── runEoH.py │ ├── user_bp_online/ │ │ ├── get_instance.py │ │ ├── prob.py │ │ ├── prompts.py │ │ └── runEoH.py │ ├── user_fssp_gls/ │ │ ├── TestingData/ │ │ │ └── Taillard/ │ │ │ ├── t_j100_m10.txt │ │ │ ├── t_j100_m20.txt │ │ │ ├── t_j100_m5.txt │ │ │ ├── t_j200_m10.txt │ │ │ ├── t_j200_m20.txt │ │ │ ├── t_j20_m10.txt │ │ │ ├── t_j20_m20.txt │ │ │ ├── t_j20_m5.txt │ │ │ ├── t_j50_m10.txt │ │ │ ├── t_j50_m20.txt │ │ │ └── t_j50_m5.txt │ │ ├── TrainingData/ │ │ │ ├── 1.txt │ │ │ ├── 10.txt │ │ │ ├── 11.txt │ │ │ ├── 12.txt │ │ │ ├── 13.txt │ │ │ ├── 14.txt │ │ │ ├── 15.txt │ │ │ ├── 16.txt │ │ │ ├── 17.txt │ │ │ ├── 18.txt │ │ │ ├── 19.txt │ │ │ ├── 2.txt │ │ │ ├── 20.txt │ │ │ ├── 21.txt │ │ │ ├── 22.txt │ │ │ ├── 23.txt │ │ │ ├── 24.txt │ │ │ ├── 25.txt │ │ │ ├── 26.txt │ │ │ ├── 27.txt │ │ │ ├── 28.txt │ │ │ ├── 29.txt │ │ │ ├── 3.txt │ │ │ ├── 30.txt │ │ │ ├── 31.txt │ │ │ ├── 32.txt │ │ │ ├── 33.txt │ │ │ ├── 34.txt │ │ │ ├── 35.txt │ │ │ ├── 36.txt │ │ │ ├── 37.txt │ │ │ ├── 38.txt │ │ │ ├── 39.txt │ │ │ ├── 4.txt │ │ │ ├── 40.txt │ │ │ ├── 41.txt │ │ │ ├── 42.txt │ │ │ ├── 43.txt │ │ │ ├── 44.txt │ │ │ ├── 45.txt │ │ │ ├── 46.txt │ │ │ ├── 47.txt │ │ │ ├── 48.txt │ │ │ ├── 49.txt │ │ │ ├── 5.txt │ │ │ ├── 50.txt │ │ │ ├── 51.txt │ │ │ ├── 52.txt │ │ │ ├── 53.txt │ │ │ ├── 54.txt │ │ │ ├── 55.txt │ │ │ ├── 56.txt │ │ │ ├── 57.txt │ │ │ ├── 58.txt │ │ │ ├── 59.txt │ │ │ ├── 6.txt │ │ │ ├── 60.txt │ │ │ ├── 61.txt │ │ │ ├── 62.txt │ │ │ ├── 63.txt │ │ │ ├── 64.txt │ │ │ ├── 7.txt │ │ │ ├── 8.txt │ │ │ ├── 9.txt │ │ │ └── instance_generator.py │ │ ├── jssp/ │ │ │ ├── bruteforce.py │ │ │ ├── get_ub.py │ │ │ ├── johnsons.py │ │ │ ├── neh.py │ │ │ └── simulated_annealing.py │ │ ├── prob.py │ │ ├── prompts.py │ │ └── runEoH.py │ └── user_tsp_gls/ │ ├── TestingData/ │ │ ├── TSP100.pkl │ │ ├── TSP20.pkl │ │ ├── TSP50.pkl │ │ └── check_instance.py │ ├── TrainingData/ │ │ └── TSPAEL64.pkl │ ├── gls/ │ │ ├── gls_evol.py │ │ ├── gls_operators.py │ │ ├── gls_run.py │ │ └── gls_test.py │ ├── prob.py │ ├── prompts.py │ ├── runEoH.py │ └── utils/ │ ├── readTSPLib.py │ ├── readTSPRandom.py │ └── utils.py └── version_log.txt ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ # Auto detect text files and perform LF normalization * text=auto ================================================ FILE: .gitignore ================================================ **/__pycache__ **/build/ *.egg-info/ *.egg *.pyc .DS_Store .vscode/ output.log ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2023 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================
EOH designs very competetive algorithms/heuristics in minutes/hours. Notably, It surpasses FunSearch, identifying superior heuristics with significantly fewer computational budgets (i.e., queries to LLMs) on online bin packing problem.
The following Figure shows the Evolution of EOH on the online bin packing problem. We outline the key **thoughts** and the corresponding **code** **snippets** that have contributed to the best results during evolution. Additionally, we mark the prompt strategies that result in improvement. Finally, we present the optimal heuristic in the final population and compare it to the heuristics designed by humans and from FunSearch.
If you find EoH helpful for your research or applied projects:
```bibtex
@inproceedings{fei2024eoh,
title={Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language Model},
author={Fei Liu, Xialiang Tong, Mingxuan Yuan, Xi Lin, Fu Luo, Zhenkun Wang, Zhichao Lu, Qingfu Zhang},
booktitle={International Conference on Machine Learning (ICML)},
year={2024},
url={https://arxiv.org/abs/2401.02051}
}
```
If you are interested on LLM4Opt or EoH, you can:
1) Contact us through email fliu36-c@my.cityu.edu.hk.
2) Visit [a collection of references and research papers on LLM4Opt](https://github.com/FeiLiu36/LLM4Opt)
3) Join our Group (coming soon)
If you encounter any difficulty using the code, you can contact us through the above or submit an [issue](https://github.com/FeiLiu36/EoH/issues)
## Requirements
- python >= 3.10
- numba
- numpy
- joblib
## EoH Example Usage 💻
#### Step 1: Install EoH
We suggest install and run EoH in [conda](https://conda.io/projects/conda/en/latest/index.html) env with python>=3.10
```bash
cd eoh
pip install .
```
#### Step 2: Try Example:
**Setup your Endpoint and Key for remote LLM or Setup your local LLM before start !**
For example, set the llm_api_endpoint to "api.deepseek.com", set llm_api_key to "your key", and set llm_model to "deepseek-chat".
```python
from eoh import eoh
from eoh.utils.getParas import Paras
# Parameter initilization #
paras = Paras()
# Set parameters #
paras.set_paras(method = "eoh", # ['ael','eoh']
problem = "bp_online", #['tsp_construct','bp_online']
llm_api_endpoint = "xxx", # set your LLM endpoint
llm_api_key = "xxx", # set your LLM key
llm_model = "gpt-3.5-turbo-1106",
ec_pop_size = 5, # number of samples in each population
ec_n_pop = 5, # number of populations
exp_n_proc = 4, # multi-core parallel
exp_debug_mode = False)
# initilization
evolution = eoh.EVOL(paras)
# run
evolution.run()
```
###### Example 1: Constructive Algorithm for TSP
```bash
cd examples/tsp_construct
python runEoH.py
```
**Evaluation**
```bash
cd examples/tsp_construct/evaluation
copy your heuristic to heuristic.py (Note that the function name/input/output must align with the evaluation block!!)
python runEval.py
```
###### Example 2: Online Bin Packing
(**Generate new best heuristic and Beat Funsearch in 30 minutes on your personal computer !** i7-10700 2.9Ghz, 32 GB)
```bash
cd examples/bp_online
python runEoH.py
```
**Evaluation**
```bash
cd examples/bp_online/evaluation
copy your heuristic to heuristic.py (Note that the function name/input/output must align with the evaluation block!!)
python runEval.py
```
###### Example 3: Use EoH solve your local problem
```bash
cd examples/user_XXX
python runEoH.py
```
### More Examples using EoH Platform (Code & Paper)
| Area | Problem | Paper | Code |
|-------------------------|----------------------------------------|---------------------------------|---------------------------------------------------------------|
| Combinatorial Optimization | Online Bin Packing, greedy heuristic | [paper] | [code](https://github.com/FeiLiu36/EoH/tree/main/examples/user_bp_online) |
| | TSP, construct heuristic | [paper] | [code](https://github.com/FeiLiu36/EoH/tree/main/examples/tsp_construct) |
| | TSP, guided local search | [paper] | [code](https://github.com/FeiLiu36/EoH/tree/main/examples/user_tsp_gls) |
| | Flow Shop Scheduling Problem (FSSP), guided local search | [paper] | [code](https://github.com/FeiLiu36/EoH/tree/main/examples/user_fssp_gls) |
| Machine Learning | Attack | [paper](https://arxiv.org/abs/2401.15335) | [code](https://github.com/pgg3/L-AutoDA) |
| Bayesian Optimization | Cost-aware Acquisition Function Design | [paper](https://arxiv.org/abs/2404.16906) | [code](https://github.com/FeiLiu36/EoH/tree/main/examples/user_bo_caf) |
| Mathematics | Admissible sets | | |
| Physics | Computational fluid dynamics | | |
## Use EoH in Your Application
A Step-by-step guide is provided in [here](./docs/QuickGuide.md) (coming soon)
## LLMs
1) Remote LLM + API (e.g., GPT3.5, Deepseek, Gemini Pro) (**Recommended !**):
+ OpenAI API.
+ [Deepseek API](https://platform.deepseek.com/)
+ Other APIs:
+ https://yukonnet.site/
+ https://github.com/chatanywhere/GPT_API_free
+ https://www.api2d.com/
2) Local LLM Deployment + API (e.g., Llamacode, instruct Llama, gemma, deepseek, ...):
+ Step 1: Download Huggingface Model, for example, download gemma-2b-it (git clone https://huggingface.co/google/gemma-2b-it)
+ Step 2:
+ cd llm_server
+ python gemma_instruct_server.py
+ Step 3: Copy your url generated by running your server to request.py ( For example, set url='http://127.0.0.1:11012/completions') to test your server deployment.
+ Step 4: Copy your url generated by running your server to runEoH.py in your example. (For example, set url='http://127.0.0.1:11012/completions')
+ Step 5: Python runEoH.py
3) Your Implementation:
+ If you want to use other LLM or if you want to use your own GPT API or local LLMs, please add your interface in ael/llm
## Related Works on LLM4Opt
Welcome to visit [a collection of references and research papers on LLM4Opt](https://github.com/FeiLiu36/LLM4Opt)
## Contributors
[Rui Zhang](https://github.com/RayZhhh)
[Zhiyuan Yang](https://github.com/yzy1996)
[Ping Guo](https://github.com/pgg3)
[Shunyu Yao](https://github.com/ShunyuYao6)
================================================
FILE: README_CN.md
================================================
EOH在分钟/小时内设计出了非常有竞争力的算法/启发式方法。例如,在在线装箱问题上,EoH自动设计出新的最优启发式算法,优于人工设计算法和同期谷歌工作FunSearch。
下图显示了在在线装箱问题上EOH的演变。我们概述了在演变过程中对最佳结果有所贡献的关键**思想**和相应的**代码**。此外,我们标记了导致改进的提示策略。最后,我们展示了最终种群中的最优启发式方法,并将其与人类设计的启发式方法和来自FunSearch的启发式方法进行了比较。
如果您发现EoH对您的研究或应用项目有所帮助:
```bibtex
@inproceedings{fei2024eoh,
title={Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language Model},
author={Fei Liu, Xialiang Tong, Mingxuan Yuan, Xi Lin, Fu Luo, Zhenkun Wang, Zhichao Lu, Qingfu Zhang},
booktitle={International Conference on Machine Learning (ICML)},
year={2024},
url={https://arxiv.org/abs/2401.02051}
}
```
如果您对LLM4Opt或EoH感兴趣,您可以:
+ 通过电子邮件fliu36-c@my.cityu.edu.hk与我们联系。
+ 欢迎访问[大模型与优化参考文献和研究论文收藏](https://github.com/FeiLiu36/LLM4Opt)
+ 加入我们的讨论组(即将推出)
如果您在使用代码时遇到任何困难,请通过上述方式与我们联系或提交[问题]。
## 系统要求
+ python >= 3.10
+ numba
+ numpy
+ joblib
## EoH示例用法
第1步:安装EoH
我们建议在具有python>=3.10的[conda](https://conda.io/projects/conda/en/latest/index.html)环境中安装和运行EoH
```bash
cd eoh
pip install .
```
第2步:尝试示例:
**在开始前设置您的端点和密钥以远程LLM或在启动之前设置您的本地LLM!**
**例如: 把 llm_api_endpoint 设置为 "api.deepseek.com", 把 llm_api_key 设置为 "your key",把 llm_model 设置为 "deepseek-chat".**
```python
from eoh import eoh
from eoh.utils.getParas import Paras
# Parameter initilization #
paras = Paras()
# Set parameters #
paras.set_paras(method = "eoh", # ['ael','eoh']
problem = "bp_online", #['tsp_construct','bp_online']
llm_api_endpoint = "xxx", # set your LLM endpoint
llm_api_key = "xxx", # set your LLM key
llm_model = "gpt-3.5-turbo-1106",
ec_pop_size = 5, # number of samples in each population
ec_n_pop = 5, # number of populations
exp_n_proc = 4, # multi-core parallel
exp_debug_mode = False)
# initilization
evolution = eoh.EVOL(paras)
# run
evolution.run()
```
###### 示例1:旅行商问题的构造算法
```bash
cd examples/tsp_construct
python runEoH.py
```
###### 示例2:在线装箱问题
(在您的个人计算机上在30分钟内生成新的最佳启发式方法并击败Funsearch! i7-10700 2.9Ghz, 32GB)
```bash
cd examples/bp_online
python runEoH.py
```
###### 示例3:使用EoH解决您的本地问题
```bash
cd examples/local_problem
python runEoH.py
```
### 使用EoH平台的更多示例(代码和论文)
#### 组合优化
+ 在线装箱问题 (BP),贪婪启发式方法,代码, [论文]
+ 旅行商问题 (TSP),构造启发式方法,代码, [论文]
+ 旅行商问题 (TSP),引导式局部搜索,[代码], [论文]
+ 流水车间调度问题(FSSP),引导式局部搜索,[代码], [论文]
#### 机器学习
+ 图像攻击,[代码], [论文](https://arxiv.org/abs/2401.15335)
#### 贝叶斯优化
+ 获取函数自动设计,[论文](https://arxiv.org/abs/2404.16906)
#### 数学
+ 可接受集合
#### 物理学
+ 计算流体动力学
## 在您的应用程序中使用EoH
提供了这里的逐步指南(即将推出)
## 大模型设置
1) 远程LLM + API(例如, GPT3.5, Deepseek, Gemini Pro) (推荐!):
+ OpenAI API。
+ [Deepseek API](https://platform.deepseek.com/)
+ 其他API:
+ https://yukonnet.site/ (Llama, Llamacode, Gemini Pro, 等)
+ https://github.com/chatanywhere/GPT_API_free
+ https://www.api2d.com/
2) 本地LLM部署 + API(例如,Llamacode,instruct Llama,gemma,deepseek等):
+ 第1步:下载Huggingface模型,例如,下载gemma-2b-it(git clone https://huggingface.co/google/gemma-2b-it)
+ 第2步: + cd llm_server + python gemma_instruct_server.py
+ 第3步:将运行服务器生成的url复制到request.py(例如,将url='http://127.0.0.1:11012/completions'设置为测试您的服务器部署)。
+ 第4步:将运行服务器生成的url复制到您的示例中的runAEL.py中(例如,将url='http://127.0.0.1:11012/completions'设置该项)。
+ 第5步:Python runAEL.py
3) 自己的实现:
+ 如果您想使用其他LLM或自己的GPT API或本地LLMs,请在ael/llm中添加您的接口
## 关于LLM4Opt的相关工作
欢迎访问[大模型与优化参考文献和研究论文收藏](https://github.com/FeiLiu36/LLM4Opt)
## 贡献者
[Rui Zhang](https://github.com/RayZhhh)
[Zhiyuan Yang](https://github.com/yzy1996)
[Ping Guo](https://github.com/pgg3)
[Shunyu Yao](https://github.com/ShunyuYao6)
================================================
FILE: baseline/funsearch/.gitignore
================================================
ignore
__pycache__
logs/
.DS_Store
.idea
================================================
FILE: baseline/funsearch/LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: baseline/funsearch/README.md
================================================
# FunSearch Implementation
This repository implements the following publication:
> Romera-Paredes, B. et al. [Mathematical discoveries from program search with large language models](https://www.nature.com/articles/s41586-023-06924-6). *Nature* (2023)
## Installation and Requirements
Please note that **the Python version must be larger or equal to Python 3.9**, or the '*ast*' package used in the implementations will fail to work.
You can run FunSearch for online bin packing locally if enough GPU devices are available. Or you can try to use LLM interfaces to request responses online.
Please install the packages listed in `requirements.txt`.
## Project Structure
There are some independent directories in this project:
- `bin_packing` contains an example jupyter notebook for the bin packing task. [See here](#colab).
- `implementation` contains an implementation of the evolutionary algorithm, code manipulation routines, and a single-threaded implementation of the FunSearch pipeline.
- `llm-server` contains the implementations of an LLM server that gets the prompt by monitoring requests from FunSearch and response to the inference results to the FunSearch algorithm.
## Files in `funsearch/implementation`
There are some files in `funsearch/implementation`. They are as follows:
- `code_manipulatoin.py` provides functions to modify the code in the specification.
- `config.py` includes configs of funsearch.
- `evaluator.py` trims the sample results from LLM, and evaluates the sampled functions.
- `evaluator_accelerate.py` accelerates the evaluation using the 'numba' library.
- `funsearch.py` implements funsearch pipeline.
- `profile.py` records the score of the sampled functions.
- `programs_database.py` evolves the sampled functions.
- `sampler.py` sends prompts to LLM and gets results.
## Run FunSearch Demo on Colab
The jupyter notebook in `bin_packing/bin_packing_funsearch.ipynb` can be opened via [](https://colab.research.google.com/github/RayZhhh/funsearch/blob/main/bin_packing/bin_packing_funsearch.ipynb). Please note that do not run jupyter notebook locally, as the jupyter notebook backend does not support multiprocess running.
## Run FunSearch Demo Locally
### Parameters and Settings
If you want to adjust the following parameters, you should modify the code in `funsearch/implementation` manually.
- `timeout_seconds` This parameter defines the maximum evaluation time for a single function. If the evaluation time exceeds this, the evaluation process will be killed. This strategy can prevent *while True* loop and reduce total evaluation costs but may discard potential outstanding functions. You can modify this in `implementation/evaluator.py/class Evaluator`.
- `_reduce_score` This function does reduction to the score of a sampled function in some instances. The reduction is implemented as *mean* by default. You can modify it in `implementation/program_database.py`, where you can find a '_reduce_score' function.
### Use Local LLM
1. First, start the local LLM server.
```shell
# Suppose we are in funsearch directory (root dir of this project).
cd llm-server
# Start LLM server: python llm_server.py --port 8088 --path [model path] --d [GPU IDs]
python llm_server.py --port 8088 --path /LLms/CodeLlama-34b --d 0 1 2 3 4 5
```
2. Then, start FunSearch.
```shell
# Run FunSearch
python funsearch_bin_packing_local_llm.py
```
You can see logs via *Tensorboard*. Please check the *log_dir* variable defined in `bin_packing_funsearch_my_template.py`, and start the Tensorboard using the following instructions:
```shell
# Suppose we are in funsearch directory (root directory of this project)
cd logs
tensorboard --logdir funsearch_local_llm
```
### Use LLM Interfaces
1. Set the API's IP address according to your API provider. The code is in `funsearch_bin_packing_llm_api.py` line 33.
```python
conn = http.client.HTTPSConnection("api.chatanywhere.com.cn")
```
2. Set the API key in request headers, the code lies in `funsearch_bin_packing_llm_api.py` line 44-48. You should replace `sk-ys...` with your API key.
```python
headers = {
'Authorization': 'Bearer sk-ys02zx...(replace with your API key)...',
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
'Content-Type': 'application/json'
}
```
3. Start FunSearch.
```shell
# Run FunSearch
python funsearch_bin_packing_llm_api.py
```
You can see logs via *Tensorboard*. Please check the *log_dir* variable defined in `bin_packing_funsearch_my_template.py`, and start the Tensorboard using the following instructions:
```shell
# Suppose we are in funsearch directory (root directory of this project).
cd logs
tensorboard --logdir funsearch_llm_api
```
## Issue
If you encounter any difficulty using the code, please do not hesitate to submit an issue!
================================================
FILE: baseline/funsearch/bin_packing/bin_packing_funsearch.ipynb
================================================
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Run FunSearch on Bin Packing\n",
"Five steps:\n",
"1. Implement 'LLM' interface.\n",
"2. Implement a 'SandBox' interface.\n",
"3. Prepare a 'specification'.\n",
"4. Prepare a dataset.\n",
"5. Start FunSearch."
],
"metadata": {
"collapsed": false
},
"id": "58ba1915fced4e72"
},
{
"cell_type": "markdown",
"source": [
"## Preparation: download the project file from github. And update system path."
],
"metadata": {
"collapsed": false
},
"id": "6a2d02b8e9c3ba67"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"!git clone https://github.com/RayZhhh/funsearch.git\n",
"\n",
"import sys\n",
"\n",
"sys.path.append('/content/funsearch/')"
],
"metadata": {
"collapsed": false
},
"id": "22453e8153e0934c"
},
{
"cell_type": "markdown",
"source": [
"## 1. Implement LLM interface\n",
"Set the API's IP address according to your API provider (See line 65 in the following code).\n",
"```python\n",
"conn = http.client.HTTPSConnection(\"api.chatanywhere.com.cn\")\n",
"```\n",
"You should prepare a 'key' for the LLM API. And fill them in the header (See line 76-80 in the following code).\n",
"```python\n",
"headers = {\n",
" 'Authorization': 'Bearer [put your key here, the key may start with \"sk-...\"]',\n",
" 'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',\n",
" 'Content-Type': 'application/json'\n",
"}\n",
"```"
],
"metadata": {
"collapsed": false
},
"id": "fe47175708cc0a93"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"import time\n",
"import json\n",
"import multiprocessing\n",
"from typing import Collection, Any\n",
"import http.client\n",
"from implementation import sampler\n",
"\n",
"\n",
"def _trim_preface_of_body(sample: str) -> str:\n",
" \"\"\"Trim the redundant descriptions/symbols/'def' declaration before the function body.\n",
" Please see my comments in sampler.LLM (in sampler.py).\n",
" Since the LLM used in this file is not a pure code completion LLM, this trim function is required.\n",
"\n",
" -Example sample (function & description generated by LLM):\n",
" -------------------------------------\n",
" This is the optimized function ...\n",
" def priority_v2(...) -> ...:\n",
" return ...\n",
" This function aims to ...\n",
" -------------------------------------\n",
" -This function removes the description above the function's signature, and the function's signature.\n",
" -The indent of the code is preserved.\n",
" -Return of this function:\n",
" -------------------------------------\n",
" return ...\n",
" This function aims to ...\n",
" -------------------------------------\n",
" \"\"\"\n",
" lines = sample.splitlines()\n",
" func_body_lineno = 0\n",
" find_def_declaration = False\n",
" for lineno, line in enumerate(lines):\n",
" # find the first 'def' statement in the given code\n",
" if line[:3] == 'def':\n",
" func_body_lineno = lineno\n",
" find_def_declaration = True\n",
" break\n",
" if find_def_declaration:\n",
" code = ''\n",
" for line in lines[func_body_lineno + 1:]:\n",
" code += line + '\\n'\n",
" return code\n",
" return sample\n",
"\n",
"\n",
"class LLMAPI(sampler.LLM):\n",
" \"\"\"Language model that predicts continuation of provided source code.\n",
" \"\"\"\n",
"\n",
" def __init__(self, samples_per_prompt: int, trim=True):\n",
" super().__init__(samples_per_prompt)\n",
" additional_prompt = ('Complete a different and more complex Python function. '\n",
" 'Be creative and you can insert multiple if-else and for-loop in the code logic.'\n",
" 'Only output the Python code, no descriptions.')\n",
" self._additional_prompt = additional_prompt\n",
" self._trim = trim\n",
"\n",
" def draw_samples(self, prompt: str) -> Collection[str]:\n",
" \"\"\"Returns multiple predicted continuations of `prompt`.\"\"\"\n",
" return [self._draw_sample(prompt) for _ in range(self._samples_per_prompt)]\n",
"\n",
" def _draw_sample(self, content: str) -> str:\n",
" prompt = '\\n'.join([content, self._additional_prompt])\n",
" while True:\n",
" try:\n",
" conn = http.client.HTTPSConnection(\"api.chatanywhere.com.cn\")\n",
" payload = json.dumps({\n",
" \"max_tokens\": 512,\n",
" \"model\": \"gpt-3.5-turbo\",\n",
" \"messages\": [\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": prompt\n",
" }\n",
" ]\n",
" })\n",
" headers = {\n",
" 'Authorization': 'Bearer sk-ys02zx......(replace with your own)......',\n",
" 'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',\n",
" 'Content-Type': 'application/json'\n",
" }\n",
" conn.request(\"POST\", \"/v1/chat/completions\", payload, headers)\n",
" res = conn.getresponse()\n",
" data = res.read().decode(\"utf-8\")\n",
" data = json.loads(data)\n",
" response = data['choices'][0]['message']['content']\n",
" # trim function\n",
" if self._trim:\n",
" response = _trim_preface_of_body(response)\n",
" return response\n",
" except Exception:\n",
" time.sleep(2)\n",
" continue"
],
"metadata": {
"collapsed": false
},
"id": "1999e45c9a568b08"
},
{
"cell_type": "markdown",
"source": [
"## 2. Implement a 'SandBox' interface"
],
"metadata": {
"collapsed": false
},
"id": "d27817cdec2cedfc"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from implementation import evaluator\n",
"from implementation import evaluator_accelerate\n",
"\n",
"\n",
"class Sandbox(evaluator.Sandbox):\n",
" \"\"\"Sandbox for executing generated code. Implemented by RZ.\n",
"\n",
" RZ: Sandbox returns the 'score' of the program and:\n",
" 1) avoids the generated code to be harmful (accessing the internet, take up too much RAM).\n",
" 2) stops the execution of the code in time (avoid endless loop).\n",
" \"\"\"\n",
"\n",
" def __init__(self, verbose=False, numba_accelerate=True):\n",
" \"\"\"\n",
" Args:\n",
" verbose : Print evaluate information.\n",
" numba_accelerate: Use numba to accelerate the evaluation. It should be noted that not all numpy functions\n",
" support numba acceleration, such as np.piecewise().\n",
" \"\"\"\n",
" self._verbose = verbose\n",
" self._numba_accelerate = numba_accelerate\n",
"\n",
" def run(\n",
" self,\n",
" program: str,\n",
" function_to_run: str, # RZ: refers to the name of the function to run (e.g., 'evaluate')\n",
" function_to_evolve: str, # RZ: accelerate the code by decorating @numba.jit() on function_to_evolve.\n",
" inputs: Any, # refers to the dataset\n",
" test_input: str, # refers to the current instance\n",
" timeout_seconds: int,\n",
" **kwargs # RZ: add this\n",
" ) -> tuple[Any, bool]:\n",
" \"\"\"Returns `function_to_run(test_input)` and whether execution succeeded.\n",
"\n",
" RZ: If the generated code (generated by LLM) is executed successfully,\n",
" the output of this function is the score of a given program.\n",
" RZ: PLEASE NOTE THAT this SandBox is only designed for bin-packing problem.\n",
" \"\"\"\n",
" dataset = inputs[test_input]\n",
" try:\n",
" result_queue = multiprocessing.Queue()\n",
" process = multiprocessing.Process(\n",
" target=self._compile_and_run_function,\n",
" args=(program, function_to_run, function_to_evolve, dataset, self._numba_accelerate, result_queue)\n",
" )\n",
" process.start()\n",
" process.join(timeout=timeout_seconds)\n",
" if process.is_alive():\n",
" # if the process is not finished in time, we consider the program illegal\n",
" process.terminate()\n",
" process.join()\n",
" results = None, False\n",
" else:\n",
" if not result_queue.empty():\n",
" results = result_queue.get_nowait()\n",
" else:\n",
" results = None, False\n",
"\n",
" return results\n",
" except:\n",
" return None, False\n",
"\n",
" def _compile_and_run_function(self, program, function_to_run, function_to_evolve, dataset, numba_accelerate,\n",
" result_queue):\n",
" try:\n",
" # optimize the code (decorate function_to_run with @numba.jit())\n",
" if numba_accelerate:\n",
" program = evaluator_accelerate.add_numba_decorator(\n",
" program=program,\n",
" function_to_evolve=function_to_evolve\n",
" )\n",
" # compile the program, and maps the global func/var/class name to its address\n",
" all_globals_namespace = {}\n",
" # execute the program, map func/var/class to global namespace\n",
" exec(program, all_globals_namespace)\n",
" # get the pointer of 'function_to_run'\n",
" function_to_run = all_globals_namespace[function_to_run]\n",
" # return the execution results\n",
" results = function_to_run(dataset)\n",
" # the results must be int or float\n",
" if not isinstance(results, (int, float)):\n",
" result_queue.put((None, False))\n",
" return\n",
" result_queue.put((results, True))\n",
" except Exception:\n",
" # if raise any exception, we assume the execution failed\n",
" result_queue.put((None, False))"
],
"metadata": {
"collapsed": false
},
"id": "3e3d88a87535b6b2"
},
{
"cell_type": "markdown",
"source": [
"## 3. Prepare a 'specification'"
],
"metadata": {
"collapsed": false
},
"id": "ec3a05827354f9ae"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"specification = r'''\n",
"import numpy as np\n",
"\n",
"\n",
"def get_valid_bin_indices(item: float, bins: np.ndarray) -> np.ndarray:\n",
" \"\"\"Returns indices of bins in which item can fit.\"\"\"\n",
" return np.nonzero((bins - item) >= 0)[0]\n",
"\n",
"\n",
"def online_binpack(\n",
" items: tuple[float, ...], bins: np.ndarray\n",
") -> tuple[list[list[float, ...], ...], np.ndarray]:\n",
" \"\"\"Performs online binpacking of `items` into `bins`.\"\"\"\n",
" # Track which items are added to each bin.\n",
" packing = [[] for _ in bins]\n",
" # Add items to bins.\n",
" for item in items:\n",
" # Extract bins that have sufficient space to fit item.\n",
" valid_bin_indices = get_valid_bin_indices(item, bins)\n",
" # Score each bin based on heuristic.\n",
" priorities = priority(item, bins[valid_bin_indices])\n",
" # Add item to bin with highest priority.\n",
" best_bin = valid_bin_indices[np.argmax(priorities)]\n",
" bins[best_bin] -= item\n",
" packing[best_bin].append(item)\n",
" # Remove unused bins from packing.\n",
" packing = [bin_items for bin_items in packing if bin_items]\n",
" return packing, bins\n",
"\n",
"\n",
"@funsearch.run\n",
"def evaluate(instances: dict) -> float:\n",
" \"\"\"Evaluate heuristic function on a set of online binpacking instances.\"\"\"\n",
" # List storing number of bins used for each instance.\n",
" num_bins = []\n",
" # Perform online binpacking for each instance.\n",
" for name in instances:\n",
" instance = instances[name]\n",
" capacity = instance['capacity']\n",
" items = instance['items']\n",
" # Create num_items bins so there will always be space for all items,\n",
" # regardless of packing order. Array has shape (num_items,).\n",
" bins = np.array([capacity for _ in range(instance['num_items'])])\n",
" # Pack items into bins and return remaining capacity in bins_packed, which\n",
" # has shape (num_items,).\n",
" _, bins_packed = online_binpack(items, bins)\n",
" # If remaining capacity in a bin is equal to initial capacity, then it is\n",
" # unused. Count number of used bins.\n",
" num_bins.append((bins_packed != capacity).sum())\n",
" # Score of heuristic function is negative of average number of bins used\n",
" # across instances (as we want to minimize number of bins).\n",
" return -np.mean(num_bins)\n",
"\n",
"\n",
"@funsearch.evolve\n",
"def priority(item: float, bins: np.ndarray) -> np.ndarray:\n",
" \"\"\"Returns priority with which we want to add item to each bin.\n",
"\n",
" Args:\n",
" item: Size of item to be added to the bin.\n",
" bins: Array of capacities for each bin.\n",
"\n",
" Return:\n",
" Array of same size as bins with priority score of each bin.\n",
" \"\"\"\n",
" ratios = item / bins\n",
" log_ratios = np.log(ratios)\n",
" priorities = -log_ratios\n",
" return priorities\n",
"'''"
],
"metadata": {
"collapsed": false
},
"id": "2e2f875d128a693a"
},
{
"cell_type": "markdown",
"source": [
"## 4. Prepare a dataset"
],
"metadata": {
"collapsed": false
},
"id": "391bfe61e1661e18"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"import bin_packing_utils\n",
"\n",
"bin_packing_or3 = {'OR3': bin_packing_utils.datasets['OR3']}"
],
"metadata": {
"collapsed": false
},
"id": "fea85ccfc8c0ca6d"
},
{
"cell_type": "markdown",
"source": [
"## 5. Start FunSearch\n",
"Please note that in jupyter notebook the following code will fail. This is because juypter does not support multiprocessing. Colab backend supports multiprocessing."
],
"metadata": {
"collapsed": false
},
"id": "cb66651fb2764ce9"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from implementation import funsearch\n",
"from implementation import config\n",
"\n",
"# It should be noted that the if __name__ == '__main__' is required.\n",
"# Because the inner code uses multiprocess evaluation.\n",
"if __name__ == '__main__':\n",
" class_config = config.ClassConfig(llm_class=LLMAPI, sandbox_class=Sandbox)\n",
" config = config.Config(samples_per_prompt=4)\n",
" global_max_sample_num = 10 # if it is set to None, funsearch will execute an endless loop\n",
" funsearch.main(\n",
" specification=specification,\n",
" inputs=bin_packing_or3,\n",
" config=config,\n",
" max_sample_nums=global_max_sample_num,\n",
" class_config=class_config,\n",
" log_dir='../logs/funsearch_llm_api'\n",
" )"
],
"metadata": {
"collapsed": false
},
"id": "1e0ec0c796d09ca1"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
================================================
FILE: baseline/funsearch/bin_packing_utils.py
================================================
# @title
from __future__ import annotations
import numpy as np
from typing import Tuple
datasets = {}
# Data from the OR3 benchmark, containing 20 bin packing instances each with 500 items.
datasets['OR3'] = {'u500_00': {'capacity': 150, 'num_items': 500,
'items': [42, 69, 67, 57, 93, 90, 38, 36, 45, 42, 33, 79, 27, 57, 44, 84, 86, 92, 46, 38,
85, 33, 82, 73, 49, 70, 59, 23, 57, 72, 74, 69, 33, 42, 28, 46, 30, 64, 29, 74,
41, 49, 55, 98, 80, 32, 25, 38, 82, 30, 35, 39, 57, 84, 62, 50, 55, 27, 30, 36,
20, 78, 47, 26, 45, 41, 58, 98, 91, 96, 73, 84, 37, 93, 91, 43, 73, 85, 81, 79,
71, 80, 76, 83, 41, 78, 70, 23, 42, 87, 43, 84, 60, 55, 49, 78, 73, 62, 36, 44,
94, 69, 32, 96, 70, 84, 58, 78, 25, 80, 58, 66, 83, 24, 98, 60, 42, 43, 43, 39,
97, 57, 81, 62, 75, 81, 23, 43, 50, 38, 60, 58, 70, 88, 36, 90, 37, 45, 45, 39,
44, 53, 70, 24, 82, 81, 47, 97, 35, 65, 74, 68, 49, 55, 52, 94, 95, 29, 99, 20,
22, 25, 49, 46, 98, 59, 98, 60, 23, 72, 33, 98, 80, 95, 78, 57, 67, 53, 47, 53,
36, 38, 92, 30, 80, 32, 97, 39, 80, 72, 55, 41, 60, 67, 53, 65, 95, 20, 66, 78,
98, 47, 100, 85, 53, 53, 67, 27, 22, 61, 43, 52, 76, 64, 61, 29, 30, 46, 79,
66, 27, 79, 98, 90, 22, 75, 57, 67, 36, 70, 99, 48, 43, 45, 71, 100, 88, 48,
27, 39, 38, 100, 60, 42, 20, 69, 24, 23, 92, 32, 84, 36, 65, 84, 34, 68, 64,
33, 69, 27, 47, 21, 85, 88, 59, 61, 50, 53, 37, 75, 64, 84, 74, 57, 83, 28, 31,
97, 61, 36, 46, 37, 96, 80, 53, 51, 68, 90, 64, 81, 66, 67, 80, 37, 92, 67, 64,
31, 94, 45, 80, 28, 76, 29, 64, 38, 48, 40, 29, 44, 81, 35, 51, 48, 67, 24, 46,
38, 76, 22, 30, 67, 45, 41, 29, 41, 79, 21, 25, 90, 62, 34, 73, 50, 79, 66, 59,
42, 90, 79, 70, 66, 80, 35, 62, 98, 97, 37, 32, 75, 91, 91, 48, 26, 23, 32,
100, 46, 29, 26, 29, 26, 83, 82, 92, 95, 87, 63, 57, 100, 63, 65, 81, 46, 42,
95, 90, 80, 53, 27, 84, 40, 22, 97, 20, 73, 63, 95, 46, 42, 47, 40, 26, 88, 49,
24, 92, 87, 68, 95, 34, 82, 84, 43, 54, 73, 66, 32, 62, 48, 99, 90, 86, 28, 25,
25, 89, 67, 96, 35, 33, 70, 40, 59, 32, 94, 34, 86, 35, 45, 25, 76, 80, 42, 91,
44, 91, 97, 60, 29, 45, 37, 61, 54, 78, 56, 74, 74, 45, 21, 96, 37, 75, 100,
58, 84, 85, 56, 54, 71, 52, 79, 43, 35, 27, 70, 31, 47, 35, 26, 30, 97, 90, 80,
58, 60, 73, 46, 71, 39, 42, 98, 27, 21, 71, 71, 78, 76, 57, 24, 91, 84, 35, 25,
77, 96, 97, 89, 30, 86]}, 'u500_01': {'capacity': 150, 'num_items': 500,
'items': [81, 39, 75, 66, 85, 36, 60, 56,
50, 75, 75, 37, 87, 95, 21, 99,
42, 57, 31, 37, 42, 40, 69, 91,
45, 97, 84, 90, 52, 43, 68, 53,
37, 65, 79, 73, 92, 87, 20, 20,
73, 42, 52, 20, 24, 76, 71, 72,
21, 21, 82, 92, 78, 87, 50, 41,
31, 73, 89, 59, 88, 40, 71, 69,
45, 57, 49, 68, 84, 32, 69, 77,
92, 98, 57, 39, 32, 23, 99, 91,
48, 21, 70, 43, 73, 69, 65, 57,
67, 28, 84, 42, 61, 92, 82, 34,
74, 55, 60, 69, 26, 25, 67, 77,
67, 79, 47, 84, 50, 21, 87, 83,
44, 88, 78, 53, 78, 37, 47, 52,
32, 88, 85, 82, 55, 41, 60, 66,
78, 72, 34, 64, 20, 60, 100,
62, 80, 34, 68, 38, 32, 32, 37,
82, 98, 90, 58, 97, 56, 34, 70,
39, 56, 69, 36, 20, 99, 84, 53,
27, 88, 53, 42, 45, 42, 31, 54,
60, 55, 27, 36, 31, 39, 91, 45,
97, 26, 80, 41, 56, 70, 97, 48,
87, 23, 32, 75, 100, 97, 51,
78, 78, 21, 72, 72, 79, 46, 30,
48, 27, 95, 48, 67, 58, 46, 92,
21, 82, 91, 40, 56, 24, 94, 44,
91, 92, 81, 24, 84, 44, 83, 37,
98, 85, 88, 95, 29, 35, 100,
55, 48, 27, 20, 66, 62, 52, 88,
59, 97, 91, 81, 81, 86, 48, 43,
60, 72, 88, 90, 48, 38, 60, 53,
55, 90, 48, 55, 57, 59, 25, 51,
22, 43, 31, 52, 89, 96, 58, 63,
27, 46, 43, 30, 44, 71, 66, 64,
28, 83, 88, 42, 92, 95, 36, 24,
62, 44, 82, 59, 31, 96, 44, 61,
78, 72, 62, 76, 65, 22, 41, 27,
85, 80, 72, 100, 29, 27, 43,
83, 32, 33, 53, 95, 99, 20, 23,
72, 50, 50, 27, 89, 53, 75, 81,
34, 27, 69, 48, 84, 37, 69, 54,
51, 49, 49, 54, 100, 55, 45,
83, 61, 96, 91, 37, 53, 76, 50,
66, 70, 87, 92, 35, 53, 95, 47,
56, 55, 86, 32, 99, 83, 88, 41,
63, 77, 60, 66, 53, 79, 81, 96,
34, 99, 47, 74, 87, 44, 77, 52,
99, 69, 64, 94, 38, 69, 61, 98,
40, 84, 89, 49, 64, 53, 41, 34,
85, 35, 55, 61, 68, 100, 75,
98, 36, 44, 57, 24, 60, 45, 48,
60, 94, 71, 70, 64, 62, 93, 20,
69, 37, 63, 61, 26, 54, 89, 46,
54, 50, 32, 71, 62, 40, 26, 59,
62, 27, 60, 50, 74, 34, 40, 70,
56, 23, 66, 57, 43, 45, 65, 25,
82, 82, 37, 66, 47, 44, 94, 23,
24, 51, 100, 22, 25, 51, 95,
58, 97, 30, 79, 23, 53, 80, 20,
65, 64, 21, 26, 100, 81, 98,
70, 85, 92, 97, 86, 71, 91, 29,
63, 34, 67, 23, 33, 89, 94, 47,
100, 37, 40, 58]},
'u500_02': {'capacity': 150, 'num_items': 500,
'items': [73, 39, 49, 79, 54, 57, 98, 69, 67, 49, 38, 34, 96, 27, 92, 82, 69, 45, 69, 20,
75, 97, 51, 70, 29, 91, 98, 77, 48, 45, 43, 61, 36, 82, 89, 94, 26, 35, 58, 58,
57, 46, 44, 91, 49, 52, 65, 42, 33, 60, 37, 57, 91, 52, 95, 84, 72, 75, 89, 81,
67, 74, 87, 60, 32, 76, 85, 59, 62, 39, 64, 52, 88, 45, 29, 88, 85, 54, 40, 57,
91, 55, 60, 37, 86, 21, 21, 43, 77, 75, 92, 33, 59, 74, 40, 36, 62, 21, 56, 38,
22, 45, 94, 68, 83, 86, 75, 21, 40, 44, 74, 52, 61, 95, 20, 79, 76, 32, 21, 91,
83, 39, 31, 81, 41, 90, 74, 100, 38, 33, 74, 40, 80, 39, 22, 46, 58, 65, 67,
37, 82, 64, 26, 80, 74, 20, 62, 82, 40, 28, 72, 45, 62, 72, 89, 31, 92, 63, 89,
33, 25, 54, 66, 100, 20, 90, 87, 48, 28, 46, 76, 50, 66, 30, 26, 23, 40, 70,
57, 92, 52, 54, 27, 58, 66, 65, 93, 83, 37, 62, 94, 29, 66, 98, 20, 66, 42, 52,
90, 22, 30, 34, 65, 81, 90, 44, 88, 51, 97, 79, 58, 46, 65, 40, 68, 64, 34, 59,
99, 82, 86, 88, 52, 76, 76, 50, 51, 92, 59, 22, 60, 69, 45, 66, 50, 62, 59, 90,
54, 55, 92, 23, 97, 73, 39, 88, 34, 92, 74, 90, 55, 28, 45, 71, 56, 45, 63, 26,
20, 34, 78, 26, 21, 99, 50, 52, 29, 52, 84, 78, 84, 89, 93, 83, 97, 35, 29, 80,
99, 86, 63, 100, 87, 54, 48, 72, 98, 43, 81, 96, 77, 92, 32, 66, 82, 52, 30,
52, 97, 56, 44, 67, 60, 79, 78, 90, 38, 99, 42, 97, 63, 39, 69, 67, 91, 38, 37,
51, 98, 30, 77, 78, 35, 33, 94, 36, 59, 85, 98, 80, 79, 68, 61, 27, 95, 83, 91,
90, 38, 93, 22, 35, 38, 100, 26, 35, 64, 40, 79, 49, 88, 41, 28, 62, 78, 65,
90, 35, 50, 62, 91, 57, 60, 50, 28, 77, 97, 35, 40, 21, 73, 30, 75, 50, 27, 58,
59, 94, 60, 55, 89, 84, 91, 65, 99, 89, 83, 47, 52, 24, 66, 98, 51, 21, 23, 78,
41, 99, 52, 36, 69, 70, 91, 54, 38, 98, 57, 64, 76, 61, 31, 27, 23, 22, 61, 65,
35, 37, 75, 54, 97, 45, 78, 22, 79, 76, 81, 78, 41, 59, 28, 58, 90, 78, 57, 63,
24, 27, 79, 67, 88, 49, 57, 78, 87, 66, 91, 37, 51, 49, 84, 32, 62, 36, 52, 72,
59, 77, 54, 46, 57, 69, 81, 80, 99, 87, 33, 45, 43, 66, 28, 30, 54, 23, 79, 69,
56, 24, 82, 58, 37, 56, 82, 23, 78, 63, 64, 37, 66, 36, 41, 71, 48, 42, 26, 45,
26, 86, 64, 54]}, 'u500_03': {'capacity': 150, 'num_items': 500,
'items': [64, 42, 86, 65, 47, 68, 20, 45, 69, 78,
44, 96, 50, 27, 58, 55, 81, 87, 76, 38,
79, 71, 60, 76, 91, 69, 77, 57, 33, 22,
76, 51, 66, 90, 34, 46, 74, 62, 93, 74,
29, 22, 73, 26, 72, 41, 91, 88, 95, 35,
84, 32, 59, 56, 84, 71, 78, 82, 78, 52,
71, 26, 66, 84, 76, 95, 80, 50, 53, 30,
82, 38, 45, 99, 51, 98, 100, 88, 81,
77, 99, 97, 31, 54, 47, 45, 36, 96, 96,
74, 77, 98, 69, 22, 40, 39, 81, 90, 73,
84, 53, 73, 81, 51, 38, 43, 64, 28, 83,
28, 66, 22, 56, 61, 72, 69, 55, 20, 50,
52, 95, 89, 32, 60, 29, 90, 20, 90, 41,
37, 95, 20, 84, 33, 28, 40, 91, 39, 63,
66, 29, 74, 97, 41, 81, 53, 22, 32, 91,
61, 33, 91, 55, 56, 57, 44, 60, 55, 92,
39, 38, 100, 30, 65, 22, 78, 84, 32,
51, 52, 47, 62, 63, 25, 42, 59, 24, 88,
61, 71, 23, 48, 78, 85, 92, 39, 31, 76,
87, 54, 61, 66, 40, 22, 74, 99, 96, 73,
24, 43, 93, 47, 51, 22, 49, 39, 21, 72,
93, 72, 49, 68, 71, 82, 44, 25, 82, 74,
59, 28, 33, 61, 90, 97, 62, 42, 100,
50, 31, 84, 81, 27, 45, 84, 54, 34, 79,
100, 63, 48, 68, 46, 74, 65, 35, 66,
53, 27, 70, 86, 49, 45, 86, 74, 64, 73,
93, 34, 97, 80, 24, 87, 100, 75, 89,
78, 46, 31, 68, 63, 78, 28, 96, 54, 64,
31, 65, 90, 41, 47, 71, 51, 63, 44, 93,
46, 46, 83, 68, 57, 89, 35, 99, 39, 24,
69, 64, 25, 85, 65, 81, 61, 40, 64, 88,
43, 99, 53, 98, 70, 38, 75, 23, 80, 72,
97, 89, 80, 38, 30, 34, 22, 61, 48, 22,
28, 99, 55, 89, 67, 24, 27, 91, 90, 20,
36, 77, 44, 24, 60, 96, 83, 53, 76, 27,
91, 58, 78, 23, 31, 99, 42, 64, 39, 73,
43, 36, 76, 97, 41, 90, 24, 82, 55, 93,
63, 61, 39, 73, 54, 77, 100, 46, 69,
74, 41, 32, 56, 68, 98, 61, 28, 21, 30,
47, 43, 54, 33, 31, 38, 49, 40, 44, 93,
20, 81, 71, 36, 71, 36, 42, 56, 85, 23,
86, 88, 95, 61, 41, 34, 74, 37, 82, 30,
98, 86, 37, 93, 100, 69, 25, 54, 47,
58, 50, 87, 90, 45, 71, 70, 38, 49, 42,
33, 78, 48, 94, 99, 100, 84, 91, 27,
69, 52, 64, 99, 30, 34, 55, 96, 92, 48,
88, 76, 38, 73, 90, 99, 45, 84, 94, 82,
28, 35, 94, 100, 44, 23, 58, 23, 35,
84, 75, 30, 58, 61, 61, 100, 63, 99,
85, 60, 78, 56, 76, 61, 59, 93, 83, 84,
89, 59, 75, 32, 21, 62, 27, 64, 44,
83]},
'u500_04': {'capacity': 150, 'num_items': 500,
'items': [68, 90, 38, 98, 44, 66, 76, 67, 65, 81, 95, 62, 34, 33, 56, 75, 40, 72, 49, 95,
59, 40, 53, 27, 70, 27, 72, 92, 79, 66, 92, 47, 87, 32, 51, 94, 22, 79, 75, 70,
58, 85, 37, 68, 69, 47, 63, 37, 53, 90, 85, 88, 68, 100, 86, 93, 26, 44, 77,
72, 46, 58, 44, 49, 100, 72, 76, 74, 78, 30, 79, 30, 88, 29, 70, 69, 26, 53,
86, 48, 55, 30, 95, 22, 79, 94, 54, 43, 84, 51, 80, 90, 61, 43, 71, 72, 82, 83,
91, 56, 42, 45, 80, 73, 62, 95, 53, 40, 42, 63, 80, 79, 86, 59, 22, 62, 72, 51,
60, 55, 56, 92, 56, 55, 51, 34, 100, 89, 64, 99, 87, 74, 38, 28, 50, 86, 92,
98, 30, 30, 89, 51, 65, 31, 60, 85, 79, 39, 27, 61, 84, 41, 53, 77, 77, 94, 86,
91, 49, 47, 35, 28, 82, 73, 34, 92, 51, 35, 51, 47, 64, 89, 72, 89, 22, 52, 75,
85, 73, 83, 56, 58, 57, 64, 50, 66, 26, 80, 61, 54, 40, 89, 46, 45, 59, 51, 79,
73, 95, 42, 21, 64, 73, 68, 65, 100, 50, 81, 55, 71, 44, 63, 76, 36, 73, 74,
98, 36, 97, 23, 58, 50, 70, 75, 97, 76, 24, 72, 34, 36, 67, 45, 55, 94, 63,
100, 95, 54, 40, 62, 68, 87, 48, 37, 85, 73, 62, 22, 23, 33, 81, 41, 27, 95,
46, 69, 45, 39, 32, 98, 41, 46, 100, 86, 84, 39, 67, 34, 92, 59, 43, 21, 56,
88, 26, 35, 51, 22, 100, 96, 49, 95, 38, 62, 63, 97, 42, 62, 100, 43, 44, 77,
97, 94, 68, 23, 50, 36, 89, 58, 97, 27, 64, 65, 54, 58, 24, 35, 33, 63, 32, 50,
58, 90, 44, 50, 48, 21, 72, 75, 21, 74, 28, 95, 77, 69, 96, 24, 57, 85, 72, 96,
50, 83, 65, 62, 99, 93, 23, 77, 94, 31, 50, 33, 79, 73, 23, 55, 44, 78, 84, 66,
31, 59, 97, 95, 22, 76, 90, 66, 29, 100, 90, 92, 50, 49, 47, 43, 37, 40, 60,
52, 54, 99, 34, 46, 88, 97, 85, 39, 32, 51, 95, 54, 99, 86, 48, 90, 28, 25, 86,
39, 74, 26, 38, 60, 41, 67, 80, 33, 37, 62, 71, 87, 31, 72, 84, 84, 53, 85, 32,
24, 88, 54, 28, 36, 91, 61, 29, 68, 69, 35, 30, 88, 85, 87, 70, 70, 59, 26, 73,
27, 44, 27, 35, 38, 65, 21, 69, 59, 35, 70, 40, 84, 42, 92, 24, 46, 78, 60, 76,
43, 49, 79, 65, 24, 28, 43, 26, 93, 62, 91, 21, 21, 32, 34, 86, 27, 79, 34, 88,
93, 58, 77, 62, 87, 99, 61, 83, 75, 99, 93, 39, 85, 31, 69, 48, 67, 50, 24, 49,
82, 97, 86, 21, 86, 41, 100, 84, 77]},
'u500_05': {'capacity': 150, 'num_items': 500,
'items': [87, 70, 43, 62, 40, 37, 71, 34, 29, 70, 41, 78, 74, 51, 71, 47, 21, 32, 37, 80,
48, 93, 22, 46, 96, 44, 94, 99, 100, 65, 61, 34, 25, 35, 60, 52, 90, 81, 93,
74, 85, 43, 21, 89, 100, 56, 55, 88, 52, 63, 40, 41, 62, 35, 77, 72, 75, 93,
55, 95, 54, 87, 38, 84, 83, 88, 37, 65, 58, 89, 89, 48, 85, 25, 100, 28, 20,
96, 52, 100, 94, 94, 69, 94, 39, 62, 86, 43, 61, 88, 78, 72, 71, 31, 45, 72,
87, 60, 91, 100, 66, 44, 83, 23, 22, 81, 22, 55, 67, 73, 68, 42, 83, 40, 86,
63, 33, 24, 54, 48, 41, 56, 48, 29, 51, 78, 85, 68, 35, 99, 74, 42, 26, 49, 65,
92, 51, 43, 97, 91, 24, 79, 30, 58, 76, 59, 92, 94, 43, 31, 87, 59, 56, 74, 91,
88, 85, 70, 59, 80, 54, 66, 55, 61, 64, 80, 53, 80, 44, 74, 22, 91, 91, 83, 51,
57, 20, 83, 46, 54, 56, 76, 24, 41, 26, 37, 91, 52, 94, 94, 49, 61, 69, 79, 38,
78, 25, 57, 70, 81, 57, 34, 22, 58, 99, 39, 99, 29, 34, 58, 94, 46, 41, 56, 86,
92, 81, 82, 38, 42, 99, 59, 73, 57, 59, 67, 44, 29, 53, 54, 40, 83, 55, 66, 72,
80, 25, 92, 78, 97, 28, 99, 73, 66, 44, 59, 95, 53, 81, 83, 92, 61, 32, 31, 38,
29, 44, 90, 68, 35, 78, 56, 25, 26, 61, 90, 20, 43, 37, 65, 63, 39, 95, 87, 83,
97, 41, 87, 69, 75, 82, 45, 80, 78, 89, 98, 32, 24, 55, 63, 92, 33, 95, 80, 27,
62, 97, 36, 73, 67, 35, 82, 37, 61, 82, 45, 26, 56, 91, 53, 71, 78, 33, 20, 26,
97, 90, 30, 44, 86, 82, 25, 56, 34, 54, 97, 91, 42, 74, 83, 38, 44, 44, 26, 66,
35, 45, 80, 42, 97, 26, 61, 59, 92, 92, 81, 33, 86, 87, 100, 69, 25, 51, 32,
94, 50, 42, 21, 90, 52, 32, 66, 77, 22, 64, 51, 41, 81, 54, 70, 67, 84, 72, 47,
92, 82, 96, 58, 80, 95, 36, 60, 42, 41, 51, 29, 99, 57, 21, 48, 30, 65, 55, 62,
60, 49, 80, 63, 25, 35, 54, 27, 68, 64, 35, 52, 87, 40, 52, 41, 59, 56, 77, 41,
43, 73, 87, 56, 76, 29, 46, 39, 92, 40, 72, 54, 20, 56, 68, 27, 23, 62, 45, 95,
90, 27, 36, 79, 88, 51, 95, 96, 66, 57, 96, 25, 33, 84, 67, 75, 78, 61, 53, 42,
72, 40, 60, 99, 32, 99, 70, 39, 90, 73, 71, 23, 61, 49, 100, 35, 45, 34, 84,
49, 100, 75, 46, 85, 83, 93, 90, 68, 20, 100, 73, 25, 66, 70, 40, 83, 37, 29,
29, 87, 95, 42, 95, 100, 96, 55]},
'u500_06': {'capacity': 150, 'num_items': 500,
'items': [65, 58, 79, 76, 84, 63, 91, 81, 30, 57, 71, 67, 33, 27, 99, 36, 48, 66, 68, 66,
40, 87, 99, 59, 42, 50, 51, 87, 98, 64, 32, 41, 56, 85, 87, 95, 46, 75, 37, 54,
58, 82, 57, 26, 94, 31, 71, 95, 27, 29, 38, 37, 55, 94, 70, 90, 29, 98, 27, 95,
98, 95, 98, 51, 47, 71, 27, 61, 49, 66, 93, 89, 34, 60, 33, 97, 74, 95, 44, 96,
88, 89, 84, 52, 50, 53, 90, 94, 98, 46, 62, 68, 45, 77, 49, 82, 51, 95, 33, 94,
98, 75, 47, 42, 64, 34, 51, 68, 27, 42, 87, 65, 44, 62, 84, 75, 70, 44, 84, 54,
92, 58, 50, 61, 95, 59, 22, 24, 56, 59, 45, 54, 43, 70, 97, 97, 29, 42, 55, 67,
91, 26, 61, 65, 28, 26, 54, 96, 49, 46, 100, 68, 58, 43, 36, 78, 40, 22, 41,
82, 46, 58, 29, 97, 62, 69, 57, 67, 85, 32, 93, 43, 47, 99, 20, 81, 70, 91, 23,
80, 43, 81, 22, 76, 95, 29, 60, 50, 99, 38, 79, 20, 67, 63, 89, 85, 97, 100,
33, 100, 43, 31, 57, 45, 48, 72, 26, 66, 30, 81, 43, 62, 86, 64, 89, 22, 100,
73, 38, 63, 32, 31, 33, 88, 72, 74, 100, 57, 97, 49, 80, 98, 71, 82, 28, 67,
88, 57, 44, 78, 74, 47, 57, 96, 47, 82, 55, 90, 63, 55, 87, 100, 69, 94, 71,
91, 74, 76, 68, 82, 96, 85, 96, 85, 79, 71, 56, 86, 46, 55, 44, 35, 29, 42, 65,
49, 82, 73, 70, 63, 94, 63, 71, 86, 27, 93, 80, 42, 45, 93, 69, 76, 61, 29, 81,
46, 42, 74, 45, 88, 96, 40, 31, 47, 82, 60, 43, 20, 80, 69, 46, 90, 34, 81, 59,
43, 61, 28, 56, 32, 90, 60, 66, 70, 77, 43, 92, 85, 45, 74, 40, 51, 48, 30, 41,
63, 71, 43, 24, 91, 48, 65, 41, 34, 47, 88, 73, 57, 50, 68, 80, 34, 70, 96, 80,
26, 77, 53, 82, 78, 74, 87, 69, 97, 87, 64, 31, 77, 25, 60, 20, 66, 48, 80, 77,
90, 69, 61, 93, 41, 35, 28, 68, 59, 27, 34, 24, 56, 42, 29, 52, 42, 27, 83, 78,
40, 37, 21, 77, 43, 45, 76, 53, 36, 61, 52, 53, 41, 76, 83, 49, 38, 71, 64, 89,
48, 32, 69, 80, 88, 41, 46, 37, 60, 63, 20, 47, 40, 93, 46, 84, 77, 92, 51, 87,
49, 75, 58, 61, 83, 53, 22, 79, 80, 92, 96, 49, 53, 22, 50, 71, 73, 66, 23, 70,
76, 93, 46, 39, 40, 93, 41, 36, 60, 35, 25, 99, 79, 52, 22, 66, 44, 68, 73, 60,
56, 76, 95, 95, 53, 37, 68, 87, 20, 38, 95, 95, 86, 47, 68, 66, 37, 44, 47, 77,
26, 90, 97, 86, 57]}, 'u500_07': {'capacity': 150, 'num_items': 500,
'items': [72, 83, 38, 84, 82, 88, 47, 43, 59,
92, 78, 25, 25, 47, 65, 42, 41, 36,
54, 43, 87, 51, 65, 98, 82, 34, 21,
94, 100, 80, 95, 32, 23, 26, 93,
70, 96, 79, 68, 93, 74, 76, 99, 75,
44, 94, 93, 38, 44, 45, 49, 22, 39,
87, 74, 25, 59, 22, 44, 70, 51, 68,
33, 25, 77, 55, 75, 87, 42, 79, 50,
78, 43, 20, 88, 56, 93, 75, 56, 36,
70, 47, 94, 24, 35, 47, 26, 48, 40,
48, 77, 30, 36, 96, 63, 47, 22, 60,
51, 84, 90, 46, 98, 59, 94, 59, 54,
38, 79, 77, 73, 61, 21, 21, 83, 81,
34, 37, 76, 49, 23, 75, 79, 98,
100, 29, 88, 83, 80, 100, 56, 61,
31, 37, 43, 69, 78, 28, 41, 82, 56,
31, 25, 22, 46, 68, 63, 75, 64, 76,
65, 98, 77, 36, 21, 86, 63, 95, 61,
22, 45, 49, 35, 63, 43, 71, 23, 53,
100, 41, 50, 51, 26, 54, 62, 27,
68, 73, 79, 47, 53, 53, 56, 85, 93,
36, 97, 29, 65, 20, 32, 49, 83, 33,
49, 90, 93, 64, 71, 45, 59, 74, 77,
58, 91, 88, 60, 67, 44, 42, 89, 79,
40, 88, 95, 81, 73, 82, 23, 20, 22,
92, 75, 23, 74, 25, 79, 62, 48, 21,
74, 28, 78, 73, 31, 44, 28, 37, 77,
52, 23, 82, 97, 52, 90, 94, 28, 95,
37, 51, 29, 31, 81, 61, 24, 92, 70,
56, 100, 61, 85, 83, 53, 44, 70,
65, 25, 39, 71, 26, 63, 99, 64, 97,
88, 54, 91, 53, 96, 44, 49, 94, 63,
65, 90, 37, 30, 28, 53, 83, 41, 54,
89, 32, 49, 40, 80, 63, 89, 74, 89,
20, 25, 75, 31, 56, 92, 85, 40, 97,
56, 100, 55, 35, 27, 96, 89, 29,
44, 26, 49, 73, 72, 50, 52, 77, 35,
97, 79, 45, 75, 62, 91, 50, 37, 25,
65, 97, 62, 74, 81, 72, 100, 57,
49, 83, 23, 92, 63, 55, 81, 64, 88,
50, 74, 52, 25, 97, 48, 43, 49, 33,
86, 35, 71, 21, 90, 95, 88, 80, 93,
73, 60, 96, 65, 56, 32, 88, 67, 69,
63, 26, 51, 59, 85, 41, 91, 70, 92,
44, 53, 49, 91, 33, 57, 26, 99, 24,
48, 52, 92, 43, 46, 47, 96, 36, 88,
55, 55, 76, 51, 87, 44, 58, 34, 69,
43, 56, 37, 74, 82, 64, 75, 99, 36,
54, 76, 72, 21, 33, 61, 87, 54, 82,
94, 87, 46, 71, 83, 71, 44, 87, 20,
31, 67, 93, 100, 94, 97, 64, 63,
36, 89, 48, 34, 41, 42, 74, 30, 48,
73, 37, 100, 49, 58, 50, 50, 86,
79, 91, 98, 63, 24, 82, 24, 48, 26,
98, 82, 75, 62, 55, 82, 87, 74, 87,
32, 73, 28, 95, 84, 29, 82, 68, 70,
49, 88, 23, 78, 96]},
'u500_08': {'capacity': 150, 'num_items': 500,
'items': [73, 99, 36, 56, 65, 46, 60, 32, 77, 41, 32, 94, 77, 63, 35, 78, 24, 95, 96, 81,
86, 75, 36, 21, 48, 28, 95, 62, 91, 40, 26, 88, 43, 45, 22, 54, 28, 48, 88, 80,
35, 81, 69, 94, 96, 95, 67, 30, 29, 59, 40, 65, 31, 74, 39, 57, 95, 46, 32, 82,
55, 36, 47, 85, 80, 36, 31, 40, 82, 53, 59, 57, 31, 82, 72, 38, 69, 53, 74, 79,
97, 42, 49, 74, 86, 37, 89, 63, 75, 84, 38, 42, 59, 80, 23, 20, 95, 46, 98, 97,
64, 66, 84, 24, 25, 20, 68, 32, 38, 48, 27, 74, 86, 54, 81, 73, 77, 40, 48, 81,
86, 59, 87, 60, 27, 81, 22, 29, 62, 41, 76, 57, 31, 79, 30, 83, 29, 65, 97, 49,
52, 42, 20, 85, 89, 93, 39, 29, 33, 21, 26, 73, 28, 28, 38, 33, 96, 50, 73, 53,
31, 100, 27, 85, 37, 42, 79, 60, 95, 21, 87, 34, 46, 88, 57, 41, 66, 38, 79,
27, 85, 72, 83, 82, 94, 56, 24, 83, 32, 49, 78, 30, 33, 50, 37, 49, 25, 44, 86,
22, 54, 38, 81, 77, 39, 47, 22, 51, 40, 70, 83, 86, 69, 73, 31, 80, 84, 70, 55,
68, 27, 25, 25, 27, 48, 30, 83, 42, 26, 63, 72, 74, 83, 55, 36, 44, 95, 81, 73,
53, 63, 47, 88, 86, 48, 21, 89, 74, 70, 63, 56, 68, 67, 56, 44, 64, 75, 96, 80,
58, 75, 50, 43, 42, 31, 94, 64, 77, 89, 30, 45, 74, 53, 57, 56, 47, 31, 55, 58,
28, 72, 27, 35, 68, 68, 82, 67, 47, 24, 49, 40, 67, 96, 80, 88, 39, 93, 32, 47,
81, 99, 38, 51, 97, 31, 55, 40, 63, 93, 78, 30, 39, 55, 67, 24, 72, 71, 43, 31,
79, 77, 42, 73, 62, 93, 90, 50, 98, 36, 76, 72, 35, 48, 53, 33, 64, 51, 32, 82,
68, 55, 51, 84, 72, 50, 30, 21, 25, 43, 55, 56, 65, 73, 24, 100, 21, 47, 97,
90, 83, 75, 43, 61, 51, 32, 74, 63, 91, 21, 92, 71, 74, 42, 100, 21, 63, 72,
42, 54, 57, 42, 81, 68, 79, 38, 47, 21, 22, 55, 61, 40, 35, 76, 83, 100, 31,
62, 36, 75, 82, 50, 80, 38, 68, 21, 84, 72, 67, 84, 98, 39, 68, 86, 63, 98, 67,
75, 37, 35, 41, 63, 67, 57, 26, 53, 36, 56, 92, 89, 76, 49, 23, 23, 49, 24, 56,
74, 34, 64, 100, 82, 25, 30, 72, 82, 68, 67, 57, 57, 40, 33, 40, 27, 52, 89,
52, 97, 31, 48, 50, 57, 37, 77, 32, 97, 67, 93, 70, 20, 38, 71, 49, 78, 40, 94,
21, 66, 96, 86, 85, 99, 79, 85, 77, 68, 37, 41, 68, 27, 100, 96, 74, 46, 79,
43, 59, 50, 39, 42, 80]}, 'u500_09': {'capacity': 150, 'num_items': 500,
'items': [87, 62, 73, 65, 73, 72, 77, 85,
33, 39, 58, 100, 87, 24, 35,
34, 28, 70, 49, 36, 65, 27, 75,
99, 99, 59, 79, 99, 90, 64, 42,
82, 58, 56, 89, 80, 97, 82, 44,
92, 29, 39, 90, 99, 68, 40, 23,
95, 39, 77, 59, 74, 94, 67, 72,
90, 60, 49, 21, 20, 49, 33, 85,
84, 50, 95, 52, 31, 46, 96, 73,
66, 33, 90, 77, 79, 27, 91, 54,
62, 44, 78, 35, 62, 97, 25, 79,
31, 26, 87, 30, 24, 31, 24, 53,
90, 66, 21, 58, 28, 81, 61,
100, 33, 95, 77, 77, 75, 52,
58, 95, 47, 27, 29, 74, 84, 49,
25, 57, 90, 61, 59, 99, 70, 33,
25, 54, 66, 32, 20, 32, 47, 28,
71, 33, 55, 81, 56, 21, 83, 67,
46, 96, 50, 94, 55, 57, 100,
35, 50, 21, 97, 30, 34, 57, 74,
99, 63, 40, 96, 83, 37, 59, 72,
59, 50, 84, 88, 22, 97, 81, 22,
55, 31, 66, 23, 88, 89, 28, 77,
78, 41, 93, 94, 45, 84, 48, 75,
38, 68, 34, 37, 40, 78, 60, 94,
58, 71, 70, 30, 77, 34, 96, 58,
70, 61, 27, 55, 48, 80, 26, 59,
31, 55, 80, 75, 73, 48, 22, 35,
97, 46, 98, 48, 49, 28, 67, 94,
46, 46, 37, 45, 48, 42, 31, 67,
23, 98, 58, 55, 24, 60, 48, 95,
93, 49, 56, 90, 31, 24, 71, 39,
69, 32, 82, 75, 60, 39, 80, 61,
43, 34, 80, 69, 21, 59, 82, 54,
26, 51, 96, 76, 76, 45, 41, 73,
91, 23, 98, 90, 59, 43, 52, 48,
87, 97, 51, 72, 77, 59, 83, 65,
40, 79, 30, 31, 99, 40, 42, 66,
47, 67, 50, 72, 62, 95, 75, 81,
36, 36, 70, 89, 95, 62, 56, 23,
37, 50, 46, 30, 64, 94, 65, 55,
24, 28, 96, 31, 57, 72, 96, 63,
40, 79, 89, 97, 50, 37, 93, 52,
86, 74, 47, 84, 77, 48, 54, 97,
70, 29, 40, 74, 71, 46, 46, 63,
48, 74, 25, 77, 46, 80, 35, 56,
65, 49, 38, 26, 81, 80, 73, 38,
27, 97, 47, 88, 42, 62, 45, 33,
78, 35, 63, 25, 74, 63, 41, 81,
68, 78, 52, 30, 22, 100, 42,
53, 60, 58, 92, 74, 67, 72, 30,
48, 65, 23, 94, 99, 67, 57, 73,
44, 63, 53, 87, 54, 62, 100,
30, 20, 25, 94, 85, 68, 59, 82,
52, 100, 89, 49, 74, 44, 23,
39, 21, 65, 80, 93, 36, 97, 74,
37, 52, 94, 60, 77, 57, 71, 61,
92, 98, 86, 55, 89, 24, 88, 53,
85, 39, 89, 64, 45, 52, 71, 79,
23, 50, 95, 55, 36, 95, 41, 36,
94, 52, 36, 76, 72, 52, 42, 27,
61, 55, 64, 30, 22, 53, 71, 51,
37, 96, 74, 63, 54, 81, 77, 55,
29, 89, 41]},
'u500_10': {'capacity': 150, 'num_items': 500,
'items': [36, 76, 68, 31, 48, 56, 67, 48, 32, 46, 89, 40, 48, 39, 63, 74, 54, 80, 26, 40,
74, 99, 70, 66, 89, 79, 20, 87, 94, 76, 90, 84, 25, 93, 88, 28, 50, 77, 82, 96,
80, 82, 83, 39, 50, 35, 38, 40, 91, 84, 74, 96, 25, 70, 38, 77, 35, 71, 31, 98,
73, 31, 51, 34, 35, 40, 68, 100, 33, 52, 73, 39, 30, 82, 40, 32, 88, 58, 62,
79, 22, 45, 91, 69, 61, 83, 49, 87, 33, 54, 97, 100, 28, 61, 53, 80, 81, 68,
93, 87, 72, 31, 61, 53, 42, 24, 71, 75, 25, 59, 40, 70, 67, 43, 72, 91, 55, 82,
96, 28, 68, 46, 45, 95, 83, 100, 39, 40, 35, 72, 28, 58, 91, 95, 61, 72, 65,
47, 53, 45, 84, 80, 85, 99, 67, 39, 72, 83, 56, 27, 86, 45, 50, 52, 90, 70, 52,
45, 81, 23, 38, 60, 31, 58, 51, 74, 42, 79, 22, 28, 52, 34, 67, 85, 57, 49, 24,
90, 75, 60, 32, 84, 89, 71, 92, 69, 57, 35, 70, 57, 32, 48, 94, 79, 37, 77, 49,
72, 89, 91, 42, 82, 52, 46, 46, 96, 97, 87, 73, 55, 89, 67, 43, 28, 91, 88, 74,
49, 71, 20, 37, 20, 41, 98, 41, 36, 82, 87, 23, 31, 86, 92, 23, 31, 71, 100,
34, 27, 24, 54, 21, 60, 87, 77, 24, 100, 35, 76, 90, 87, 64, 37, 69, 74, 76,
89, 53, 76, 86, 72, 88, 62, 73, 100, 61, 57, 55, 76, 41, 45, 93, 42, 21, 68,
68, 56, 56, 47, 95, 23, 68, 77, 40, 74, 79, 88, 69, 82, 56, 89, 80, 49, 24, 57,
40, 20, 24, 77, 47, 75, 47, 39, 27, 63, 93, 64, 84, 63, 85, 52, 41, 28, 72, 63,
46, 24, 71, 22, 67, 28, 46, 47, 64, 54, 78, 32, 63, 82, 25, 97, 66, 66, 38, 37,
33, 78, 76, 35, 49, 68, 34, 99, 90, 82, 41, 81, 67, 82, 50, 46, 75, 85, 38, 62,
51, 98, 92, 56, 91, 67, 26, 67, 26, 71, 81, 74, 36, 70, 48, 27, 42, 94, 39, 54,
82, 49, 58, 27, 33, 26, 32, 23, 52, 74, 35, 46, 37, 57, 37, 90, 20, 40, 29, 43,
23, 58, 99, 83, 73, 38, 21, 47, 84, 22, 63, 93, 61, 74, 73, 48, 42, 52, 77, 31,
76, 33, 28, 54, 71, 66, 93, 69, 78, 37, 93, 43, 44, 51, 96, 44, 94, 91, 84, 49,
98, 46, 57, 27, 65, 30, 20, 29, 51, 99, 97, 74, 98, 37, 38, 21, 56, 91, 42, 49,
39, 44, 26, 66, 55, 63, 76, 22, 54, 31, 20, 63, 50, 55, 83, 89, 89, 63, 98, 86,
67, 85, 81, 45, 64, 44, 23, 25, 77, 62, 34, 72, 77, 91, 62, 25, 72, 38, 24, 25,
98, 84, 54, 20, 58, 38]}, 'u500_11': {'capacity': 150, 'num_items': 500,
'items': [52, 77, 82, 54, 60, 91, 86, 68,
29, 52, 42, 47, 55, 61, 70, 71,
24, 62, 36, 91, 66, 33, 57, 34,
36, 26, 89, 61, 61, 92, 79, 84,
47, 85, 72, 25, 35, 66, 72, 55,
66, 21, 94, 87, 66, 31, 72, 49,
55, 75, 44, 76, 77, 63, 59, 40,
67, 85, 83, 64, 29, 41, 23, 72,
70, 52, 41, 57, 26, 21, 84, 24,
48, 36, 71, 84, 21, 35, 92, 89,
59, 59, 24, 45, 96, 80, 32, 27,
25, 44, 100, 74, 60, 55, 86,
48, 100, 52, 53, 26, 99, 85,
43, 64, 70, 84, 75, 73, 28, 40,
75, 87, 89, 93, 93, 34, 58, 88,
21, 36, 38, 28, 70, 32, 70, 37,
42, 54, 25, 95, 79, 86, 25, 47,
37, 81, 79, 30, 67, 63, 99, 38,
64, 98, 84, 67, 38, 36, 93, 38,
43, 84, 35, 94, 83, 38, 85, 80,
86, 64, 79, 31, 91, 34, 46, 60,
22, 38, 22, 87, 20, 97, 76,
100, 81, 20, 34, 46, 100, 93,
66, 31, 23, 42, 22, 32, 58, 78,
41, 73, 99, 38, 87, 92, 58, 32,
25, 59, 45, 42, 63, 21, 53, 53,
26, 93, 42, 27, 51, 61, 99, 45,
84, 79, 95, 91, 23, 88, 40, 98,
21, 45, 30, 70, 46, 75, 25, 40,
53, 51, 44, 71, 79, 68, 43, 64,
82, 60, 78, 69, 95, 38, 59, 90,
22, 68, 46, 73, 69, 69, 25, 42,
83, 31, 36, 47, 82, 74, 72, 96,
87, 41, 21, 27, 42, 22, 31, 95,
38, 90, 94, 78, 97, 31, 35, 32,
82, 33, 87, 89, 70, 39, 41, 61,
48, 47, 57, 64, 82, 20, 37, 50,
32, 94, 72, 44, 90, 92, 82, 30,
89, 95, 56, 79, 21, 27, 91, 78,
69, 47, 36, 100, 20, 32, 43,
64, 68, 63, 42, 91, 61, 37, 36,
59, 99, 38, 26, 76, 81, 95, 22,
88, 40, 23, 64, 93, 55, 27, 28,
68, 78, 80, 99, 90, 52, 98, 57,
34, 51, 37, 38, 22, 44, 87, 92,
93, 43, 86, 51, 59, 86, 71, 83,
27, 49, 89, 38, 72, 56, 79, 63,
92, 90, 64, 46, 66, 93, 54, 59,
94, 87, 87, 35, 74, 57, 58, 33,
79, 50, 40, 92, 67, 99, 52, 36,
72, 63, 98, 69, 32, 61, 38, 32,
31, 42, 81, 31, 55, 81, 44, 71,
67, 93, 32, 69, 68, 93, 61, 42,
63, 85, 62, 71, 35, 40, 64, 22,
66, 92, 93, 66, 93, 22, 26, 97,
61, 58, 87, 26, 59, 43, 71, 65,
30, 55, 88, 40, 88, 78, 95, 61,
54, 23, 56, 38, 46, 41, 45, 51,
29, 50, 28, 73, 66, 30, 40, 98,
72, 88, 97, 94, 32, 46, 66, 92,
60, 21, 65, 64, 89, 93, 87, 57,
62, 48, 83, 76, 36, 28, 72, 50,
96, 46, 36, 76, 38, 88, 98, 25,
28]},
'u500_12': {'capacity': 150, 'num_items': 500,
'items': [20, 53, 71, 21, 86, 92, 39, 73, 24, 34, 64, 82, 30, 55, 42, 23, 46, 70, 64, 45,
26, 33, 69, 85, 82, 57, 30, 69, 99, 21, 68, 26, 62, 76, 63, 99, 51, 60, 71, 64,
96, 27, 74, 90, 35, 35, 70, 66, 50, 64, 73, 98, 61, 72, 24, 51, 78, 93, 28, 76,
77, 51, 90, 38, 79, 87, 94, 78, 66, 53, 23, 32, 75, 27, 53, 95, 48, 29, 54, 85,
41, 52, 62, 74, 82, 93, 38, 98, 94, 60, 21, 49, 57, 32, 73, 81, 43, 73, 97, 32,
24, 96, 56, 61, 42, 82, 58, 91, 27, 85, 43, 59, 70, 60, 91, 81, 89, 20, 96, 40,
54, 24, 20, 31, 70, 65, 75, 92, 33, 90, 20, 55, 75, 89, 75, 70, 52, 73, 47, 85,
44, 35, 25, 41, 41, 25, 71, 85, 88, 67, 33, 27, 44, 83, 45, 84, 84, 62, 30, 43,
35, 74, 23, 65, 38, 27, 70, 63, 81, 78, 31, 40, 23, 32, 38, 92, 100, 31, 54,
70, 48, 20, 36, 78, 73, 90, 54, 100, 60, 67, 69, 79, 24, 67, 87, 39, 30, 91,
26, 41, 36, 75, 75, 96, 20, 47, 27, 28, 51, 75, 28, 42, 67, 70, 47, 20, 71, 81,
66, 24, 95, 87, 78, 55, 75, 58, 81, 54, 94, 93, 45, 91, 100, 48, 62, 44, 51,
94, 96, 74, 81, 31, 71, 37, 88, 26, 83, 74, 31, 48, 70, 27, 46, 27, 96, 36, 52,
75, 22, 92, 29, 68, 64, 21, 76, 40, 97, 73, 95, 45, 26, 47, 51, 78, 89, 23, 61,
23, 74, 31, 97, 56, 74, 100, 21, 51, 45, 40, 50, 94, 55, 77, 60, 21, 91, 37,
80, 52, 91, 57, 64, 60, 35, 93, 43, 63, 31, 32, 21, 55, 80, 81, 26, 39, 61, 99,
94, 80, 41, 96, 62, 39, 62, 23, 34, 45, 58, 69, 48, 32, 96, 25, 73, 76, 99, 35,
92, 71, 28, 75, 91, 42, 64, 91, 56, 43, 78, 51, 63, 49, 32, 25, 70, 72, 66, 21,
26, 87, 50, 85, 66, 41, 26, 100, 82, 73, 60, 57, 90, 20, 35, 67, 39, 32, 31,
90, 43, 25, 54, 93, 50, 35, 51, 91, 48, 22, 95, 96, 100, 22, 72, 98, 46, 94,
41, 62, 21, 48, 89, 29, 79, 88, 90, 66, 82, 50, 98, 71, 31, 52, 26, 63, 70, 33,
74, 86, 72, 67, 52, 53, 57, 63, 36, 78, 41, 69, 44, 44, 66, 46, 68, 99, 52, 98,
52, 69, 37, 47, 23, 28, 49, 61, 44, 55, 97, 55, 49, 79, 78, 22, 35, 78, 100,
25, 62, 43, 63, 49, 75, 33, 36, 44, 72, 92, 61, 94, 43, 89, 56, 34, 37, 77, 36,
68, 92, 31, 38, 89, 67, 96, 79, 51, 99, 59, 82, 64, 95, 48, 51, 95, 65, 73, 81,
72, 59, 84, 25, 78, 73, 51]}, 'u500_13': {'capacity': 150, 'num_items': 500,
'items': [88, 24, 89, 54, 78, 70, 93,
87, 43, 45, 22, 53, 29, 30,
95, 28, 58, 56, 84, 68, 30,
27, 80, 79, 68, 52, 59, 64,
58, 36, 50, 94, 55, 88, 45,
32, 37, 62, 20, 68, 67, 53,
45, 96, 29, 100, 25, 36,
50, 60, 53, 39, 77, 91, 55,
22, 80, 72, 56, 62, 90, 30,
60, 100, 41, 61, 86, 96,
92, 71, 35, 34, 28, 44, 58,
21, 88, 35, 62, 35, 47,
100, 21, 63, 22, 49, 46,
54, 38, 38, 76, 78, 43, 39,
84, 48, 100, 38, 25, 78,
86, 28, 22, 68, 64, 54, 21,
66, 75, 97, 35, 40, 85, 91,
83, 40, 42, 89, 51, 30, 83,
20, 21, 25, 20, 60, 79, 31,
91, 76, 41, 64, 87, 62, 95,
36, 22, 74, 58, 65, 50, 73,
70, 49, 85, 36, 48, 66, 96,
77, 50, 64, 66, 65, 61, 57,
79, 52, 22, 69, 36, 50, 61,
93, 23, 54, 91, 62, 91, 82,
37, 56, 99, 80, 29, 69, 57,
84, 47, 93, 94, 25, 69, 93,
96, 72, 87, 96, 94, 40, 61,
87, 85, 85, 92, 90, 24, 24,
69, 57, 92, 55, 30, 37, 57,
98, 74, 25, 52, 93, 40, 56,
46, 21, 40, 36, 79, 60, 76,
61, 90, 44, 44, 37, 81, 77,
95, 22, 69, 45, 26, 63,
100, 68, 63, 47, 61, 58,
93, 97, 91, 73, 36, 27, 32,
20, 22, 27, 93, 79, 63, 30,
40, 68, 72, 89, 26, 50, 28,
49, 55, 79, 100, 37, 75,
85, 79, 48, 31, 91, 82, 76,
40, 30, 24, 65, 39, 87, 20,
75, 65, 94, 95, 85, 64, 37,
63, 71, 44, 41, 52, 21,
100, 53, 27, 66, 22, 84,
59, 43, 85, 26, 83, 33, 55,
72, 38, 89, 80, 39, 45, 35,
37, 84, 87, 32, 64, 22, 35,
36, 77, 22, 70, 28, 30, 41,
59, 20, 37, 89, 53, 76, 75,
96, 43, 48, 52, 34, 28, 34,
76, 52, 54, 35, 31, 45, 70,
72, 49, 45, 59, 56, 64, 56,
31, 80, 58, 72, 100, 39,
21, 59, 75, 27, 88, 80, 84,
21, 39, 77, 20, 63, 47, 84,
50, 94, 28, 20, 36, 94, 57,
38, 61, 68, 73, 92, 80, 63,
58, 74, 97, 36, 30, 85, 55,
71, 68, 58, 98, 80, 66, 24,
76, 38, 45, 84, 67, 59, 54,
24, 49, 62, 71, 90, 27, 62,
20, 89, 39, 32, 55, 64, 68,
20, 64, 67, 73, 45, 77, 82,
78, 52, 28, 59, 93, 35, 71,
84, 97, 38, 65, 86, 93, 21,
99, 32, 74, 64, 30, 66, 79,
80, 25, 37, 84, 77, 75, 73,
89, 47, 34, 56, 70, 64, 32,
26, 83, 94, 64, 50, 40, 36,
61, 36, 66, 27, 53, 99, 22,
24, 23, 86, 99, 65, 78, 24,
27, 59, 29, 73, 64, 81, 49,
92, 25, 63, 30, 96, 100,
39]},
'u500_14': {'capacity': 150, 'num_items': 500,
'items': [36, 35, 92, 88, 49, 89, 23, 86, 80, 65, 21, 47, 55, 27, 99, 35, 40, 88, 45, 90,
54, 40, 24, 41, 91, 73, 99, 59, 96, 85, 72, 32, 20, 36, 61, 36, 39, 24, 50, 94,
22, 63, 45, 48, 27, 56, 51, 56, 83, 41, 49, 70, 90, 75, 85, 58, 47, 98, 26, 44,
31, 32, 36, 74, 48, 34, 96, 36, 96, 35, 39, 59, 38, 52, 34, 96, 45, 77, 29, 59,
76, 48, 95, 78, 77, 60, 66, 68, 22, 34, 46, 73, 92, 20, 34, 39, 76, 100, 76,
24, 42, 79, 72, 74, 69, 27, 69, 26, 97, 71, 78, 67, 42, 62, 97, 20, 43, 79, 30,
81, 69, 33, 47, 58, 83, 28, 20, 48, 29, 76, 21, 69, 71, 93, 67, 40, 74, 49, 51,
71, 27, 47, 28, 100, 74, 74, 95, 23, 63, 38, 35, 78, 27, 76, 52, 93, 32, 38,
71, 64, 83, 49, 44, 66, 100, 21, 97, 95, 51, 55, 97, 28, 77, 98, 65, 20, 44,
60, 38, 31, 61, 81, 97, 31, 41, 92, 26, 96, 48, 52, 49, 47, 42, 53, 82, 99, 90,
20, 41, 88, 21, 94, 87, 50, 61, 84, 62, 54, 89, 69, 43, 52, 42, 93, 64, 85, 86,
42, 64, 44, 45, 82, 20, 87, 27, 29, 75, 55, 97, 20, 86, 48, 24, 38, 56, 25, 70,
80, 78, 21, 62, 64, 48, 69, 22, 87, 61, 58, 77, 41, 86, 95, 58, 65, 88, 62, 96,
79, 30, 100, 56, 79, 49, 68, 55, 82, 45, 100, 92, 20, 49, 69, 67, 74, 44, 61,
20, 86, 52, 89, 83, 78, 100, 25, 100, 73, 21, 100, 52, 47, 48, 95, 71, 22, 79,
97, 50, 85, 68, 44, 74, 74, 75, 23, 52, 83, 76, 93, 100, 85, 77, 78, 30, 78,
89, 45, 56, 73, 81, 53, 91, 52, 44, 80, 47, 56, 70, 30, 52, 52, 47, 95, 98, 75,
81, 76, 21, 62, 51, 57, 56, 56, 46, 54, 36, 100, 62, 51, 75, 35, 72, 47, 27,
86, 27, 33, 25, 30, 72, 98, 52, 34, 31, 21, 36, 61, 41, 57, 81, 20, 47, 26, 47,
96, 39, 80, 90, 96, 78, 46, 92, 31, 83, 91, 68, 85, 73, 49, 46, 90, 59, 84, 25,
23, 49, 98, 25, 87, 75, 32, 95, 39, 44, 100, 40, 69, 75, 25, 71, 97, 91, 62,
26, 96, 69, 76, 83, 64, 25, 63, 33, 30, 77, 51, 100, 84, 22, 60, 37, 52, 58,
75, 99, 98, 35, 71, 43, 21, 64, 69, 62, 81, 71, 96, 73, 76, 74, 100, 95, 70,
59, 44, 88, 100, 45, 73, 57, 70, 93, 66, 95, 34, 34, 62, 95, 60, 26, 33, 74,
82, 62, 46, 87, 26, 93, 61, 38, 73, 92, 93, 57, 98, 97, 24, 67, 71, 82, 56, 81,
34, 56, 55, 60, 37, 31, 66, 93, 96, 45, 32]},
'u500_15': {'capacity': 150, 'num_items': 500,
'items': [77, 34, 89, 26, 27, 50, 36, 44, 87, 37, 71, 26, 50, 47, 70, 91, 76, 99, 21, 32,
81, 51, 45, 63, 90, 35, 38, 82, 55, 48, 52, 42, 84, 74, 75, 80, 43, 29, 82, 77,
43, 93, 75, 46, 45, 61, 88, 28, 70, 96, 98, 33, 56, 34, 49, 74, 67, 63, 42, 68,
93, 29, 27, 30, 50, 89, 26, 36, 71, 32, 28, 49, 83, 52, 55, 81, 83, 25, 42, 56,
88, 42, 91, 48, 54, 42, 74, 88, 72, 30, 61, 20, 61, 22, 44, 89, 55, 54, 33, 54,
79, 32, 89, 74, 37, 56, 60, 34, 75, 62, 68, 84, 58, 34, 33, 37, 75, 51, 61, 91,
79, 38, 34, 64, 85, 83, 75, 32, 31, 35, 56, 45, 24, 82, 51, 42, 63, 69, 74, 85,
35, 43, 49, 47, 26, 68, 99, 32, 70, 62, 89, 81, 65, 56, 57, 73, 67, 61, 21, 35,
31, 74, 50, 87, 81, 98, 46, 76, 39, 51, 24, 57, 87, 26, 36, 98, 56, 66, 61, 31,
46, 71, 88, 48, 58, 47, 51, 93, 64, 29, 93, 72, 82, 61, 90, 93, 59, 68, 50, 65,
100, 63, 40, 51, 50, 74, 63, 56, 51, 89, 97, 69, 87, 24, 89, 42, 86, 55, 29,
87, 33, 21, 22, 85, 42, 98, 46, 68, 28, 63, 66, 89, 90, 58, 48, 88, 66, 62, 99,
80, 79, 82, 52, 71, 52, 21, 20, 45, 70, 87, 35, 56, 88, 59, 89, 42, 30, 98, 65,
88, 88, 88, 22, 48, 77, 69, 83, 78, 93, 70, 85, 65, 100, 44, 93, 71, 38, 29,
28, 72, 49, 55, 64, 52, 75, 68, 65, 55, 43, 69, 89, 34, 85, 73, 38, 20, 41, 79,
63, 82, 34, 45, 63, 53, 34, 65, 98, 78, 40, 91, 23, 69, 32, 79, 69, 80, 35,
100, 98, 56, 93, 100, 55, 27, 42, 90, 75, 69, 24, 100, 66, 55, 64, 91, 44, 65,
92, 50, 63, 88, 86, 35, 67, 89, 83, 87, 85, 65, 78, 59, 72, 77, 26, 23, 64, 37,
25, 87, 37, 76, 57, 57, 33, 20, 63, 90, 66, 27, 53, 25, 26, 67, 57, 45, 32, 49,
53, 95, 56, 21, 89, 21, 46, 88, 30, 78, 79, 24, 30, 85, 43, 59, 67, 30, 78, 52,
92, 44, 95, 39, 90, 77, 90, 65, 38, 98, 80, 78, 20, 99, 46, 36, 71, 73, 62, 48,
36, 66, 75, 34, 93, 53, 32, 35, 69, 39, 96, 57, 42, 71, 76, 31, 81, 22, 47, 42,
48, 31, 80, 55, 52, 21, 80, 44, 83, 71, 43, 91, 88, 96, 48, 77, 66, 29, 77, 60,
75, 70, 65, 30, 76, 71, 55, 67, 56, 88, 78, 54, 58, 51, 28, 73, 32, 77, 45, 53,
21, 91, 30, 50, 57, 37, 87, 39, 33, 49, 99, 69, 74, 85, 46, 85, 51, 61, 40, 32,
52, 68, 74, 63]}, 'u500_16': {'capacity': 150, 'num_items': 500,
'items': [62, 99, 64, 96, 92, 87, 83, 86, 39, 83,
60, 31, 71, 92, 24, 49, 59, 93, 50, 83,
55, 56, 43, 61, 99, 87, 73, 80, 83, 96,
99, 82, 79, 73, 20, 60, 77, 93, 74, 72,
80, 73, 38, 30, 52, 75, 50, 82, 83, 96,
46, 38, 55, 42, 64, 66, 98, 21, 80, 60,
78, 25, 76, 44, 79, 72, 25, 86, 93,
100, 27, 33, 75, 28, 43, 29, 65, 94,
74, 69, 22, 66, 67, 44, 37, 38, 30, 67,
27, 20, 48, 39, 58, 93, 59, 37, 95, 45,
63, 37, 41, 90, 63, 25, 99, 32, 90, 69,
50, 65, 84, 60, 25, 80, 65, 31, 45, 90,
26, 55, 100, 97, 98, 36, 44, 21, 86,
46, 68, 75, 97, 35, 38, 92, 99, 64, 48,
89, 82, 96, 72, 75, 62, 76, 64, 44, 90,
36, 23, 52, 81, 77, 66, 27, 54, 45, 75,
100, 38, 36, 45, 63, 66, 63, 43, 23,
46, 59, 60, 58, 77, 72, 51, 22, 59, 48,
59, 58, 91, 72, 26, 74, 70, 90, 71, 52,
63, 36, 61, 38, 69, 28, 62, 64, 77, 50,
96, 23, 56, 64, 81, 40, 88, 60, 22, 65,
98, 36, 37, 58, 64, 57, 42, 73, 21, 96,
37, 88, 63, 90, 95, 73, 95, 77, 49, 81,
28, 99, 49, 77, 36, 26, 93, 84, 41, 74,
41, 35, 20, 60, 91, 79, 28, 86, 70, 57,
78, 23, 40, 32, 75, 24, 64, 48, 23, 87,
56, 74, 62, 21, 81, 52, 46, 89, 67, 28,
29, 99, 36, 29, 38, 93, 93, 36, 65, 81,
65, 48, 22, 31, 23, 30, 69, 75, 21, 62,
75, 77, 33, 79, 65, 84, 54, 82, 66, 81,
70, 70, 87, 25, 26, 76, 72, 45, 36, 38,
60, 61, 76, 41, 25, 93, 29, 81, 21, 24,
77, 69, 32, 26, 85, 25, 90, 20, 36, 20,
71, 66, 87, 68, 54, 43, 82, 46, 81, 52,
83, 98, 77, 24, 34, 78, 65, 51, 49, 31,
89, 35, 93, 29, 31, 42, 86, 90, 96, 64,
69, 59, 74, 31, 78, 77, 87, 87, 72, 29,
100, 62, 78, 22, 48, 79, 43, 92, 30,
78, 22, 64, 83, 52, 29, 74, 49, 61, 27,
35, 56, 61, 70, 78, 34, 52, 39, 22, 95,
25, 81, 85, 77, 94, 79, 90, 66, 60, 83,
30, 87, 20, 38, 86, 35, 35, 88, 69, 50,
38, 52, 95, 73, 50, 50, 48, 43, 74, 68,
23, 20, 37, 25, 78, 46, 61, 96, 50, 89,
43, 26, 52, 70, 93, 40, 24, 67, 88, 74,
44, 83, 33, 77, 94, 77, 89, 20, 75,
100, 49, 86, 66, 20, 79, 81, 54, 69,
69, 88, 87, 88, 69, 34, 84, 67, 24, 94,
50, 41, 20, 48, 94, 29, 40, 51, 91, 41,
50, 47, 68, 74, 55, 84, 51, 53, 46, 24,
62, 44, 62, 76, 46, 94, 44]},
'u500_17': {'capacity': 150, 'num_items': 500,
'items': [67, 25, 24, 33, 75, 71, 38, 24, 62, 71, 88, 83, 34, 49, 91, 34, 33, 38, 85, 83,
39, 68, 33, 99, 41, 47, 24, 32, 25, 98, 66, 99, 96, 28, 98, 91, 60, 74, 64, 63,
31, 43, 94, 32, 23, 95, 28, 40, 52, 77, 38, 48, 79, 40, 42, 54, 39, 42, 30, 54,
95, 31, 71, 23, 58, 94, 70, 56, 61, 41, 37, 45, 21, 54, 74, 44, 92, 90, 92, 89,
26, 94, 79, 31, 67, 36, 91, 73, 98, 52, 67, 75, 61, 37, 64, 29, 56, 34, 87, 26,
42, 100, 40, 29, 78, 70, 59, 27, 43, 59, 82, 63, 76, 52, 28, 66, 56, 83, 62,
98, 55, 98, 57, 49, 95, 89, 57, 69, 79, 77, 44, 22, 70, 87, 91, 43, 42, 40, 67,
59, 49, 99, 60, 22, 20, 35, 23, 36, 98, 82, 82, 57, 85, 83, 85, 56, 66, 37, 41,
33, 82, 21, 42, 99, 78, 72, 36, 20, 91, 34, 44, 90, 88, 89, 64, 96, 78, 30, 78,
57, 51, 30, 96, 90, 35, 49, 69, 49, 77, 80, 24, 44, 67, 28, 48, 80, 35, 46, 44,
40, 76, 99, 86, 84, 93, 25, 71, 25, 66, 27, 80, 57, 96, 51, 28, 82, 94, 48, 40,
65, 54, 92, 23, 72, 81, 37, 71, 72, 40, 95, 31, 39, 25, 90, 77, 73, 25, 57, 67,
21, 23, 70, 39, 35, 68, 91, 21, 21, 46, 57, 67, 60, 24, 89, 82, 72, 20, 44, 37,
91, 29, 27, 84, 91, 87, 34, 31, 20, 73, 36, 99, 29, 21, 57, 74, 38, 78, 98, 69,
43, 84, 77, 61, 79, 91, 49, 89, 32, 23, 83, 21, 90, 85, 77, 100, 94, 23, 52,
71, 84, 85, 98, 31, 20, 69, 92, 25, 74, 97, 34, 61, 47, 87, 28, 82, 85, 97, 93,
40, 23, 37, 46, 70, 94, 30, 74, 47, 57, 33, 32, 82, 67, 53, 80, 64, 21, 48, 57,
43, 64, 88, 25, 27, 90, 67, 87, 67, 28, 71, 21, 20, 72, 93, 44, 86, 85, 39, 78,
54, 71, 48, 74, 54, 93, 52, 53, 51, 48, 62, 36, 48, 98, 26, 70, 50, 42, 32, 36,
36, 85, 35, 59, 53, 60, 70, 66, 64, 60, 29, 52, 41, 28, 39, 96, 22, 44, 43, 83,
64, 55, 50, 52, 99, 71, 54, 31, 34, 80, 82, 82, 77, 54, 67, 66, 58, 49, 57, 37,
27, 83, 68, 86, 92, 65, 31, 96, 100, 45, 68, 58, 29, 53, 80, 57, 61, 27, 87,
86, 51, 73, 37, 67, 77, 25, 38, 88, 93, 86, 23, 98, 77, 27, 40, 85, 71, 73, 57,
96, 25, 25, 62, 30, 94, 39, 68, 53, 36, 62, 66, 44, 38, 81, 59, 96, 83, 82, 46,
48, 67, 79, 25, 32, 74, 45, 70, 81, 24, 73, 22, 74, 69, 36, 43, 73, 52, 69, 95,
96, 40, 67]}, 'u500_18': {'capacity': 150, 'num_items': 500,
'items': [42, 100, 22, 21, 56, 78, 89, 36, 93, 60,
70, 30, 89, 48, 71, 55, 99, 40, 84, 74, 95,
73, 86, 36, 85, 91, 47, 63, 44, 87, 83, 56,
57, 86, 46, 69, 75, 97, 59, 93, 45, 64, 49,
92, 86, 70, 75, 43, 94, 52, 87, 70, 77, 21,
86, 86, 46, 27, 30, 38, 96, 66, 99, 90, 87,
28, 99, 26, 45, 92, 59, 70, 77, 39, 38, 76,
46, 43, 98, 95, 52, 76, 40, 27, 22, 58, 47,
35, 93, 51, 86, 78, 64, 83, 43, 61, 23, 55,
95, 32, 24, 83, 42, 54, 69, 25, 62, 48, 20,
40, 99, 44, 39, 22, 92, 20, 75, 54, 49, 53,
60, 85, 43, 83, 98, 32, 44, 68, 66, 52, 86,
95, 77, 67, 70, 21, 89, 24, 27, 26, 96, 63,
82, 88, 22, 24, 84, 59, 54, 54, 22, 74, 90,
79, 66, 94, 68, 67, 55, 53, 30, 97, 66, 33,
26, 95, 88, 66, 72, 23, 28, 40, 41, 93, 76,
31, 34, 97, 76, 58, 76, 69, 82, 40, 28, 22,
46, 20, 91, 68, 71, 73, 85, 93, 83, 88, 27,
69, 29, 45, 56, 85, 50, 29, 89, 74, 74, 28,
97, 45, 23, 74, 96, 87, 22, 39, 65, 43,
100, 63, 55, 50, 85, 34, 29, 60, 77, 52,
48, 93, 34, 57, 68, 51, 54, 66, 99, 45, 29,
90, 59, 58, 55, 59, 38, 22, 82, 59, 23, 34,
81, 90, 91, 79, 38, 76, 40, 47, 85, 50, 50,
92, 25, 77, 76, 95, 58, 91, 66, 55, 80, 93,
33, 84, 38, 39, 76, 85, 81, 27, 66, 67, 51,
30, 54, 22, 75, 67, 85, 98, 89, 72, 93, 82,
53, 85, 40, 82, 56, 100, 32, 48, 88, 50,
80, 56, 60, 86, 64, 88, 49, 94, 23, 57, 95,
34, 49, 93, 51, 30, 76, 79, 73, 83, 27, 86,
38, 28, 27, 82, 21, 31, 84, 52, 71, 79, 44,
24, 97, 21, 69, 29, 84, 77, 76, 62, 31, 74,
26, 66, 68, 36, 32, 57, 52, 37, 48, 97, 20,
43, 89, 64, 61, 95, 77, 79, 42, 76, 78, 26,
64, 93, 77, 67, 87, 40, 65, 50, 95, 94, 57,
53, 51, 25, 41, 84, 88, 69, 24, 80, 34, 32,
56, 42, 95, 63, 21, 53, 52, 45, 39, 54, 58,
73, 41, 91, 65, 88, 61, 28, 57, 33, 29, 55,
45, 77, 55, 86, 60, 46, 33, 23, 35, 66, 81,
52, 28, 26, 71, 83, 61, 35, 56, 44, 67, 56,
90, 47, 33, 88, 84, 32, 27, 48, 28, 83, 62,
52, 45, 65, 65, 31, 42, 25, 43, 43, 42, 85,
50, 46, 58, 51, 74, 59, 79, 55, 51, 21, 65,
91, 33, 100, 91, 39, 87, 28, 70, 37, 57,
31, 65, 81, 61, 52, 22, 95, 90, 42, 67, 39,
57, 90, 53, 45, 91, 94, 84, 46, 78, 55]},
'u500_19': {'capacity': 150, 'num_items': 500,
'items': [64, 28, 27, 36, 35, 34, 22, 58, 53, 74, 24, 44, 99, 33, 90, 92, 28, 39, 67, 41,
46, 47, 36, 27, 23, 79, 100, 26, 72, 93, 60, 72, 28, 81, 97, 48, 90, 100, 21,
26, 51, 36, 76, 48, 43, 21, 100, 65, 48, 45, 78, 33, 37, 34, 72, 25, 23, 29,
97, 79, 39, 21, 54, 72, 64, 30, 77, 83, 95, 39, 20, 100, 46, 24, 87, 75, 24,
83, 55, 33, 70, 65, 93, 92, 68, 34, 67, 72, 24, 95, 68, 22, 34, 91, 89, 51, 83,
81, 31, 96, 83, 80, 52, 58, 88, 65, 74, 81, 33, 46, 94, 37, 49, 60, 80, 87, 85,
32, 97, 20, 92, 93, 30, 34, 27, 29, 49, 98, 87, 82, 34, 36, 21, 42, 35, 99, 62,
38, 23, 70, 76, 99, 45, 60, 28, 96, 86, 94, 53, 46, 92, 64, 50, 84, 90, 99, 80,
35, 77, 48, 78, 20, 23, 99, 74, 23, 35, 91, 94, 31, 28, 36, 44, 99, 43, 23, 57,
36, 71, 25, 40, 85, 87, 57, 63, 27, 100, 73, 52, 21, 56, 72, 28, 44, 25, 39,
28, 62, 49, 32, 44, 27, 69, 21, 82, 50, 77, 31, 71, 80, 71, 38, 76, 65, 46, 71,
46, 50, 31, 96, 21, 49, 37, 51, 82, 83, 48, 97, 96, 74, 90, 37, 21, 63, 66, 71,
84, 31, 64, 94, 90, 80, 43, 92, 78, 62, 31, 46, 45, 89, 95, 32, 57, 95, 91, 37,
99, 31, 28, 70, 34, 93, 70, 24, 97, 95, 32, 67, 91, 35, 28, 36, 23, 95, 93, 22,
43, 96, 39, 55, 83, 53, 90, 29, 52, 41, 24, 67, 66, 76, 50, 32, 73, 87, 36, 26,
61, 26, 48, 94, 45, 37, 84, 24, 100, 43, 51, 29, 63, 97, 49, 42, 93, 26, 99,
27, 45, 85, 67, 86, 68, 59, 41, 68, 54, 30, 89, 51, 40, 79, 72, 32, 86, 88, 44,
52, 45, 43, 21, 38, 30, 34, 86, 85, 100, 21, 36, 55, 26, 49, 52, 85, 62, 67,
84, 98, 66, 83, 66, 89, 50, 92, 57, 55, 52, 78, 93, 45, 25, 75, 58, 46, 55, 23,
81, 86, 21, 58, 100, 61, 41, 81, 38, 55, 60, 82, 51, 90, 44, 37, 22, 75, 60,
74, 38, 91, 43, 36, 37, 42, 48, 45, 57, 21, 25, 91, 55, 44, 56, 97, 76, 71, 98,
26, 97, 33, 77, 59, 58, 40, 44, 32, 35, 37, 53, 88, 78, 69, 77, 67, 56, 50, 95,
72, 69, 42, 35, 54, 49, 28, 88, 56, 27, 38, 92, 85, 41, 45, 94, 78, 94, 77, 20,
89, 68, 74, 56, 83, 46, 37, 68, 32, 27, 28, 33, 42, 25, 80, 29, 43, 36, 78, 88,
38, 61, 71, 38, 89, 88, 58, 100, 78, 65, 50, 77, 45, 64, 58, 70, 62, 75, 87,
84, 57, 46, 73, 51, 97, 90, 23]}}
# Data from the Weibull 5k test dataset, containing 5 bin packing instances
# each with 5,000 items.
datasets['Weibull 5k'] = {'test_0': {'capacity': 100, 'num_items': 5000,
'items': [48, 66, 48, 32, 72, 37, 41, 21, 58, 35, 18, 53, 52, 42, 51, 30, 42, 44,
58, 62, 28, 20, 27, 53, 59, 56, 46, 60, 21, 49, 29, 58, 31, 47, 34, 41,
28, 49, 22, 37, 31, 27, 50, 46, 39, 52, 40, 41, 31, 57, 53, 57, 35, 39,
38, 40, 34, 22, 30, 48, 34, 34, 48, 53, 23, 57, 50, 67, 18, 40, 38, 38,
42, 53, 38, 37, 53, 62, 22, 51, 34, 51, 24, 92, 60, 29, 39, 49, 24, 33,
67, 65, 62, 57, 60, 29, 53, 29, 54, 52, 37, 59, 55, 69, 20, 41, 47, 44,
36, 48, 61, 33, 53, 36, 47, 38, 39, 35, 41, 31, 42, 41, 45, 49, 25, 20,
71, 61, 35, 33, 42, 11, 39, 68, 43, 30, 51, 31, 68, 29, 40, 45, 41, 23,
46, 65, 37, 60, 45, 38, 28, 45, 42, 30, 39, 59, 36, 60, 58, 32, 49, 19,
55, 46, 55, 53, 46, 32, 56, 29, 23, 22, 26, 19, 37, 24, 50, 44, 33, 27,
26, 34, 38, 21, 58, 48, 66, 37, 40, 10, 37, 27, 56, 30, 49, 19, 52, 17,
41, 29, 38, 53, 21, 36, 37, 23, 35, 26, 25, 33, 11, 34, 18, 69, 36, 50,
40, 19, 65, 51, 53, 35, 35, 45, 21, 27, 60, 35, 56, 14, 65, 40, 24, 39,
49, 85, 54, 32, 28, 27, 9, 28, 44, 47, 65, 59, 23, 46, 36, 46, 18, 20,
20, 36, 50, 71, 57, 63, 31, 35, 47, 35, 35, 41, 48, 19, 53, 69, 26, 43,
45, 27, 52, 19, 49, 45, 29, 32, 29, 22, 52, 15, 47, 39, 26, 41, 27, 31,
63, 50, 21, 30, 21, 42, 43, 21, 71, 21, 34, 29, 80, 41, 37, 51, 35, 33,
45, 26, 44, 30, 41, 22, 55, 26, 43, 35, 15, 31, 32, 53, 36, 33, 25, 19,
29, 64, 56, 17, 30, 13, 66, 19, 39, 51, 38, 39, 54, 37, 37, 17, 8, 45,
58, 19, 48, 51, 41, 53, 69, 33, 37, 29, 25, 41, 54, 51, 26, 29, 66, 60,
36, 33, 17, 31, 48, 73, 16, 26, 46, 25, 25, 33, 57, 49, 28, 62, 44, 22,
19, 65, 25, 60, 39, 39, 36, 45, 40, 45, 43, 28, 45, 28, 54, 44, 54, 32,
62, 67, 34, 31, 29, 47, 38, 35, 69, 57, 40, 20, 37, 27, 56, 25, 57, 54,
36, 45, 56, 49, 35, 77, 71, 53, 46, 41, 25, 50, 50, 44, 79, 52, 19, 44,
43, 36, 40, 36, 36, 35, 51, 35, 41, 67, 47, 46, 13, 53, 56, 37, 41, 46,
36, 70, 29, 18, 35, 59, 7, 51, 36, 52, 24, 40, 21, 74, 21, 23, 28, 47,
43, 40, 50, 61, 65, 17, 59, 60, 52, 53, 19, 51, 63, 59, 25, 42, 50, 50,
60, 61, 27, 37, 25, 55, 69, 45, 51, 36, 47, 20, 56, 39, 20, 43, 50, 34,
42, 37, 60, 48, 18, 41, 42, 35, 34, 46, 20, 61, 57, 25, 42, 72, 16, 39,
29, 64, 37, 44, 39, 32, 47, 61, 23, 41, 21, 38, 33, 67, 60, 54, 66, 51,
70, 39, 34, 47, 16, 38, 48, 54, 15, 34, 34, 14, 22, 25, 32, 11, 19, 44,
32, 36, 43, 20, 55, 46, 38, 62, 43, 35, 19, 47, 31, 17, 42, 31, 39, 49,
37, 53, 36, 64, 29, 19, 42, 47, 45, 9, 45, 52, 59, 35, 67, 25, 27, 55,
44, 47, 38, 17, 24, 61, 68, 35, 36, 18, 23, 50, 20, 36, 35, 48, 32, 29,
62, 23, 32, 36, 25, 15, 57, 50, 43, 43, 30, 24, 56, 52, 65, 17, 48, 29,
64, 52, 20, 45, 60, 54, 38, 57, 27, 32, 20, 44, 18, 18, 32, 38, 36, 39,
17, 41, 42, 67, 39, 21, 30, 61, 40, 43, 31, 16, 40, 41, 38, 38, 11, 43,
40, 17, 41, 65, 48, 42, 47, 24, 86, 26, 29, 48, 34, 19, 55, 65, 53, 68,
43, 41, 28, 50, 49, 15, 42, 26, 14, 45, 26, 61, 54, 25, 44, 28, 43, 43,
18, 44, 21, 52, 47, 38, 32, 55, 54, 24, 75, 38, 53, 24, 24, 39, 63, 32,
47, 32, 67, 32, 43, 25, 52, 47, 48, 50, 56, 18, 48, 64, 66, 37, 36, 42,
30, 37, 53, 32, 73, 40, 55, 30, 38, 34, 60, 39, 22, 43, 32, 13, 44, 41,
23, 48, 28, 42, 22, 34, 49, 55, 27, 34, 38, 43, 35, 71, 61, 44, 32, 22,
27, 82, 38, 50, 30, 54, 29, 48, 45, 45, 42, 64, 36, 44, 26, 52, 12, 32,
46, 50, 23, 56, 54, 23, 47, 46, 38, 60, 45, 38, 58, 48, 53, 37, 34, 45,
25, 38, 32, 11, 46, 38, 32, 42, 58, 59, 12, 50, 49, 44, 46, 37, 53, 58,
47, 34, 45, 39, 58, 31, 29, 36, 38, 36, 49, 56, 45, 34, 28, 7, 31, 42,
15, 49, 51, 47, 26, 20, 52, 26, 50, 32, 34, 33, 51, 73, 17, 45, 40, 35,
24, 30, 46, 42, 21, 11, 49, 32, 67, 50, 47, 54, 44, 57, 55, 36, 51, 37,
26, 35, 20, 42, 32, 46, 30, 33, 44, 67, 23, 47, 45, 39, 14, 37, 41, 29,
59, 53, 21, 15, 49, 37, 56, 19, 28, 48, 41, 30, 27, 32, 10, 83, 58, 22,
40, 46, 52, 34, 34, 43, 22, 17, 28, 67, 58, 35, 33, 18, 11, 44, 35, 20,
60, 50, 44, 23, 49, 29, 44, 66, 37, 44, 15, 62, 27, 41, 52, 32, 44, 28,
11, 32, 28, 72, 35, 21, 54, 42, 57, 37, 26, 37, 43, 49, 24, 57, 37, 37,
41, 19, 27, 40, 49, 50, 14, 59, 61, 34, 35, 53, 33, 36, 31, 42, 32, 60,
20, 46, 41, 31, 12, 59, 22, 60, 53, 22, 58, 19, 27, 23, 37, 32, 42, 58,
24, 38, 29, 26, 57, 17, 34, 34, 17, 35, 61, 48, 45, 31, 38, 22, 47, 38,
25, 47, 47, 43, 38, 46, 52, 45, 39, 64, 21, 35, 31, 32, 44, 46, 31, 75,
48, 23, 47, 31, 34, 22, 24, 50, 28, 32, 23, 49, 53, 51, 30, 70, 36, 28,
54, 14, 61, 61, 37, 24, 38, 34, 43, 26, 38, 44, 55, 42, 33, 35, 29, 28,
18, 19, 51, 39, 28, 54, 43, 43, 41, 27, 29, 17, 14, 44, 46, 77, 55, 34,
61, 45, 29, 24, 32, 38, 15, 72, 9, 19, 25, 59, 21, 53, 13, 42, 38, 29,
30, 39, 59, 41, 13, 38, 46, 21, 49, 41, 28, 19, 61, 24, 15, 52, 34, 23,
55, 31, 36, 54, 45, 66, 69, 37, 54, 69, 50, 62, 15, 49, 29, 56, 25, 64,
30, 34, 25, 23, 46, 52, 59, 40, 58, 59, 58, 57, 21, 25, 44, 28, 41, 44,
13, 17, 81, 29, 68, 61, 42, 38, 66, 10, 57, 49, 63, 31, 67, 63, 20, 65,
35, 14, 73, 55, 37, 69, 46, 48, 24, 39, 42, 45, 27, 48, 43, 24, 30, 41,
24, 43, 49, 45, 61, 56, 43, 39, 59, 61, 36, 22, 54, 38, 73, 44, 26, 49,
50, 44, 44, 30, 26, 16, 46, 29, 25, 54, 26, 52, 63, 61, 23, 23, 44, 31,
48, 27, 32, 28, 33, 46, 41, 35, 29, 56, 62, 81, 58, 67, 7, 46, 79, 36,
18, 37, 48, 34, 48, 56, 38, 18, 27, 33, 53, 21, 37, 43, 31, 50, 27, 39,
25, 41, 58, 24, 46, 43, 62, 28, 51, 20, 65, 57, 70, 15, 31, 73, 13, 32,
64, 32, 17, 60, 37, 35, 27, 49, 38, 42, 37, 49, 26, 51, 66, 19, 20, 63,
44, 21, 40, 44, 65, 44, 50, 51, 26, 45, 53, 46, 35, 65, 26, 62, 37, 24,
64, 13, 60, 54, 46, 37, 31, 48, 29, 18, 31, 12, 45, 31, 29, 31, 32, 35,
40, 40, 26, 41, 55, 21, 14, 47, 54, 41, 64, 13, 17, 68, 28, 11, 47, 65,
35, 25, 56, 68, 48, 25, 67, 43, 38, 10, 56, 31, 69, 42, 61, 45, 40, 54,
34, 32, 48, 65, 52, 58, 40, 28, 21, 20, 53, 41, 28, 45, 25, 69, 47, 38,
62, 30, 47, 16, 35, 61, 29, 29, 32, 76, 51, 50, 38, 58, 33, 48, 48, 48,
19, 22, 66, 42, 53, 35, 17, 30, 27, 45, 24, 52, 14, 32, 63, 44, 34, 31,
72, 28, 43, 17, 40, 58, 54, 25, 38, 41, 46, 22, 34, 26, 56, 31, 29, 19,
56, 46, 38, 57, 40, 30, 46, 36, 61, 34, 39, 52, 49, 8, 56, 49, 21, 30,
23, 34, 43, 50, 49, 70, 53, 19, 47, 48, 47, 22, 22, 49, 33, 53, 28, 39,
55, 32, 41, 31, 24, 30, 32, 42, 33, 31, 54, 38, 22, 63, 42, 29, 54, 50,
56, 39, 49, 38, 40, 33, 42, 61, 59, 22, 26, 41, 19, 71, 54, 46, 31, 47,
45, 21, 53, 40, 31, 67, 45, 66, 37, 21, 38, 45, 34, 41, 41, 45, 32, 46,
66, 60, 43, 41, 31, 56, 64, 39, 65, 19, 70, 38, 66, 28, 35, 26, 35, 20,
60, 31, 52, 30, 28, 26, 34, 50, 50, 57, 33, 48, 18, 28, 20, 68, 43, 41,
19, 36, 58, 56, 27, 48, 14, 45, 52, 31, 65, 40, 31, 19, 58, 43, 67, 16,
55, 60, 25, 43, 44, 29, 76, 50, 32, 55, 21, 37, 51, 64, 60, 41, 22, 31,
37, 30, 60, 33, 57, 40, 32, 10, 36, 33, 75, 47, 18, 64, 50, 32, 29, 41,
17, 38, 64, 58, 57, 44, 29, 50, 21, 66, 42, 40, 20, 39, 25, 44, 42, 18,
57, 46, 29, 42, 11, 17, 49, 38, 22, 3, 43, 34, 38, 21, 65, 44, 24, 28,
58, 51, 73, 34, 35, 36, 64, 59, 54, 16, 22, 39, 35, 18, 40, 50, 29, 43,
41, 11, 27, 49, 86, 49, 27, 44, 28, 19, 31, 31, 78, 23, 25, 44, 17, 34,
36, 22, 39, 6, 31, 41, 34, 37, 35, 36, 62, 65, 18, 25, 42, 39, 61, 41,
61, 55, 58, 32, 56, 44, 37, 35, 39, 41, 39, 58, 59, 45, 42, 50, 46, 76,
62, 27, 50, 50, 66, 30, 59, 34, 9, 32, 12, 30, 47, 32, 30, 48, 41, 33,
71, 39, 47, 49, 20, 28, 67, 29, 35, 28, 17, 45, 72, 48, 26, 52, 26, 71,
34, 60, 27, 64, 20, 54, 34, 57, 38, 68, 38, 45, 54, 21, 39, 41, 13, 39,
31, 22, 53, 44, 52, 18, 41, 22, 34, 30, 29, 12, 38, 62, 51, 61, 11, 35,
46, 33, 49, 9, 38, 50, 35, 38, 52, 42, 68, 48, 69, 50, 56, 40, 55, 34,
66, 25, 34, 25, 28, 53, 51, 40, 51, 77, 26, 29, 42, 36, 44, 43, 39, 62,
54, 42, 34, 7, 59, 65, 21, 39, 51, 57, 25, 28, 47, 37, 33, 66, 47, 31,
52, 46, 25, 51, 41, 41, 24, 47, 41, 47, 42, 65, 56, 40, 39, 68, 9, 50,
53, 27, 59, 49, 38, 38, 52, 29, 15, 46, 40, 47, 40, 45, 21, 36, 31, 27,
35, 48, 50, 54, 21, 32, 47, 29, 24, 35, 37, 38, 40, 51, 52, 56, 29, 17,
40, 51, 41, 28, 16, 55, 38, 25, 43, 43, 58, 55, 63, 46, 24, 26, 35, 48,
56, 20, 48, 54, 43, 24, 48, 29, 43, 24, 1, 44, 45, 27, 62, 41, 30, 32,
69, 39, 45, 45, 42, 22, 43, 25, 7, 32, 38, 49, 42, 50, 53, 61, 45, 53,
52, 50, 40, 56, 31, 47, 27, 46, 51, 18, 35, 23, 25, 35, 37, 49, 38, 44,
36, 35, 54, 28, 59, 48, 34, 42, 57, 39, 44, 49, 42, 47, 40, 37, 35, 59,
3, 55, 43, 32, 60, 17, 15, 39, 34, 28, 52, 21, 39, 32, 61, 50, 57, 46,
58, 52, 49, 43, 34, 30, 25, 69, 58, 28, 34, 40, 25, 40, 25, 42, 42, 35,
42, 30, 33, 19, 38, 49, 65, 45, 57, 6, 32, 45, 48, 73, 26, 47, 28, 66,
36, 38, 44, 53, 29, 48, 40, 59, 47, 53, 43, 39, 55, 59, 42, 33, 45, 47,
30, 30, 30, 40, 57, 63, 48, 50, 69, 56, 40, 37, 31, 55, 75, 47, 18, 34,
35, 46, 19, 20, 25, 47, 13, 32, 57, 40, 24, 38, 16, 46, 9, 24, 44, 51,
46, 25, 54, 17, 33, 41, 21, 50, 45, 48, 33, 32, 35, 33, 43, 18, 56, 61,
83, 48, 21, 36, 73, 34, 32, 38, 19, 55, 37, 62, 61, 47, 74, 47, 41, 31,
47, 52, 81, 54, 42, 47, 45, 61, 25, 36, 57, 27, 42, 61, 35, 52, 87, 61,
21, 20, 28, 50, 20, 23, 57, 67, 64, 17, 38, 42, 18, 47, 34, 64, 22, 41,
44, 38, 19, 12, 31, 36, 45, 49, 54, 40, 29, 26, 33, 39, 36, 43, 32, 34,
32, 13, 37, 45, 67, 36, 43, 53, 19, 53, 33, 29, 36, 47, 45, 47, 21, 34,
23, 43, 26, 16, 35, 48, 31, 47, 53, 34, 31, 65, 50, 47, 18, 8, 38, 48,
40, 27, 46, 55, 22, 23, 62, 29, 50, 20, 64, 51, 46, 49, 40, 27, 47, 31,
33, 28, 42, 52, 41, 33, 25, 33, 27, 23, 52, 43, 47, 7, 14, 41, 50, 33,
38, 20, 49, 39, 55, 47, 43, 22, 24, 63, 29, 65, 24, 27, 21, 57, 34, 42,
29, 28, 74, 31, 25, 45, 26, 10, 45, 5, 35, 15, 33, 18, 27, 58, 51, 48,
18, 56, 34, 44, 48, 36, 49, 87, 48, 57, 35, 23, 51, 24, 33, 34, 39, 42,
20, 37, 47, 52, 31, 27, 12, 41, 37, 80, 33, 61, 79, 71, 47, 70, 60, 60,
29, 42, 50, 27, 32, 57, 41, 27, 31, 62, 37, 30, 53, 46, 40, 33, 62, 39,
31, 74, 25, 55, 36, 71, 59, 28, 8, 28, 23, 53, 13, 31, 10, 56, 50, 43,
22, 53, 63, 33, 34, 50, 30, 34, 38, 36, 29, 31, 22, 42, 74, 37, 50, 39,
42, 29, 62, 38, 16, 58, 18, 49, 58, 50, 23, 36, 36, 53, 47, 57, 77, 45,
44, 11, 32, 22, 48, 49, 25, 61, 59, 69, 21, 44, 69, 45, 41, 22, 44, 40,
53, 43, 27, 46, 21, 47, 26, 24, 35, 38, 46, 59, 66, 48, 45, 42, 36, 47,
45, 18, 49, 5, 27, 33, 58, 78, 16, 23, 19, 34, 16, 46, 48, 36, 28, 56,
49, 53, 43, 27, 42, 41, 39, 23, 24, 20, 30, 12, 68, 30, 59, 29, 17, 29,
39, 51, 47, 59, 50, 52, 23, 18, 78, 67, 16, 50, 49, 19, 55, 31, 47, 50,
66, 45, 35, 33, 39, 42, 42, 49, 42, 62, 46, 56, 31, 43, 36, 38, 34, 61,
50, 55, 42, 34, 31, 38, 21, 52, 33, 65, 46, 26, 55, 35, 19, 60, 69, 47,
24, 22, 45, 40, 43, 66, 49, 32, 21, 15, 51, 50, 20, 69, 15, 36, 31, 49,
18, 41, 21, 48, 18, 47, 11, 46, 45, 19, 60, 53, 28, 15, 24, 47, 49, 40,
40, 65, 56, 54, 61, 61, 25, 39, 61, 30, 47, 49, 31, 27, 23, 51, 37, 47,
46, 36, 19, 45, 22, 46, 31, 48, 8, 44, 20, 15, 12, 52, 30, 24, 40, 19,
54, 70, 58, 55, 25, 48, 49, 49, 23, 60, 23, 44, 39, 28, 57, 55, 58, 44,
27, 36, 53, 32, 18, 36, 58, 41, 25, 43, 46, 18, 40, 35, 55, 46, 37, 23,
16, 56, 26, 32, 34, 61, 68, 48, 43, 35, 40, 51, 30, 22, 41, 25, 43, 63,
44, 50, 27, 38, 32, 30, 20, 46, 63, 6, 50, 32, 47, 59, 29, 48, 30, 72,
19, 41, 34, 21, 24, 29, 43, 46, 36, 68, 37, 41, 66, 52, 19, 50, 36, 26,
26, 41, 19, 48, 71, 37, 72, 22, 42, 54, 33, 20, 63, 56, 30, 44, 44, 49,
60, 45, 63, 14, 44, 40, 66, 36, 22, 46, 13, 42, 27, 9, 63, 48, 73, 38,
32, 9, 28, 60, 53, 50, 39, 36, 51, 37, 59, 49, 53, 37, 44, 48, 42, 29,
65, 37, 54, 35, 22, 10, 40, 36, 35, 25, 43, 59, 4, 33, 18, 23, 50, 33,
60, 48, 27, 18, 47, 55, 51, 63, 45, 56, 50, 57, 44, 22, 55, 34, 48, 43,
39, 27, 41, 31, 33, 21, 27, 34, 29, 37, 27, 48, 44, 55, 55, 33, 51, 52,
70, 51, 29, 71, 42, 51, 49, 27, 35, 36, 38, 43, 38, 59, 50, 52, 33, 54,
62, 28, 41, 23, 44, 25, 21, 61, 54, 35, 19, 54, 31, 38, 21, 50, 46, 26,
47, 46, 32, 48, 48, 39, 37, 24, 33, 19, 51, 34, 51, 27, 56, 35, 34, 33,
57, 33, 10, 48, 30, 49, 61, 37, 70, 40, 35, 35, 30, 27, 52, 38, 52, 57,
36, 43, 15, 27, 50, 55, 14, 37, 40, 71, 69, 26, 43, 31, 47, 43, 41, 44,
24, 17, 29, 64, 26, 27, 82, 17, 35, 53, 16, 22, 20, 34, 52, 32, 50, 51,
17, 28, 34, 42, 58, 23, 28, 30, 69, 37, 57, 52, 41, 29, 40, 58, 63, 66,
24, 39, 88, 44, 50, 31, 15, 51, 68, 24, 34, 34, 37, 51, 27, 64, 34, 50,
40, 43, 42, 47, 39, 30, 23, 23, 23, 51, 39, 27, 46, 64, 49, 50, 15, 15,
31, 29, 33, 50, 52, 24, 45, 41, 52, 61, 30, 40, 34, 51, 46, 36, 17, 50,
27, 47, 52, 54, 23, 64, 48, 40, 57, 11, 49, 29, 23, 62, 43, 66, 24, 16,
57, 10, 16, 20, 57, 23, 52, 34, 46, 29, 57, 48, 37, 45, 13, 47, 41, 42,
45, 65, 18, 50, 43, 40, 52, 49, 52, 29, 43, 37, 57, 79, 45, 51, 68, 33,
36, 30, 42, 37, 66, 40, 42, 44, 34, 59, 36, 34, 26, 44, 32, 36, 53, 44,
50, 24, 32, 13, 33, 23, 33, 35, 32, 49, 38, 54, 17, 39, 20, 45, 77, 53,
69, 22, 56, 50, 10, 44, 38, 56, 62, 35, 47, 65, 37, 58, 38, 31, 57, 22,
46, 19, 21, 55, 53, 39, 29, 45, 26, 49, 40, 41, 34, 36, 10, 51, 49, 40,
34, 16, 51, 26, 51, 24, 36, 42, 45, 56, 30, 36, 42, 22, 27, 32, 45, 50,
43, 61, 33, 56, 38, 38, 48, 37, 31, 14, 37, 17, 13, 37, 55, 13, 56, 34,
43, 33, 23, 29, 48, 51, 32, 18, 41, 32, 37, 53, 36, 49, 22, 38, 40, 28,
62, 43, 42, 40, 31, 36, 58, 29, 44, 35, 46, 37, 42, 43, 39, 53, 37, 35,
31, 42, 20, 24, 52, 37, 42, 66, 43, 12, 61, 17, 46, 34, 14, 45, 22, 22,
44, 15, 29, 51, 43, 50, 31, 30, 42, 45, 39, 55, 35, 50, 45, 66, 43, 54,
47, 45, 30, 37, 39, 24, 26, 34, 47, 42, 38, 64, 32, 28, 32, 33, 32, 36,
36, 27, 23, 62, 29, 62, 48, 39, 27, 58, 33, 35, 58, 50, 29, 24, 34, 69,
28, 19, 29, 26, 28, 28, 46, 79, 40, 61, 81, 66, 63, 68, 47, 24, 52, 17,
40, 22, 19, 20, 20, 44, 33, 66, 39, 32, 45, 17, 14, 44, 45, 34, 47, 58,
40, 64, 35, 31, 31, 39, 28, 38, 48, 43, 23, 22, 35, 45, 37, 41, 40, 20,
22, 33, 11, 45, 44, 58, 35, 48, 38, 53, 50, 27, 34, 23, 40, 39, 55, 70,
40, 17, 51, 28, 22, 34, 24, 21, 61, 50, 44, 64, 26, 58, 23, 63, 57, 40,
25, 27, 21, 37, 37, 46, 36, 41, 35, 73, 33, 26, 15, 14, 8, 43, 57, 29,
38, 49, 22, 34, 70, 41, 42, 37, 35, 28, 25, 37, 25, 29, 39, 42, 26, 47,
67, 11, 58, 50, 44, 21, 44, 31, 62, 30, 25, 35, 58, 40, 79, 19, 35, 54,
23, 55, 30, 51, 47, 33, 65, 36, 26, 33, 37, 33, 54, 31, 61, 59, 45, 49,
58, 31, 6, 24, 9, 41, 68, 35, 43, 64, 34, 76, 42, 43, 39, 60, 37, 38, 14,
40, 42, 65, 76, 56, 67, 43, 39, 45, 33, 21, 21, 41, 15, 9, 15, 49, 57,
58, 46, 58, 68, 21, 79, 51, 70, 19, 26, 37, 42, 51, 32, 16, 32, 15, 57,
36, 72, 43, 29, 28, 57, 42, 54, 19, 28, 46, 34, 47, 43, 57, 60, 54, 34,
41, 60, 30, 58, 48, 37, 48, 56, 64, 63, 57, 30, 44, 60, 48, 50, 32, 68,
52, 59, 69, 40, 34, 51, 79, 21, 47, 60, 65, 27, 50, 22, 38, 40, 41, 7,
59, 59, 24, 24, 55, 48, 43, 41, 37, 56, 55, 26, 51, 35, 33, 48, 33, 42,
40, 41, 52, 37, 14, 67, 34, 3, 14, 82, 58, 32, 46, 49, 59, 44, 18, 27,
34, 49, 63, 49, 16, 26, 61, 38, 42, 12, 13, 54, 18, 33, 38, 53, 38, 38,
34, 49, 40, 42, 26, 18, 28, 33, 30, 45, 47, 12, 60, 37, 73, 61, 31, 6,
37, 27, 21, 26, 39, 37, 30, 35, 60, 38, 49, 32, 74, 30, 43, 74, 29, 34,
51, 51, 33, 29, 41, 36, 33, 65, 49, 32, 56, 22, 41, 53, 59, 27, 27, 38,
35, 37, 42, 63, 45, 35, 61, 53, 37, 57, 44, 32, 24, 40, 40, 37, 53, 48,
18, 40, 62, 49, 65, 16, 24, 64, 55, 37, 50, 60, 49, 41, 70, 50, 41, 26,
46, 41, 30, 43, 40, 32, 41, 31, 31, 20, 41, 28, 22, 59, 36, 38, 42, 38,
16, 59, 52, 49, 26, 34, 43, 24, 20, 48, 39, 14, 25, 24, 29, 43, 37, 50,
20, 43, 71, 53, 39, 52, 29, 35, 55, 43, 30, 70, 16, 49, 59, 44, 47, 34,
56, 53, 29, 41, 46, 40, 39, 28, 23, 26, 36, 61, 41, 38, 46, 49, 34, 36,
14, 34, 48, 21, 33, 22, 35, 51, 35, 14, 54, 53, 41, 52, 48, 39, 36, 44,
36, 41, 45, 56, 32, 21, 64, 48, 24, 32, 29, 33, 34, 38, 41, 54, 33, 27,
29, 59, 43, 37, 27, 50, 25, 38, 23, 61, 47, 48, 60, 45, 30, 14, 35, 57,
39, 29, 40, 32, 40, 43, 47, 33, 47, 42, 34, 50, 23, 24, 26, 31, 28, 49,
30, 56, 9, 30, 30, 45, 17, 54, 58, 16, 17, 39, 32, 53, 38, 23, 46, 33,
12, 39, 31, 44, 46, 62, 35, 68, 45, 54, 47, 30, 50, 43, 60, 44, 12, 50,
28, 60, 66, 45, 38, 50, 31, 26, 40, 25, 25, 31, 54, 50, 53, 23, 18, 54,
53, 49, 66, 52, 12, 28, 60, 25, 54, 72, 48, 33, 46, 44, 44, 37, 54, 63,
33, 41, 32, 43, 35, 79, 52, 41, 68, 22, 53, 29, 31, 43, 43, 63, 37, 44,
43, 17, 36, 34, 58, 54, 54, 26, 27, 26, 49, 22, 51, 39, 57, 31, 32, 8,
44, 16, 23, 30, 51, 27, 54, 37, 32, 55, 41, 25, 39, 54, 15, 22, 47, 34,
61, 27, 53, 45, 44, 35, 41, 52, 42, 39, 45, 65, 61, 67, 43, 40, 38, 43,
44, 31, 35, 63, 57, 47, 28, 21, 36, 57, 54, 52, 32, 53, 23, 62, 22, 33,
32, 48, 39, 43, 20, 49, 51, 54, 46, 31, 41, 12, 49, 20, 36, 37, 62, 32,
33, 31, 34, 52, 35, 62, 24, 50, 52, 25, 8, 31, 22, 60, 52, 33, 57, 63,
59, 42, 28, 50, 25, 35, 56, 70, 65, 64, 46, 55, 16, 21, 44, 51, 39, 62,
46, 50, 53, 26, 24, 32, 26, 62, 17, 36, 55, 42, 50, 44, 43, 45, 22, 19,
62, 18, 35, 56, 27, 47, 42, 47, 7, 42, 29, 49, 50, 52, 42, 17, 53, 41,
53, 42, 45, 54, 63, 56, 23, 57, 45, 34, 29, 34, 14, 38, 42, 38, 43, 57,
32, 23, 42, 25, 16, 28, 39, 30, 54, 36, 32, 52, 83, 80, 35, 19, 23, 23,
34, 20, 46, 20, 57, 52, 34, 50, 48, 40, 51, 51, 65, 37, 8, 43, 40, 35,
38, 61, 22, 41, 56, 62, 30, 51, 29, 29, 51, 35, 39, 39, 28, 18, 53, 22,
47, 5, 30, 34, 30, 71, 57, 44, 58, 43, 56, 36, 38, 24, 33, 43, 28, 51,
36, 43, 68, 37, 49, 41, 9, 33, 42, 68, 45, 24, 50, 67, 47, 66, 50, 43,
15, 69, 42, 25, 48, 65, 37, 42, 65, 31, 45, 27, 34, 41, 68, 40, 21, 33,
19, 51, 39, 15, 19, 48, 53, 40, 83, 8, 50, 59, 47, 52, 60, 43, 57, 37,
49, 45, 52, 57, 10, 53, 25, 32, 58, 40, 33, 44, 32, 36, 44, 39, 19, 40,
54, 21, 48, 51, 37, 58, 14, 40, 55, 74, 37, 33, 30, 39, 72, 40, 34, 15,
34, 60, 55, 42, 38, 44, 51, 43, 12, 44, 43, 46, 15, 73, 37, 25, 9, 67,
30, 39, 59, 36, 19, 57, 31, 29, 36, 23, 13, 32, 50, 25, 39, 57, 48, 28,
45, 52, 31, 37, 53, 33, 47, 24, 33, 36, 62, 38, 29, 80, 27, 54, 42, 27,
61, 48, 13, 61, 53, 46, 19, 28, 42, 49, 43, 50, 34, 35, 17, 24, 44, 57,
17, 15, 21, 45, 25, 40, 38, 27, 31, 35, 46, 23, 25, 31, 61, 19, 38, 50,
29, 34, 36, 55, 34, 48, 68, 37, 37, 80, 26, 31, 23, 52, 26, 42, 20, 22,
61, 20, 42, 28, 34, 51, 38, 71, 60, 39, 39, 27, 34, 37, 14, 50, 38, 58,
55, 43, 20, 33, 44, 39, 32, 12, 35, 36, 53, 23, 23, 29, 14, 45, 53, 53,
61, 22, 78, 39, 46, 40, 60, 64, 39, 32, 32, 43, 13, 40, 15, 36, 55, 67,
39, 15, 29, 29, 56, 44, 66, 43, 50, 31, 40, 37, 54, 39, 42, 40, 25, 17,
32, 38, 59, 38, 26, 28, 7, 28, 60, 24, 36, 41, 45, 41, 22, 43, 40, 26,
24, 44, 39, 21, 38, 44, 44, 51, 25, 65, 59, 34, 27, 47, 43, 45, 14, 42,
20, 31, 16, 31, 35, 36, 45, 52, 48, 32, 40, 58, 27, 30, 23, 53, 25, 48,
35, 75, 13, 36, 38, 39, 49, 69, 20, 41, 58, 26, 45, 48, 17, 29, 49, 38,
27, 45, 17, 40, 68, 16, 17, 41, 50, 26, 20, 28, 36, 23, 27, 39, 46, 25,
24, 47, 60, 44, 47, 29, 25, 58, 36, 39, 53, 33, 35, 48, 41, 39, 34, 16,
64, 50, 45, 53, 16, 37, 59, 51, 50, 30, 59, 20, 15, 39, 65, 40, 25, 36,
53, 40, 57, 42, 48, 66, 26, 51, 25, 41, 75, 54, 34, 52, 15, 56, 41, 49,
42, 26, 26, 33, 64, 46, 45, 14, 33, 60, 26, 59, 58, 53, 27, 51, 15, 41,
10, 33, 22, 31, 48, 21, 51, 27, 18, 37, 49, 51, 37, 68, 21, 35, 69, 42,
29, 41, 34, 64, 15, 28, 35, 38, 50, 50, 34, 62, 59, 27, 53, 23, 43, 48,
33, 15, 55, 40, 54, 37, 34, 31, 26, 50, 28, 44, 22, 59, 43, 40, 47, 34,
61, 34, 44, 42, 54, 57, 50, 46, 37, 21, 26, 39, 61, 33, 37, 45, 28, 44,
20, 50, 24, 40, 36, 44, 44, 44, 22, 73, 49, 18, 16, 39, 61, 31, 48, 20,
27, 59, 31, 45, 43, 32, 46, 29, 46, 16, 28, 35, 45, 42, 32, 29, 69, 35,
43, 25, 56, 53, 31, 34, 21, 60, 30, 59, 41, 42, 59, 49, 37, 30, 28, 61,
17, 52, 23, 33, 34, 36, 19, 45, 46, 27, 25, 33, 38, 50, 24, 19, 34, 51,
35, 38, 33, 36, 34, 25, 34, 33, 39, 20, 56, 30, 26, 27, 42, 65, 42, 55,
38, 38, 43, 45, 43, 9, 51, 58, 34, 39, 64, 42, 20, 47, 26, 26, 22, 47,
46, 41, 49, 19, 46, 73, 41, 32, 19, 57, 65, 22, 17, 26, 26, 46, 66, 47,
61, 70, 38, 42, 56, 34, 36, 52, 34, 59, 66, 69, 58, 29, 48, 21, 48, 50,
28, 42, 30, 55, 42, 39, 69, 50, 76, 55, 54, 40, 58, 39, 54, 31, 39, 50,
32, 49, 45, 61, 39, 38, 45, 49, 52, 43, 27, 19, 59, 35, 23, 55, 34, 32,
61, 22, 33, 51, 23, 17, 52, 62, 59, 54, 48, 24, 27, 22, 58, 28, 29, 7,
33, 60, 50, 56, 10, 11, 42, 35, 56, 53, 18, 37, 24, 70, 28, 35, 35, 13,
23, 46, 19, 29, 52, 49, 55, 45, 28, 47, 37, 40, 42, 67, 28, 37, 16, 27,
43, 41, 40, 54, 60, 38, 45, 65, 21, 33, 55, 34, 44, 29, 45, 34, 65, 60,
10, 44, 28, 21, 53, 54, 48, 41, 34, 41, 32, 42, 18, 31, 22, 45, 54, 44,
49, 22, 37, 41, 59, 32, 35, 37, 38, 66, 49, 53, 30, 31, 18, 49, 14, 56,
40, 27, 18, 16, 16, 31, 66, 46, 41, 21, 54, 51, 51, 42, 43, 31, 36, 32,
17, 35, 30, 29, 38, 47, 32, 13, 57, 45, 35, 60, 38]},
'test_1': {'capacity': 100, 'num_items': 5000,
'items': [42, 57, 41, 42, 43, 30, 26, 21, 42, 24, 37, 52, 50, 32, 76, 58, 69, 35,
30, 42, 40, 28, 63, 60, 42, 46, 38, 39, 45, 43, 53, 72, 26, 41, 39, 19,
63, 43, 32, 29, 48, 33, 29, 17, 44, 13, 57, 48, 12, 60, 51, 27, 55, 40,
22, 63, 37, 53, 34, 25, 41, 54, 36, 46, 43, 44, 41, 42, 20, 35, 31, 32,
72, 36, 20, 26, 26, 65, 48, 31, 71, 43, 46, 36, 33, 52, 32, 35, 56, 35,
29, 36, 61, 50, 66, 36, 29, 13, 60, 43, 40, 66, 49, 28, 48, 23, 35, 55,
84, 50, 50, 39, 33, 45, 42, 40, 27, 26, 21, 54, 30, 59, 18, 41, 52, 8,
19, 64, 41, 38, 50, 53, 65, 20, 15, 18, 36, 27, 27, 30, 43, 10, 33, 55,
26, 28, 48, 50, 36, 43, 39, 42, 48, 8, 46, 21, 15, 59, 33, 41, 40, 46,
44, 33, 42, 30, 32, 57, 30, 32, 30, 30, 41, 77, 49, 14, 54, 56, 68, 53,
24, 31, 29, 43, 22, 16, 26, 47, 18, 46, 29, 13, 47, 33, 44, 40, 60, 22,
66, 55, 37, 41, 37, 32, 37, 53, 77, 42, 28, 35, 32, 28, 27, 63, 36, 38,
61, 40, 17, 66, 53, 45, 55, 24, 3, 45, 53, 43, 59, 70, 45, 33, 68, 44,
39, 64, 56, 27, 42, 24, 54, 61, 51, 34, 58, 44, 44, 45, 56, 38, 40, 14,
57, 51, 25, 15, 35, 57, 51, 45, 16, 30, 29, 31, 45, 35, 47, 20, 20, 20,
34, 57, 61, 37, 34, 23, 31, 40, 46, 49, 59, 41, 39, 42, 23, 44, 29, 32,
31, 35, 19, 20, 54, 12, 35, 53, 40, 70, 39, 31, 43, 38, 28, 33, 38, 50,
33, 19, 30, 60, 45, 30, 43, 39, 47, 40, 33, 32, 15, 26, 53, 51, 63, 27,
55, 34, 56, 26, 56, 52, 42, 45, 39, 35, 65, 47, 33, 26, 50, 63, 24, 32,
34, 24, 47, 51, 66, 45, 42, 30, 49, 57, 40, 21, 21, 43, 31, 42, 33, 11,
75, 46, 40, 43, 34, 43, 38, 56, 42, 28, 51, 27, 44, 51, 28, 53, 41, 27,
27, 36, 50, 48, 56, 68, 28, 45, 54, 56, 33, 49, 26, 29, 33, 30, 53, 39,
26, 51, 19, 39, 27, 29, 56, 32, 40, 55, 40, 21, 32, 32, 19, 18, 54, 41,
27, 46, 43, 31, 17, 46, 31, 39, 39, 56, 34, 40, 23, 32, 28, 38, 21, 50,
51, 21, 37, 28, 35, 34, 48, 10, 45, 46, 62, 10, 24, 56, 60, 46, 54, 42,
47, 40, 20, 58, 45, 41, 16, 25, 72, 58, 42, 55, 36, 39, 31, 34, 6, 53,
52, 31, 46, 43, 24, 78, 56, 12, 43, 30, 59, 38, 48, 32, 11, 33, 36, 22,
53, 34, 70, 45, 40, 38, 30, 31, 70, 46, 20, 72, 35, 22, 32, 39, 44, 58,
34, 32, 41, 81, 52, 62, 27, 50, 29, 51, 40, 37, 48, 50, 48, 45, 9, 16,
33, 42, 50, 66, 16, 12, 77, 21, 58, 22, 38, 12, 27, 57, 19, 61, 41, 33,
25, 35, 61, 60, 66, 22, 56, 59, 34, 35, 38, 53, 53, 40, 36, 13, 27, 25,
35, 35, 66, 41, 64, 47, 62, 50, 36, 48, 33, 41, 39, 45, 49, 35, 63, 37,
16, 42, 35, 45, 24, 48, 35, 48, 21, 14, 22, 63, 26, 23, 40, 59, 48, 58,
44, 32, 69, 72, 41, 41, 51, 15, 29, 22, 42, 49, 40, 35, 48, 18, 29, 23,
25, 28, 54, 19, 13, 67, 37, 43, 31, 13, 46, 30, 29, 47, 48, 46, 49, 31,
38, 40, 54, 39, 49, 49, 50, 16, 20, 33, 46, 59, 33, 46, 49, 36, 41, 32,
44, 52, 49, 76, 32, 42, 45, 52, 47, 38, 21, 49, 22, 63, 35, 34, 51, 42,
73, 30, 62, 55, 25, 56, 51, 48, 49, 51, 52, 24, 55, 50, 25, 17, 30, 31,
33, 25, 47, 29, 38, 16, 28, 35, 51, 40, 4, 52, 15, 30, 27, 41, 43, 72,
21, 52, 47, 22, 51, 71, 29, 62, 38, 26, 64, 19, 32, 49, 39, 47, 56, 39,
51, 36, 51, 36, 57, 79, 41, 40, 47, 30, 31, 54, 45, 16, 22, 40, 46, 23,
27, 53, 53, 33, 19, 9, 11, 56, 45, 34, 37, 53, 50, 36, 48, 49, 40, 49,
32, 45, 19, 48, 33, 33, 36, 52, 32, 50, 27, 31, 19, 30, 21, 54, 68, 64,
28, 56, 8, 55, 34, 22, 54, 30, 60, 37, 29, 18, 20, 10, 17, 19, 27, 41,
35, 34, 55, 28, 51, 35, 22, 47, 41, 44, 46, 28, 20, 22, 28, 47, 50, 86,
43, 50, 20, 13, 55, 54, 45, 50, 51, 21, 53, 42, 45, 46, 39, 48, 47, 35,
14, 29, 29, 56, 57, 51, 42, 21, 40, 26, 55, 41, 32, 37, 16, 58, 52, 42,
58, 35, 61, 38, 15, 54, 8, 44, 47, 30, 69, 36, 42, 27, 28, 45, 45, 68,
18, 50, 55, 21, 32, 36, 33, 48, 29, 42, 23, 65, 37, 31, 25, 37, 52, 39,
11, 26, 51, 80, 35, 37, 40, 40, 31, 67, 35, 36, 41, 72, 34, 64, 17, 35,
44, 22, 37, 67, 49, 65, 53, 52, 40, 34, 35, 22, 43, 17, 43, 56, 46, 31,
16, 39, 39, 47, 58, 47, 43, 32, 18, 42, 48, 61, 46, 37, 46, 61, 57, 41,
29, 34, 17, 53, 18, 51, 44, 38, 55, 44, 59, 32, 64, 19, 30, 12, 34, 45,
35, 26, 20, 33, 9, 12, 52, 29, 23, 28, 28, 59, 34, 30, 51, 45, 9, 22, 34,
33, 17, 29, 45, 13, 15, 24, 51, 24, 48, 27, 33, 53, 28, 16, 34, 35, 37,
11, 57, 17, 59, 30, 36, 60, 69, 48, 33, 32, 35, 50, 29, 34, 55, 12, 28,
12, 42, 33, 50, 62, 14, 61, 50, 43, 56, 22, 45, 32, 26, 63, 19, 6, 24,
28, 25, 31, 38, 48, 73, 49, 29, 16, 37, 50, 54, 56, 19, 61, 47, 31, 28,
42, 66, 45, 75, 55, 27, 13, 16, 49, 26, 28, 66, 24, 35, 59, 38, 47, 23,
19, 34, 30, 49, 36, 48, 25, 5, 27, 46, 46, 22, 54, 9, 61, 17, 41, 43, 34,
29, 56, 44, 38, 36, 23, 31, 60, 44, 23, 38, 33, 20, 28, 28, 56, 45, 25,
40, 51, 55, 38, 36, 48, 45, 62, 66, 58, 30, 36, 40, 55, 36, 51, 57, 24,
49, 32, 29, 26, 45, 33, 39, 36, 55, 21, 17, 23, 38, 26, 72, 48, 46, 40,
58, 36, 39, 45, 31, 31, 48, 69, 22, 18, 65, 47, 56, 51, 32, 37, 29, 30,
38, 32, 30, 34, 34, 38, 46, 35, 33, 28, 54, 53, 78, 35, 60, 48, 32, 22,
35, 47, 20, 24, 20, 35, 50, 36, 58, 29, 40, 45, 22, 20, 27, 77, 24, 40,
31, 45, 50, 57, 47, 42, 34, 42, 48, 64, 43, 35, 44, 21, 26, 48, 32, 32,
22, 38, 30, 35, 40, 64, 32, 49, 28, 15, 43, 54, 22, 61, 45, 45, 39, 48,
39, 74, 52, 55, 50, 51, 42, 32, 29, 28, 13, 42, 39, 53, 48, 35, 45, 31,
38, 39, 26, 54, 23, 45, 30, 58, 31, 29, 47, 19, 74, 22, 41, 20, 70, 25,
32, 62, 16, 22, 64, 17, 50, 24, 49, 33, 20, 54, 15, 32, 67, 57, 38, 65,
35, 50, 55, 51, 23, 65, 31, 53, 36, 34, 49, 65, 32, 62, 33, 49, 52, 33,
47, 29, 36, 45, 24, 44, 30, 71, 32, 37, 36, 48, 48, 23, 36, 55, 23, 30,
37, 30, 48, 22, 39, 25, 27, 49, 34, 28, 33, 52, 55, 36, 60, 29, 44, 52,
48, 55, 16, 51, 41, 35, 30, 48, 33, 55, 24, 56, 50, 36, 49, 15, 37, 64,
56, 41, 15, 38, 21, 31, 61, 54, 32, 52, 41, 65, 41, 53, 37, 35, 23, 56,
40, 53, 11, 34, 53, 27, 48, 47, 80, 20, 57, 64, 44, 56, 26, 10, 31, 21,
32, 19, 26, 42, 27, 43, 59, 20, 70, 47, 17, 42, 13, 40, 45, 13, 47, 32,
42, 39, 63, 22, 30, 67, 63, 65, 37, 32, 53, 36, 43, 50, 12, 37, 39, 29,
35, 41, 40, 44, 50, 62, 33, 49, 43, 27, 46, 43, 13, 49, 49, 19, 42, 34,
44, 61, 59, 27, 30, 33, 45, 20, 21, 66, 47, 51, 49, 49, 32, 20, 74, 33,
66, 49, 45, 33, 29, 32, 18, 7, 37, 64, 43, 65, 25, 35, 45, 30, 31, 58,
29, 20, 9, 35, 13, 26, 41, 24, 50, 20, 64, 39, 35, 68, 40, 54, 48, 48,
67, 43, 51, 38, 35, 50, 65, 30, 46, 64, 27, 7, 46, 68, 53, 37, 66, 37, 3,
65, 50, 38, 31, 32, 29, 64, 34, 21, 32, 47, 27, 38, 31, 50, 54, 55, 34,
30, 24, 37, 42, 26, 24, 30, 46, 54, 29, 34, 39, 36, 16, 57, 50, 25, 21,
37, 43, 39, 40, 49, 44, 46, 13, 28, 41, 62, 32, 36, 30, 56, 37, 38, 72,
6, 47, 39, 37, 74, 36, 53, 31, 34, 28, 27, 47, 45, 54, 23, 50, 28, 49,
43, 45, 65, 21, 17, 35, 21, 16, 20, 47, 17, 45, 29, 24, 61, 50, 28, 26,
46, 18, 40, 27, 42, 46, 48, 24, 36, 23, 61, 55, 62, 56, 28, 36, 73, 61,
48, 41, 6, 18, 46, 48, 38, 48, 68, 26, 41, 28, 54, 36, 58, 27, 49, 40,
16, 44, 69, 36, 23, 35, 45, 55, 58, 39, 24, 43, 32, 45, 46, 50, 30, 44,
61, 57, 37, 45, 72, 33, 30, 50, 28, 23, 26, 36, 51, 36, 44, 37, 27, 38,
29, 47, 55, 27, 31, 17, 36, 53, 74, 44, 47, 36, 37, 35, 54, 26, 52, 34,
31, 49, 61, 27, 31, 29, 21, 47, 69, 49, 27, 49, 44, 41, 60, 57, 48, 48,
65, 50, 41, 53, 26, 47, 38, 22, 18, 44, 23, 52, 48, 45, 41, 18, 38, 42,
21, 45, 72, 46, 35, 49, 54, 54, 20, 43, 42, 63, 45, 38, 14, 22, 55, 51,
37, 12, 52, 38, 20, 43, 45, 78, 24, 21, 23, 20, 29, 24, 37, 46, 38, 22,
38, 33, 40, 31, 30, 25, 50, 14, 47, 29, 20, 56, 20, 42, 35, 44, 49, 68,
34, 15, 46, 40, 31, 57, 28, 35, 37, 16, 46, 12, 67, 39, 21, 23, 41, 59,
50, 13, 36, 73, 41, 29, 44, 45, 47, 59, 72, 51, 61, 23, 22, 27, 55, 37,
12, 57, 37, 67, 36, 17, 50, 29, 39, 41, 39, 32, 46, 47, 41, 42, 67, 45,
28, 37, 37, 59, 55, 51, 35, 18, 48, 46, 82, 35, 40, 62, 46, 20, 11, 50,
40, 11, 32, 35, 26, 63, 36, 35, 45, 61, 43, 50, 19, 17, 54, 55, 51, 35,
52, 38, 62, 37, 53, 40, 56, 25, 14, 36, 48, 56, 36, 19, 31, 45, 28, 52,
36, 40, 82, 33, 42, 50, 33, 19, 28, 13, 67, 63, 28, 44, 21, 85, 21, 34,
23, 60, 37, 53, 33, 49, 49, 56, 75, 37, 52, 37, 58, 42, 39, 31, 24, 54,
37, 29, 60, 58, 42, 27, 31, 53, 42, 43, 54, 47, 19, 26, 19, 45, 24, 30,
41, 26, 31, 46, 7, 48, 40, 47, 34, 30, 32, 33, 61, 48, 34, 48, 38, 51,
33, 22, 40, 49, 36, 46, 54, 64, 61, 50, 47, 44, 65, 65, 47, 31, 28, 30,
45, 43, 36, 51, 44, 66, 49, 19, 23, 45, 35, 17, 18, 37, 52, 27, 24, 52,
34, 51, 31, 63, 38, 36, 38, 30, 26, 9, 46, 54, 26, 29, 49, 23, 46, 40,
19, 23, 46, 29, 44, 46, 20, 15, 25, 30, 63, 60, 38, 30, 38, 35, 33, 35,
39, 51, 22, 34, 26, 26, 17, 34, 9, 21, 17, 23, 41, 18, 15, 44, 41, 30,
57, 43, 36, 40, 44, 32, 35, 44, 16, 41, 27, 46, 58, 47, 47, 25, 32, 42,
37, 22, 29, 21, 46, 33, 40, 77, 34, 18, 37, 33, 51, 65, 36, 38, 59, 48,
40, 22, 41, 17, 44, 39, 44, 22, 28, 41, 41, 62, 52, 41, 45, 54, 62, 39,
59, 48, 19, 54, 40, 45, 30, 33, 49, 26, 51, 42, 54, 48, 38, 33, 41, 27,
49, 51, 80, 29, 43, 56, 17, 29, 30, 32, 34, 41, 19, 38, 50, 15, 34, 54,
12, 24, 58, 31, 69, 26, 49, 52, 37, 55, 32, 46, 47, 54, 27, 33, 30, 36,
38, 28, 69, 43, 50, 45, 58, 59, 21, 41, 16, 41, 33, 16, 57, 28, 16, 13,
42, 19, 45, 52, 37, 23, 60, 27, 77, 32, 50, 49, 59, 44, 27, 46, 28, 53,
61, 15, 21, 43, 45, 42, 25, 64, 18, 64, 37, 35, 71, 51, 39, 23, 13, 3,
21, 71, 27, 37, 37, 71, 22, 58, 55, 46, 52, 69, 44, 30, 60, 14, 31, 32,
54, 48, 59, 30, 2, 21, 28, 22, 39, 7, 42, 39, 52, 57, 14, 13, 46, 37, 40,
33, 24, 60, 28, 54, 33, 49, 22, 23, 33, 23, 43, 53, 47, 40, 22, 18, 39,
41, 29, 62, 28, 49, 27, 45, 38, 30, 75, 25, 31, 45, 54, 17, 33, 18, 37,
38, 63, 46, 44, 45, 69, 42, 32, 46, 49, 36, 24, 45, 50, 18, 45, 44, 49,
23, 30, 57, 10, 87, 38, 66, 50, 44, 33, 17, 60, 58, 53, 32, 38, 48, 20,
31, 56, 43, 52, 35, 48, 37, 21, 24, 44, 42, 58, 28, 54, 56, 48, 28, 46,
73, 38, 62, 46, 44, 64, 40, 22, 54, 38, 41, 47, 47, 58, 19, 49, 28, 52,
41, 23, 31, 56, 32, 38, 53, 15, 21, 73, 58, 21, 34, 24, 22, 37, 39, 57,
16, 58, 42, 50, 71, 24, 41, 51, 33, 59, 18, 12, 24, 39, 33, 15, 73, 66,
47, 20, 27, 29, 31, 7, 44, 19, 31, 45, 34, 39, 38, 53, 67, 49, 52, 37,
40, 54, 36, 40, 31, 53, 27, 42, 40, 43, 29, 30, 22, 43, 78, 38, 30, 30,
24, 42, 63, 52, 6, 13, 12, 44, 27, 17, 50, 19, 36, 46, 45, 59, 61, 58,
59, 37, 22, 39, 44, 14, 58, 71, 74, 51, 41, 41, 49, 39, 45, 28, 33, 23,
36, 28, 43, 13, 28, 48, 44, 40, 59, 50, 29, 41, 72, 22, 16, 44, 44, 47,
39, 45, 58, 29, 68, 47, 59, 13, 51, 14, 45, 39, 49, 57, 47, 58, 70, 53,
28, 37, 52, 53, 42, 42, 45, 54, 56, 82, 38, 55, 30, 33, 53, 44, 64, 33,
38, 37, 19, 38, 37, 53, 46, 25, 46, 13, 29, 50, 61, 49, 56, 53, 61, 30,
34, 47, 54, 22, 13, 50, 42, 30, 16, 16, 38, 40, 18, 24, 16, 44, 30, 52,
44, 29, 50, 34, 64, 8, 42, 41, 55, 55, 57, 32, 23, 16, 41, 40, 37, 27,
10, 52, 69, 24, 40, 55, 35, 47, 30, 40, 46, 40, 10, 24, 30, 36, 73, 26,
28, 29, 60, 64, 54, 52, 53, 33, 33, 40, 23, 51, 66, 62, 55, 37, 30, 24,
40, 71, 17, 50, 31, 23, 38, 35, 46, 32, 50, 42, 47, 48, 36, 47, 29, 22,
41, 60, 66, 57, 18, 20, 61, 38, 17, 40, 31, 42, 47, 44, 60, 9, 33, 37,
34, 62, 49, 27, 44, 22, 25, 52, 44, 46, 18, 42, 46, 16, 31, 21, 35, 31,
67, 46, 32, 38, 40, 42, 39, 23, 20, 28, 21, 34, 22, 33, 60, 49, 52, 25,
46, 59, 48, 55, 45, 38, 40, 28, 43, 7, 39, 80, 34, 15, 32, 38, 68, 42,
52, 61, 70, 28, 54, 50, 52, 45, 35, 39, 27, 29, 65, 35, 24, 52, 8, 32,
62, 29, 51, 48, 37, 54, 29, 45, 33, 31, 69, 33, 14, 35, 39, 30, 29, 64,
64, 12, 24, 16, 40, 53, 49, 39, 52, 40, 29, 52, 60, 50, 51, 44, 18, 65,
58, 28, 51, 61, 56, 53, 21, 34, 62, 63, 59, 35, 44, 46, 56, 48, 32, 52,
25, 34, 33, 40, 16, 17, 42, 46, 51, 40, 43, 31, 68, 24, 49, 37, 31, 38,
24, 29, 65, 12, 53, 63, 32, 7, 41, 32, 26, 35, 42, 25, 29, 28, 46, 56,
34, 50, 9, 53, 29, 14, 48, 61, 33, 46, 40, 6, 65, 26, 65, 30, 43, 22, 27,
48, 60, 32, 21, 63, 30, 55, 54, 29, 65, 23, 20, 41, 52, 22, 28, 48, 33,
22, 55, 43, 64, 73, 45, 49, 53, 17, 71, 31, 56, 44, 35, 39, 32, 53, 38,
32, 40, 49, 58, 25, 46, 11, 30, 35, 43, 40, 40, 38, 27, 41, 31, 34, 58,
33, 21, 54, 66, 53, 26, 62, 27, 13, 59, 9, 48, 20, 34, 29, 27, 50, 69,
36, 28, 18, 22, 34, 51, 28, 66, 30, 55, 53, 50, 43, 60, 28, 31, 24, 34,
47, 26, 36, 16, 38, 47, 51, 65, 36, 34, 14, 40, 17, 55, 23, 33, 44, 27,
62, 59, 31, 6, 43, 19, 63, 21, 32, 61, 26, 39, 12, 35, 33, 48, 7, 41, 58,
47, 15, 45, 51, 59, 43, 56, 33, 26, 40, 50, 57, 31, 46, 27, 62, 39, 44,
45, 36, 46, 37, 44, 43, 35, 45, 53, 10, 7, 45, 33, 23, 29, 30, 35, 66,
34, 66, 37, 54, 30, 23, 48, 62, 60, 45, 68, 42, 50, 47, 51, 22, 43, 52,
40, 46, 46, 14, 7, 35, 33, 18, 52, 56, 18, 63, 43, 18, 49, 61, 58, 32,
33, 15, 12, 38, 47, 15, 39, 38, 44, 52, 47, 44, 58, 23, 23, 47, 38, 40,
66, 28, 19, 22, 25, 21, 38, 39, 57, 45, 14, 38, 23, 62, 25, 69, 30, 52,
29, 20, 51, 40, 30, 42, 36, 25, 48, 47, 54, 8, 23, 59, 32, 78, 50, 27,
42, 28, 33, 40, 29, 32, 21, 39, 59, 69, 42, 40, 16, 51, 27, 45, 38, 42,
66, 38, 26, 28, 44, 51, 54, 65, 39, 70, 29, 42, 48, 41, 51, 48, 51, 23,
58, 33, 43, 35, 50, 54, 38, 40, 43, 74, 29, 56, 55, 40, 20, 47, 43, 23,
45, 12, 50, 42, 56, 22, 32, 10, 26, 47, 54, 21, 8, 37, 34, 32, 42, 41,
15, 28, 58, 19, 35, 34, 47, 8, 30, 68, 21, 41, 25, 18, 60, 60, 48, 59,
56, 32, 32, 86, 17, 64, 51, 60, 19, 47, 41, 39, 23, 23, 62, 36, 41, 35,
49, 27, 28, 60, 11, 55, 35, 38, 14, 62, 28, 12, 55, 11, 34, 27, 46, 55,
31, 51, 24, 66, 49, 51, 39, 55, 21, 43, 40, 36, 39, 65, 38, 29, 46, 33,
27, 27, 26, 19, 25, 29, 30, 23, 50, 44, 19, 35, 34, 67, 51, 38, 53, 22,
42, 21, 61, 43, 28, 44, 12, 27, 36, 61, 40, 61, 39, 54, 30, 25, 44, 17,
54, 55, 29, 34, 31, 48, 39, 41, 61, 33, 62, 46, 36, 9, 45, 32, 54, 59,
48, 51, 37, 35, 33, 36, 53, 51, 46, 49, 18, 59, 27, 42, 50, 26, 52, 35,
26, 37, 47, 37, 41, 48, 54, 35, 40, 35, 24, 34, 33, 43, 44, 17, 45, 26,
56, 29, 43, 45, 14, 16, 42, 54, 31, 49, 59, 68, 16, 20, 63, 52, 47, 51,
64, 39, 49, 41, 65, 38, 30, 34, 9, 26, 32, 27, 20, 39, 71, 49, 16, 39,
52, 49, 64, 37, 33, 26, 46, 19, 51, 36, 51, 20, 49, 63, 67, 68, 48, 14,
51, 54, 43, 36, 41, 18, 39, 44, 61, 36, 40, 29, 35, 32, 63, 41, 21, 35,
43, 28, 53, 55, 67, 57, 35, 54, 57, 52, 33, 63, 25, 34, 57, 77, 45, 57,
30, 51, 44, 53, 42, 51, 33, 34, 63, 41, 45, 35, 40, 48, 25, 53, 48, 50,
37, 37, 55, 52, 30, 44, 35, 41, 51, 45, 42, 35, 35, 23, 34, 28, 37, 38,
63, 61, 52, 67, 52, 41, 63, 39, 33, 56, 39, 50, 63, 42, 29, 41, 38, 59,
10, 52, 56, 53, 39, 41, 43, 68, 49, 33, 43, 41, 40, 38, 20, 42, 48, 30,
65, 22, 49, 40, 34, 62, 30, 32, 28, 40, 44, 40, 2, 68, 35, 31, 48, 44,
13, 79, 27, 22, 51, 40, 28, 31, 57, 54, 47, 20, 61, 20, 26, 53, 25, 48,
27, 23, 40, 54, 24, 57, 22, 73, 25, 44, 42, 40, 52, 18, 17, 34, 40, 30,
35, 30, 46, 35, 46, 15, 18, 19, 28, 46, 81, 53, 42, 48, 36, 61, 25, 40,
25, 34, 66, 34, 29, 48, 39, 53, 40, 31, 28, 57, 45, 33, 12, 28, 21, 53,
47, 50, 38, 54, 44, 26, 27, 10, 46, 33, 46, 53, 50, 45, 31, 34, 43, 40,
43, 55, 39, 45, 33, 51, 25, 62, 31, 25, 28, 34, 52, 24, 23, 36, 87, 32,
54, 42, 26, 52, 46, 58, 39, 63, 51, 22, 31, 35, 42, 42, 49, 36, 24, 63,
69, 27, 49, 50, 39, 22, 28, 40, 31, 34, 42, 36, 43, 51, 45, 20, 28, 63,
54, 19, 54, 49, 25, 49, 21, 47, 36, 42, 38, 33, 24, 19, 31, 35, 39, 49,
9, 44, 27, 16, 47, 33, 45, 50, 51, 37, 36, 32, 64, 41, 47, 53, 59, 29,
69, 28, 65, 42, 44, 31, 47, 37, 37, 25, 62, 39, 28, 51, 55, 62, 39, 39,
38, 54, 45, 18, 54, 44, 26, 34, 52, 32, 28, 58, 29, 38, 39, 55, 46, 26,
60, 23, 50, 34, 40, 58, 31, 46, 36, 31, 54, 46, 54, 27, 77, 62, 55, 36,
20, 53, 54, 37, 50, 59, 34, 37, 44, 33, 27, 62, 29, 31, 57, 44, 43, 46,
40, 22, 45, 33, 31, 39, 51, 51, 51, 48, 61, 61, 22, 48, 47, 49, 35, 33,
15, 10, 34, 33, 52, 81, 50, 59, 57, 41, 21, 45, 64, 56, 30, 39, 37, 47,
42, 46, 23, 59, 25, 23, 48, 58, 16, 39, 20, 46, 52, 23, 55, 43, 40, 36,
28, 44, 28, 21, 60, 39, 27, 55, 39, 38, 46, 27, 40, 60, 40, 38, 22, 48,
41, 24, 20, 49, 36, 27, 17, 67, 36, 66, 42, 48, 49, 89, 31, 38, 40, 10,
24, 63, 35, 67, 43, 54, 15, 31, 41, 60, 53, 31, 34, 15, 35, 33, 19, 38,
22, 32, 32, 33, 59, 54, 18, 40, 18, 37, 41, 30, 36, 49, 56, 43, 52, 33,
62, 25, 28, 36, 16, 50, 19, 47, 69, 16, 32, 41, 45, 45, 42, 61, 61, 29,
25, 40, 39, 49, 52, 45, 37, 51, 32, 32, 55, 82, 42, 17, 30, 53, 34, 60,
38, 44, 49, 31, 48, 40, 24, 35, 14, 37, 23, 56, 41, 28, 22, 17, 47, 28,
47, 39, 32, 49, 26, 53, 31, 24, 32, 45, 65, 25, 26, 43, 34, 51, 29, 27,
53, 77, 24, 48, 38, 39, 15, 75, 18, 56, 45, 71, 32, 41, 46, 19, 51, 50,
44, 59, 46, 41, 16, 23, 75, 55, 31, 35, 75, 44, 50, 57, 40, 59, 63, 29,
52, 32, 45, 25, 33, 39, 46, 63, 23, 37, 47, 23, 40, 38, 16, 23, 38, 23,
32, 38, 56, 26, 51, 30, 26, 15, 24, 49, 49, 34, 33, 44, 32, 10, 14, 30,
37, 34, 36, 74, 38, 29, 33, 23, 45, 34, 40, 25, 39, 18, 50, 71, 40, 27,
22, 35, 11, 24, 52, 38, 24, 51, 27, 36, 52, 16, 40, 44, 55, 29, 6, 43,
41, 32, 38, 53, 43, 36, 25, 54, 34, 50, 66, 46, 67, 19, 47, 34, 27, 38,
34, 44, 28, 31, 51, 34, 46, 38, 44, 61, 35, 53, 17, 25, 35, 48, 52, 34,
26, 17, 37, 37, 22, 19, 60, 48, 68, 75, 44, 26, 37, 55, 31, 31, 54, 51,
64, 67, 20, 62, 41, 45, 25, 35, 25, 15, 47, 48, 17, 36, 40, 43, 48, 36,
40, 28, 54, 52, 19, 40, 47, 26, 42, 48, 22, 51, 22, 46, 59, 51, 24, 50,
47, 17, 52, 23, 45, 19, 63, 30, 47, 46, 46, 22, 41, 62, 26, 14, 31, 48,
50, 68, 38, 33, 42, 44, 44, 19, 19, 11, 13, 33, 48, 54, 46, 48, 24, 16,
58, 21, 18, 38, 44, 26, 57, 41, 55, 53, 37, 35, 55, 52, 32, 40, 54, 41,
60, 46, 48, 34, 17, 45, 41, 37, 39, 22, 26, 16, 44, 49, 65, 15, 42, 37,
22, 26, 47, 37, 19, 48, 69, 43, 52, 43, 20, 46, 35, 25, 54, 26, 34, 43,
41, 44, 47, 8, 77, 30, 17, 46, 9, 58, 43, 41, 65, 50, 49, 38, 61, 44, 54,
22, 33, 31, 30, 19, 49, 56, 18, 68, 27, 47, 43, 13, 53, 41, 28, 54, 52,
27, 36, 29, 34, 46, 45, 39, 84, 29, 30, 28, 43, 55, 30, 13, 24, 41, 29,
30, 21, 21, 40, 60, 40, 33, 68, 25, 25, 53, 20, 56, 51, 26, 20, 47, 34,
64, 21, 33, 25, 62, 36, 48, 46, 43, 42, 66, 77, 29, 39, 34, 35, 16, 30,
10, 33, 57, 41, 36, 23, 50, 14, 32, 17, 31, 27, 62, 28, 35, 30, 60, 45,
22, 33, 26, 70, 49, 28, 35, 32, 39, 22, 59, 44, 19, 37, 28, 45, 13, 9,
41, 38, 21, 44, 12, 64, 44, 48, 43, 58, 26, 40, 26, 54, 27, 30, 31, 41,
37, 33, 31, 47, 48, 42, 20, 46, 23, 36, 59, 33, 38, 20, 65, 51, 33, 46,
33, 32, 39, 41, 31, 63, 67, 44, 57, 17, 76, 32, 41, 42, 41, 33, 16, 71,
33, 32, 37, 29, 59, 70, 38, 39, 61, 26, 49, 70, 61, 42, 60, 46, 21, 46,
32, 47, 37, 29, 41, 43, 50, 34, 35, 23, 35, 59, 40, 38, 45, 30, 50, 37,
54, 76, 24, 40, 50, 19, 67, 35, 55, 75, 49, 28, 12, 55, 45, 78, 43, 55,
56, 35, 41, 42, 27, 58, 25, 52, 45, 32, 29, 15, 43, 25, 8, 31, 32, 16,
32, 38, 44, 23, 21, 37, 48, 37, 40, 22, 14, 29, 55, 26, 19, 46, 26, 22,
30, 56, 23, 8, 48, 33, 23, 63, 71, 53, 52, 24, 56, 49, 20, 40, 53, 36,
61, 56, 15, 31, 44, 35, 60, 46, 50, 54, 36, 55, 22, 25, 40, 40, 49, 46,
53, 19, 51, 51, 27, 51, 53, 22, 25, 21, 25, 18, 42, 55, 43, 39, 27, 42,
6, 38, 42, 62, 10, 39, 15, 32, 25, 48, 24, 41, 39, 75, 41, 22, 52, 11,
29, 54, 42, 30, 16, 21, 22, 42, 21, 64, 16, 18, 57, 47, 42, 3, 36, 13,
29, 52, 34, 28, 39, 74, 43, 50, 43, 42, 68, 22, 49, 35, 51, 47, 29, 36,
35, 27, 53, 13, 84, 29, 18, 33, 54, 54, 67, 45, 53, 41, 54, 18, 49, 39,
36, 46, 17, 31, 23, 33, 50, 39, 33, 43, 19, 35, 29, 41, 72, 52, 53, 45,
64, 26, 26, 45, 38, 31, 21, 31, 16, 15, 38, 32, 55, 26, 20, 37, 50, 20,
23, 50, 58, 82, 38, 54, 14, 47, 13, 21, 61, 38, 38, 14, 42, 55, 42, 45,
51, 58, 33, 37, 44, 44, 37, 10, 49, 63, 60, 35, 27, 47, 71, 60, 25, 46,
51, 29, 49, 51, 36, 17, 32, 32, 49, 24, 22, 35, 28, 87, 29, 34, 30, 23,
38, 31, 28, 33, 30, 40, 11, 59, 37, 69, 37, 53, 29, 55, 43, 46, 40, 21,
69, 44, 19, 41, 48, 33, 30, 24, 51, 37, 22, 22, 32, 54, 35, 47, 39, 9,
61, 53, 26, 60, 34, 48, 55, 32, 21, 27, 36, 35, 33, 34, 15, 38, 38, 41,
54, 50, 45, 26, 26, 38, 36, 29, 43, 43, 65, 46, 18, 53, 32, 14, 46, 31,
43, 13, 34, 33, 43, 68, 55, 18, 30, 52, 14, 31, 24, 9, 56, 24, 64, 65,
61, 38, 46, 58, 50, 49, 40, 56, 62, 47, 58, 50, 21, 17, 52, 22, 46, 51,
32, 55, 54, 50, 43, 36, 66, 63, 17, 61, 43, 40, 19, 45, 44, 42, 11, 46,
35, 23, 30, 29, 54, 26, 44, 16, 43, 26, 60, 32, 21, 11, 28, 37, 41, 46,
29, 60, 36, 46, 38, 59, 49, 31, 13, 28, 44, 50, 36, 34, 46, 38, 45, 54,
54, 37, 38, 30, 26, 47, 56, 52, 35, 40, 32, 34, 37, 44, 58, 43, 46, 83,
44, 32, 24, 39, 47, 16, 49, 11, 37, 52, 20, 43, 25, 46, 14, 44, 21, 45,
62, 15, 36, 26, 29, 47, 58, 42, 38, 40, 39, 26, 25, 21, 44, 28, 55, 57,
43, 34, 49, 19, 50, 34, 21, 31, 50, 35, 34, 51, 41, 69, 66, 21, 44, 26,
22, 47, 66, 43, 43, 65, 28, 30, 30, 25, 12, 31, 55, 28, 39, 33, 41, 33,
46, 9, 40, 65, 41, 27, 47, 50, 12, 19, 50, 52, 33, 49, 38, 39, 42, 67,
55, 36, 47, 23, 54, 34, 32]},
'test_2': {'capacity': 100, 'num_items': 5000,
'items': [20, 47, 39, 29, 7, 45, 45, 18, 39, 48, 15, 25, 33, 40, 52, 32, 33, 30,
11, 57, 15, 44, 22, 23, 83, 19, 34, 17, 14, 34, 50, 36, 52, 62, 48, 68,
40, 33, 27, 18, 25, 37, 39, 46, 35, 50, 60, 66, 52, 32, 31, 25, 62, 38,
54, 31, 58, 34, 20, 42, 57, 19, 21, 30, 21, 29, 20, 47, 43, 31, 34, 70,
19, 27, 17, 61, 53, 20, 69, 37, 32, 40, 49, 47, 26, 55, 52, 62, 41, 53,
17, 16, 42, 43, 49, 41, 41, 38, 25, 41, 42, 28, 14, 40, 50, 47, 16, 26,
38, 46, 35, 39, 77, 14, 55, 51, 43, 41, 23, 27, 60, 60, 38, 14, 31, 54,
23, 44, 44, 32, 32, 27, 24, 40, 51, 8, 46, 29, 10, 48, 65, 31, 55, 13,
23, 50, 28, 13, 38, 60, 27, 32, 22, 25, 45, 54, 38, 35, 23, 60, 77, 77,
24, 27, 28, 45, 17, 54, 45, 55, 42, 32, 42, 67, 55, 33, 57, 41, 35, 16,
35, 36, 45, 23, 24, 34, 35, 37, 48, 57, 57, 46, 47, 51, 59, 60, 42, 31,
63, 40, 31, 37, 11, 20, 49, 51, 33, 49, 53, 31, 51, 44, 39, 30, 41, 17,
43, 51, 33, 17, 39, 42, 38, 52, 55, 46, 55, 45, 58, 43, 59, 40, 42, 5,
45, 31, 28, 36, 52, 53, 48, 47, 9, 38, 45, 27, 34, 38, 47, 51, 34, 44,
40, 14, 67, 56, 30, 25, 42, 37, 21, 31, 69, 51, 46, 45, 55, 26, 58, 45,
50, 58, 44, 66, 27, 23, 28, 50, 39, 74, 30, 12, 24, 18, 27, 40, 55, 59,
58, 37, 29, 17, 17, 37, 21, 16, 41, 17, 39, 33, 42, 30, 60, 31, 32, 23,
32, 28, 17, 60, 24, 36, 29, 25, 81, 43, 44, 51, 51, 46, 28, 32, 36, 57,
39, 32, 31, 46, 35, 25, 70, 46, 50, 53, 50, 35, 49, 30, 33, 64, 41, 25,
29, 47, 26, 61, 54, 64, 29, 35, 35, 58, 47, 26, 58, 8, 66, 41, 64, 52,
22, 34, 38, 17, 14, 44, 33, 24, 36, 56, 49, 29, 35, 23, 15, 49, 79, 42,
36, 18, 50, 32, 27, 44, 36, 50, 51, 24, 83, 48, 35, 33, 37, 14, 32, 33,
34, 38, 40, 63, 31, 41, 51, 34, 71, 56, 37, 46, 52, 62, 36, 35, 57, 43,
26, 36, 43, 53, 17, 66, 39, 23, 42, 39, 17, 53, 57, 32, 44, 32, 44, 30,
53, 32, 41, 22, 38, 39, 15, 22, 45, 46, 59, 35, 31, 14, 37, 38, 24, 33,
53, 29, 39, 37, 61, 36, 47, 37, 29, 25, 47, 42, 31, 41, 59, 55, 28, 44,
49, 50, 33, 41, 51, 43, 32, 58, 55, 38, 49, 38, 36, 40, 54, 72, 53, 51,
42, 47, 49, 48, 57, 52, 33, 27, 33, 28, 41, 22, 48, 25, 50, 23, 41, 36,
54, 55, 25, 53, 26, 8, 47, 44, 48, 26, 8, 50, 39, 44, 68, 44, 70, 50, 44,
52, 39, 64, 41, 64, 52, 38, 16, 20, 11, 41, 25, 29, 35, 37, 17, 21, 46,
40, 32, 25, 14, 57, 29, 31, 20, 32, 48, 70, 48, 20, 61, 57, 25, 59, 35,
80, 27, 26, 54, 45, 54, 50, 46, 23, 48, 31, 40, 27, 43, 24, 48, 61, 36,
41, 41, 31, 42, 55, 49, 48, 37, 20, 35, 45, 37, 11, 32, 54, 50, 4, 24,
61, 48, 63, 38, 43, 38, 27, 20, 52, 22, 11, 38, 53, 27, 43, 26, 40, 47,
38, 42, 56, 52, 72, 53, 40, 25, 50, 43, 49, 32, 55, 25, 51, 37, 41, 56,
47, 37, 57, 29, 27, 60, 34, 42, 61, 46, 31, 38, 54, 48, 34, 55, 59, 38,
43, 22, 27, 28, 29, 30, 53, 60, 16, 55, 13, 39, 29, 28, 44, 42, 53, 60,
33, 48, 48, 44, 40, 57, 50, 59, 28, 31, 65, 23, 27, 44, 46, 57, 36, 60,
23, 23, 58, 51, 47, 15, 57, 50, 33, 14, 42, 44, 19, 24, 42, 40, 51, 37,
33, 50, 39, 38, 28, 31, 49, 55, 68, 42, 81, 21, 38, 55, 49, 39, 31, 36,
59, 62, 62, 79, 36, 55, 57, 23, 24, 32, 18, 53, 34, 70, 32, 38, 40, 43,
41, 35, 30, 53, 24, 47, 38, 36, 30, 52, 28, 67, 58, 23, 29, 33, 21, 54,
42, 44, 41, 33, 52, 35, 42, 39, 44, 50, 34, 53, 29, 50, 26, 8, 41, 39,
25, 48, 34, 45, 30, 35, 38, 57, 65, 34, 33, 47, 28, 42, 62, 42, 12, 31,
51, 13, 51, 47, 28, 76, 54, 34, 66, 18, 51, 32, 27, 48, 46, 15, 36, 43,
58, 35, 32, 41, 43, 16, 52, 22, 70, 19, 34, 25, 45, 27, 41, 33, 43, 47,
43, 62, 29, 62, 56, 33, 23, 72, 66, 44, 28, 29, 16, 20, 55, 53, 48, 59,
44, 44, 39, 14, 42, 40, 47, 67, 28, 51, 19, 44, 42, 41, 50, 12, 47, 37,
38, 11, 31, 51, 25, 29, 5, 22, 32, 51, 44, 56, 61, 43, 16, 50, 38, 20,
62, 70, 31, 37, 30, 69, 46, 13, 19, 45, 20, 10, 42, 34, 64, 56, 10, 35,
41, 32, 34, 48, 61, 55, 37, 49, 40, 26, 42, 35, 44, 41, 62, 29, 34, 34,
41, 54, 55, 35, 34, 37, 30, 29, 36, 62, 35, 38, 45, 31, 35, 37, 43, 38,
48, 45, 43, 28, 50, 49, 42, 64, 29, 75, 47, 60, 30, 55, 56, 62, 48, 35,
36, 22, 43, 56, 30, 37, 41, 21, 31, 60, 56, 15, 38, 32, 53, 25, 26, 36,
65, 40, 30, 42, 54, 47, 10, 11, 36, 61, 31, 53, 33, 21, 58, 42, 39, 43,
83, 44, 26, 25, 52, 10, 30, 29, 45, 30, 56, 39, 12, 38, 56, 33, 29, 31,
42, 36, 25, 24, 44, 54, 43, 48, 29, 38, 57, 50, 21, 67, 42, 28, 38, 22,
68, 11, 38, 15, 28, 58, 47, 24, 43, 50, 27, 17, 38, 20, 39, 53, 34, 61,
37, 57, 30, 20, 33, 65, 43, 44, 65, 38, 38, 15, 69, 49, 40, 30, 41, 14,
45, 43, 27, 56, 30, 45, 53, 39, 72, 32, 35, 15, 48, 18, 66, 54, 58, 44,
40, 40, 48, 25, 33, 62, 38, 43, 38, 20, 21, 29, 45, 35, 41, 61, 48, 25,
42, 36, 25, 34, 51, 39, 46, 53, 68, 21, 26, 18, 49, 49, 12, 29, 29, 46,
63, 38, 32, 49, 67, 28, 39, 19, 42, 55, 44, 44, 29, 26, 29, 33, 24, 22,
22, 57, 55, 29, 19, 34, 59, 43, 45, 37, 58, 80, 28, 76, 39, 51, 20, 32,
55, 34, 43, 65, 14, 60, 41, 33, 30, 35, 38, 51, 37, 49, 33, 43, 34, 21,
91, 9, 67, 41, 52, 24, 45, 35, 38, 35, 33, 37, 52, 42, 37, 45, 24, 44,
38, 32, 47, 38, 47, 65, 73, 31, 47, 46, 29, 70, 35, 36, 19, 34, 59, 46,
23, 31, 31, 21, 33, 32, 32, 43, 43, 23, 66, 52, 20, 35, 51, 47, 23, 58,
40, 44, 43, 12, 75, 41, 31, 35, 30, 48, 34, 28, 47, 43, 53, 37, 57, 36,
37, 45, 41, 60, 34, 33, 41, 17, 26, 67, 63, 46, 69, 29, 46, 27, 51, 38,
39, 47, 33, 31, 58, 38, 32, 53, 39, 41, 44, 20, 15, 23, 52, 44, 46, 49,
40, 13, 46, 25, 52, 48, 44, 29, 70, 42, 41, 19, 36, 54, 28, 48, 42, 34,
64, 13, 22, 46, 60, 58, 65, 52, 46, 38, 56, 36, 52, 18, 41, 64, 59, 41,
47, 20, 64, 15, 33, 72, 45, 36, 51, 47, 39, 38, 30, 58, 78, 56, 47, 38,
53, 36, 21, 62, 57, 37, 46, 54, 14, 36, 58, 67, 42, 41, 37, 31, 30, 55,
59, 46, 42, 31, 42, 22, 24, 62, 36, 52, 44, 54, 30, 24, 61, 19, 49, 63,
52, 57, 42, 9, 66, 17, 54, 23, 40, 27, 59, 53, 45, 48, 42, 22, 22, 42,
51, 47, 30, 40, 26, 34, 50, 47, 33, 37, 27, 31, 45, 61, 34, 40, 36, 29,
59, 34, 56, 38, 24, 32, 51, 47, 26, 22, 69, 25, 58, 25, 57, 11, 45, 15,
54, 34, 52, 16, 47, 29, 54, 18, 29, 32, 66, 43, 51, 37, 59, 46, 35, 19,
44, 43, 35, 18, 36, 59, 36, 33, 42, 42, 48, 35, 36, 5, 19, 35, 39, 63,
25, 44, 42, 41, 61, 52, 37, 42, 37, 48, 51, 65, 41, 30, 29, 25, 44, 48,
74, 19, 22, 40, 28, 45, 35, 44, 35, 46, 27, 41, 75, 42, 19, 27, 39, 50,
19, 49, 32, 38, 71, 50, 24, 45, 31, 33, 23, 45, 32, 30, 60, 33, 25, 25,
34, 14, 46, 37, 38, 30, 34, 31, 49, 62, 42, 33, 39, 49, 23, 65, 27, 29,
81, 59, 54, 43, 31, 56, 23, 59, 65, 44, 50, 59, 45, 32, 41, 29, 11, 14,
25, 37, 22, 37, 44, 62, 44, 28, 53, 9, 49, 44, 34, 49, 67, 51, 37, 26,
45, 28, 24, 57, 31, 54, 16, 36, 32, 22, 28, 19, 24, 39, 69, 46, 22, 39,
58, 45, 41, 23, 26, 60, 35, 50, 43, 35, 57, 32, 19, 45, 10, 42, 36, 15,
78, 40, 57, 21, 33, 56, 51, 15, 67, 26, 25, 64, 38, 36, 39, 43, 30, 35,
34, 44, 29, 29, 18, 32, 40, 68, 46, 24, 40, 48, 31, 40, 19, 36, 45, 57,
17, 18, 31, 31, 31, 25, 53, 42, 34, 21, 48, 30, 7, 56, 48, 25, 32, 52,
44, 32, 55, 57, 59, 63, 48, 33, 9, 12, 44, 42, 50, 44, 37, 56, 57, 26,
42, 27, 49, 31, 24, 14, 31, 51, 26, 15, 27, 37, 37, 57, 30, 53, 41, 12,
57, 42, 27, 31, 40, 18, 56, 22, 37, 48, 30, 35, 36, 37, 32, 35, 49, 35,
34, 38, 26, 57, 60, 46, 32, 50, 37, 41, 36, 45, 47, 40, 45, 29, 18, 40,
53, 52, 42, 33, 26, 44, 32, 39, 60, 43, 60, 24, 44, 75, 55, 27, 32, 19,
20, 42, 21, 41, 41, 47, 34, 46, 55, 38, 35, 49, 36, 45, 34, 22, 41, 68,
31, 12, 36, 27, 52, 46, 26, 15, 37, 59, 26, 52, 38, 35, 54, 13, 48, 46,
55, 57, 39, 52, 35, 44, 52, 24, 51, 41, 59, 53, 36, 38, 62, 44, 58, 18,
41, 44, 44, 26, 38, 35, 42, 49, 52, 37, 33, 46, 56, 42, 44, 47, 63, 24,
47, 69, 31, 32, 11, 23, 46, 43, 53, 65, 56, 17, 54, 29, 36, 38, 54, 33,
37, 53, 46, 30, 46, 28, 30, 41, 31, 23, 49, 35, 33, 62, 43, 44, 30, 18,
52, 57, 38, 42, 30, 42, 44, 44, 39, 46, 50, 44, 27, 61, 29, 31, 33, 41,
68, 49, 36, 13, 32, 62, 41, 59, 39, 24, 12, 57, 53, 31, 66, 19, 47, 47,
51, 60, 21, 41, 50, 49, 31, 26, 64, 26, 48, 29, 4, 35, 48, 51, 52, 33,
23, 26, 60, 44, 55, 23, 44, 41, 47, 52, 26, 13, 75, 12, 53, 43, 54, 40,
57, 36, 17, 33, 49, 25, 54, 10, 34, 43, 28, 37, 48, 31, 25, 54, 22, 70,
55, 39, 57, 39, 14, 39, 20, 57, 39, 35, 42, 40, 35, 30, 70, 24, 43, 42,
28, 43, 13, 32, 19, 42, 53, 63, 31, 44, 19, 41, 29, 51, 30, 61, 45, 43,
47, 65, 56, 53, 23, 27, 54, 39, 56, 47, 50, 54, 49, 51, 15, 35, 32, 68,
41, 76, 16, 43, 36, 23, 40, 43, 12, 30, 56, 57, 47, 18, 31, 53, 22, 47,
21, 39, 47, 43, 29, 51, 29, 39, 36, 54, 24, 30, 62, 36, 70, 16, 46, 24,
15, 26, 20, 42, 55, 29, 57, 59, 30, 47, 60, 37, 43, 43, 27, 42, 55, 26,
12, 16, 45, 42, 57, 39, 22, 37, 38, 41, 38, 46, 22, 10, 51, 32, 38, 41,
17, 17, 28, 35, 43, 25, 51, 35, 45, 67, 42, 18, 41, 35, 77, 30, 20, 46,
46, 43, 44, 41, 50, 29, 45, 26, 31, 41, 32, 44, 31, 58, 26, 30, 66, 14,
55, 30, 19, 48, 55, 53, 15, 64, 32, 43, 21, 40, 78, 37, 29, 46, 29, 25,
40, 67, 32, 53, 29, 48, 28, 48, 26, 70, 53, 52, 47, 19, 22, 44, 49, 48,
29, 55, 44, 30, 55, 32, 50, 51, 45, 63, 71, 28, 13, 26, 48, 34, 43, 49,
39, 38, 69, 14, 32, 38, 50, 48, 37, 50, 33, 52, 28, 39, 46, 37, 30, 28,
28, 32, 35, 24, 38, 33, 36, 52, 37, 27, 32, 15, 41, 36, 53, 23, 33, 11,
43, 48, 32, 50, 35, 69, 31, 39, 10, 22, 18, 40, 21, 8, 39, 39, 32, 28,
35, 61, 47, 28, 41, 61, 71, 39, 37, 42, 55, 46, 23, 42, 64, 28, 33, 22,
65, 26, 35, 26, 23, 22, 53, 51, 50, 22, 50, 49, 28, 15, 48, 58, 53, 51,
44, 25, 26, 59, 47, 51, 25, 21, 40, 32, 26, 35, 68, 34, 17, 59, 63, 29,
22, 27, 8, 21, 49, 43, 46, 28, 53, 43, 16, 58, 56, 56, 38, 41, 53, 51,
58, 50, 52, 31, 44, 26, 36, 52, 38, 14, 31, 40, 24, 52, 58, 37, 56, 43,
62, 58, 25, 55, 30, 40, 60, 26, 23, 26, 61, 18, 43, 43, 47, 21, 38, 51,
33, 60, 39, 40, 40, 58, 38, 43, 31, 49, 28, 20, 48, 36, 42, 28, 36, 22,
62, 19, 52, 28, 47, 51, 58, 56, 32, 29, 75, 55, 32, 40, 34, 47, 57, 49,
32, 41, 20, 25, 38, 42, 30, 53, 24, 25, 53, 42, 17, 29, 21, 44, 46, 33,
32, 54, 35, 48, 30, 66, 43, 44, 71, 66, 46, 57, 64, 9, 41, 22, 39, 45,
43, 33, 26, 46, 41, 34, 32, 66, 18, 40, 22, 52, 29, 73, 31, 36, 36, 50,
26, 56, 62, 19, 76, 43, 39, 55, 39, 44, 58, 15, 27, 16, 47, 35, 50, 23,
58, 57, 44, 53, 48, 24, 63, 20, 39, 40, 39, 30, 38, 32, 44, 29, 43, 30,
49, 45, 45, 42, 69, 16, 26, 57, 36, 37, 56, 47, 15, 57, 64, 36, 50, 42,
39, 9, 45, 14, 36, 33, 34, 47, 32, 52, 26, 41, 33, 19, 43, 15, 25, 55,
59, 33, 33, 32, 44, 56, 67, 84, 33, 42, 44, 61, 47, 24, 71, 29, 22, 36,
33, 41, 19, 36, 24, 51, 36, 29, 26, 26, 35, 28, 38, 49, 58, 35, 47, 31,
43, 30, 23, 19, 29, 33, 50, 44, 71, 13, 20, 22, 31, 44, 62, 23, 25, 31,
24, 48, 25, 58, 32, 31, 37, 34, 63, 56, 16, 59, 51, 25, 30, 69, 32, 39,
50, 55, 28, 37, 87, 35, 70, 52, 33, 41, 47, 9, 52, 55, 32, 59, 47, 79,
35, 55, 12, 25, 24, 36, 18, 52, 34, 28, 56, 20, 35, 24, 40, 61, 42, 61,
29, 29, 30, 64, 45, 22, 45, 28, 45, 30, 46, 47, 33, 25, 34, 43, 53, 41,
20, 43, 60, 49, 46, 55, 50, 32, 45, 33, 62, 14, 57, 54, 35, 26, 58, 36,
52, 68, 29, 56, 30, 13, 38, 22, 30, 33, 52, 35, 63, 42, 50, 44, 23, 52,
37, 17, 56, 49, 44, 50, 50, 48, 37, 52, 35, 43, 46, 12, 52, 45, 34, 36,
22, 46, 51, 50, 33, 34, 35, 25, 28, 71, 33, 34, 10, 19, 20, 42, 39, 73,
37, 39, 30, 43, 40, 15, 55, 35, 32, 49, 51, 41, 55, 42, 44, 46, 20, 44,
61, 46, 55, 34, 27, 32, 33, 41, 56, 33, 63, 7, 34, 7, 36, 36, 50, 15, 30,
45, 29, 39, 62, 30, 66, 37, 40, 61, 35, 25, 64, 20, 38, 29, 17, 23, 41,
42, 50, 49, 45, 27, 28, 46, 69, 24, 57, 34, 43, 22, 34, 19, 30, 21, 11,
62, 47, 44, 50, 37, 39, 32, 33, 10, 56, 39, 17, 35, 57, 42, 55, 41, 30,
38, 27, 44, 28, 31, 36, 52, 17, 12, 37, 47, 48, 20, 55, 47, 38, 62, 48,
41, 48, 46, 22, 59, 37, 39, 30, 39, 32, 19, 51, 33, 61, 52, 46, 47, 34,
32, 44, 41, 42, 64, 23, 31, 48, 62, 19, 50, 34, 40, 21, 43, 19, 31, 57,
37, 52, 69, 49, 45, 28, 35, 23, 21, 35, 27, 41, 58, 8, 20, 41, 37, 46,
26, 45, 21, 39, 54, 21, 41, 41, 26, 58, 16, 69, 49, 26, 30, 32, 63, 51,
30, 74, 42, 36, 46, 31, 54, 24, 27, 21, 62, 30, 41, 34, 62, 59, 21, 40,
22, 29, 69, 31, 17, 36, 44, 36, 65, 49, 52, 52, 22, 51, 35, 55, 28, 43,
28, 45, 28, 48, 49, 47, 41, 34, 60, 28, 45, 32, 77, 44, 36, 25, 58, 17,
50, 51, 39, 40, 9, 52, 21, 15, 41, 34, 49, 57, 28, 21, 47, 26, 68, 47,
13, 54, 49, 26, 63, 34, 52, 35, 28, 7, 46, 63, 17, 20, 32, 27, 42, 17,
55, 50, 14, 33, 45, 36, 15, 10, 46, 25, 41, 49, 67, 20, 27, 49, 28, 36,
68, 37, 34, 59, 44, 55, 34, 69, 51, 56, 36, 30, 63, 60, 84, 48, 44, 44,
47, 34, 58, 45, 39, 23, 33, 39, 85, 64, 56, 42, 46, 43, 35, 32, 55, 28,
46, 23, 58, 28, 31, 54, 52, 31, 48, 35, 50, 24, 35, 54, 13, 10, 23, 51,
38, 24, 53, 3, 18, 34, 55, 54, 23, 42, 54, 12, 36, 50, 39, 43, 29, 38,
36, 41, 40, 36, 32, 29, 46, 37, 69, 36, 36, 50, 40, 28, 21, 45, 42, 16,
49, 50, 36, 37, 24, 30, 32, 29, 36, 20, 57, 16, 25, 53, 49, 23, 51, 40,
22, 59, 32, 45, 40, 31, 44, 39, 26, 29, 38, 60, 41, 71, 39, 37, 20, 26,
39, 32, 40, 45, 43, 67, 32, 45, 53, 29, 54, 36, 41, 33, 24, 57, 51, 55,
40, 64, 25, 27, 20, 18, 31, 43, 18, 24, 30, 25, 48, 53, 18, 39, 37, 54,
25, 35, 31, 35, 34, 30, 44, 12, 45, 31, 44, 38, 17, 50, 31, 31, 37, 42,
43, 33, 35, 22, 26, 48, 47, 33, 58, 29, 53, 31, 27, 66, 6, 60, 46, 36,
27, 66, 54, 57, 71, 5, 12, 42, 42, 15, 28, 43, 71, 21, 53, 48, 33, 27,
55, 14, 51, 34, 17, 53, 30, 32, 37, 59, 39, 29, 64, 50, 48, 51, 32, 28,
29, 32, 49, 18, 58, 49, 46, 35, 50, 40, 48, 33, 27, 35, 51, 38, 51, 57,
14, 78, 34, 18, 33, 33, 35, 45, 34, 40, 12, 25, 53, 56, 27, 31, 40, 27,
48, 68, 48, 29, 42, 19, 38, 53, 33, 19, 54, 17, 27, 42, 69, 60, 37, 65,
57, 55, 65, 48, 42, 76, 23, 26, 64, 52, 55, 6, 27, 26, 29, 30, 26, 64,
50, 59, 54, 58, 34, 47, 42, 50, 55, 53, 24, 28, 21, 51, 39, 56, 37, 49,
37, 56, 37, 58, 49, 39, 61, 40, 41, 19, 50, 65, 50, 53, 45, 54, 20, 30,
29, 27, 53, 37, 56, 24, 37, 54, 46, 18, 11, 43, 19, 34, 22, 27, 29, 35,
48, 56, 48, 53, 27, 38, 39, 26, 33, 15, 62, 28, 56, 43, 31, 15, 45, 50,
23, 49, 27, 57, 25, 36, 32, 54, 60, 38, 33, 28, 32, 49, 34, 14, 27, 58,
20, 21, 23, 43, 38, 29, 52, 78, 41, 63, 50, 38, 36, 39, 65, 36, 38, 61,
59, 47, 45, 17, 57, 24, 69, 74, 23, 50, 32, 35, 55, 42, 54, 47, 29, 52,
42, 27, 12, 60, 11, 33, 28, 48, 38, 25, 45, 59, 28, 61, 42, 33, 29, 27,
64, 20, 27, 15, 56, 15, 64, 34, 41, 27, 77, 52, 51, 36, 40, 43, 59, 23,
19, 49, 44, 47, 45, 37, 38, 39, 31, 35, 41, 18, 55, 38, 60, 38, 20, 52,
21, 26, 49, 73, 35, 29, 32, 29, 17, 47, 31, 38, 36, 31, 33, 22, 14, 17,
44, 72, 54, 58, 32, 49, 29, 28, 50, 62, 42, 35, 30, 22, 35, 29, 40, 43,
42, 50, 33, 42, 61, 42, 40, 34, 44, 30, 15, 64, 48, 35, 25, 44, 41, 53,
26, 46, 61, 38, 20, 39, 63, 24, 34, 52, 17, 30, 41, 45, 40, 55, 56, 27,
44, 31, 23, 24, 52, 39, 24, 51, 46, 60, 27, 52, 34, 62, 22, 48, 58, 38,
39, 60, 72, 24, 51, 51, 12, 48, 7, 20, 19, 46, 27, 45, 21, 31, 34, 35,
50, 6, 40, 45, 47, 42, 37, 24, 66, 43, 39, 40, 64, 30, 48, 9, 47, 47, 59,
40, 34, 46, 33, 45, 44, 49, 34, 56, 48, 31, 39, 58, 62, 30, 24, 42, 28,
59, 57, 61, 38, 60, 35, 23, 46, 46, 40, 44, 43, 38, 34, 51, 49, 49, 39,
37, 21, 74, 48, 80, 39, 30, 23, 53, 48, 42, 20, 44, 35, 53, 34, 52, 14,
32, 73, 36, 24, 41, 42, 46, 39, 35, 40, 18, 14, 34, 27, 38, 54, 28, 29,
41, 71, 18, 48, 41, 32, 34, 13, 37, 24, 23, 38, 47, 42, 47, 53, 38, 31,
9, 37, 59, 33, 29, 67, 9, 27, 44, 53, 13, 29, 38, 52, 32, 31, 22, 54, 43,
42, 20, 32, 43, 17, 60, 17, 38, 40, 25, 67, 50, 40, 16, 72, 41, 43, 12,
47, 10, 34, 31, 28, 43, 63, 55, 42, 17, 31, 62, 53, 19, 22, 28, 46, 42,
29, 76, 17, 21, 41, 31, 32, 42, 43, 43, 24, 36, 59, 5, 60, 37, 18, 46, 9,
48, 53, 51, 60, 40, 21, 9, 19, 38, 44, 32, 41, 30, 43, 52, 26, 20, 46,
37, 40, 54, 40, 36, 10, 29, 54, 56, 19, 35, 59, 33, 42, 39, 32, 50, 31,
33, 57, 15, 32, 34, 41, 55, 43, 55, 59, 41, 69, 32, 34, 21, 34, 32, 43,
55, 27, 28, 49, 22, 34, 37, 36, 39, 58, 42, 45, 50, 14, 39, 56, 46, 73,
21, 29, 37, 34, 56, 55, 37, 44, 49, 40, 51, 64, 64, 62, 60, 10, 43, 34,
43, 20, 31, 44, 41, 40, 29, 57, 68, 47, 44, 28, 27, 34, 53, 49, 48, 38,
51, 25, 15, 31, 28, 42, 50, 37, 33, 38, 24, 36, 29, 38, 65, 48, 60, 40,
40, 42, 10, 36, 36, 46, 64, 45, 38, 51, 20, 45, 39, 38, 44, 12, 61, 27,
44, 62, 50, 69, 57, 58, 53, 31, 56, 29, 39, 21, 35, 40, 29, 36, 28, 56,
15, 55, 59, 50, 46, 8, 38, 54, 15, 46, 29, 59, 56, 52, 33, 34, 74, 34,
38, 43, 25, 37, 42, 40, 64, 58, 31, 28, 47, 21, 60, 54, 62, 70, 27, 44,
17, 25, 35, 7, 58, 6, 68, 39, 37, 4, 44, 30, 41, 12, 42, 24, 31, 24, 58,
48, 37, 38, 44, 43, 45, 42, 31, 17, 41, 52, 55, 45, 24, 5, 56, 73, 25,
30, 36, 59, 24, 46, 18, 57, 30, 31, 34, 40, 61, 46, 49, 40, 44, 45, 20,
43, 33, 42, 38, 54, 10, 39, 42, 40, 12, 48, 36, 32, 33, 43, 38, 28, 28,
18, 61, 27, 23, 37, 51, 31, 30, 46, 22, 32, 27, 36, 44, 79, 45, 50, 44,
6, 33, 28, 31, 15, 36, 54, 43, 51, 51, 21, 57, 21, 24, 17, 53, 38, 41,
37, 18, 21, 27, 43, 42, 20, 18, 55, 21, 36, 43, 26, 38, 46, 44, 50, 27,
19, 45, 45, 39, 25, 56, 27, 45, 55, 36, 37, 30, 30, 27, 38, 44, 52, 30,
48, 42, 29, 27, 24, 14, 38, 18, 38, 52, 36, 17, 37, 53, 59, 61, 12, 27,
36, 24, 16, 22, 31, 55, 45, 54, 45, 51, 29, 32, 33, 46, 30, 49, 51, 47,
71, 52, 33, 12, 36, 39, 33, 53, 43, 32, 76, 39, 25, 31, 28, 14, 40, 70,
35, 30, 51, 44, 47, 39, 48, 43, 33, 37, 12, 34, 62, 46, 36, 44, 25, 69,
36, 24, 13, 34, 45, 28, 47, 27, 58, 14, 36, 45, 36, 35, 20, 55, 14, 29,
50, 50, 33, 28, 24, 38, 26, 68, 55, 20, 33, 47, 56, 67, 48, 39, 37, 50,
51, 29, 20, 34, 33, 53, 45, 28, 51, 50, 39, 53, 50, 58, 46, 43, 16, 31,
50, 71, 40, 41, 66, 40, 33, 38, 48, 52, 11, 28, 29, 49, 56, 23, 46, 51,
58, 49, 33, 47, 28, 41, 51, 25, 45, 41, 28, 39, 54, 41, 28, 26, 35, 33,
56, 45, 39, 27, 40, 48, 25, 40, 51, 51, 33, 32, 41, 10, 41, 55, 43, 26,
28, 50, 46, 29, 35, 19, 27, 28, 55, 36, 57, 64, 44, 34, 34, 32, 26, 30,
36, 20, 40, 6, 37, 33, 49, 68, 45, 34, 54, 52, 48, 65, 37, 35, 32, 48,
41, 48, 32, 43, 26, 41, 35, 41, 62, 35, 26, 45, 31, 30, 37, 23, 68, 40,
16, 28, 28, 24, 39, 46, 12, 40, 45, 44, 35, 53, 38, 42, 27, 32, 39, 53,
18, 30, 45, 58, 42, 36, 67, 24, 36, 38, 9, 56, 61, 47, 60, 58, 66, 14,
35, 32, 32, 58, 38, 40, 37, 38, 44, 57, 34, 75, 44, 33, 29, 53, 44, 32,
40, 35, 55, 13, 35, 52, 31, 47, 16, 35, 56, 39, 33, 46, 47, 24, 46, 21,
35, 35, 17, 31, 39, 39, 36, 17, 29, 42, 33, 29, 54, 56, 24, 28, 48, 15,
44, 35, 35, 39, 60, 42, 48, 43, 58, 36, 46, 30, 45, 40, 63, 42, 15, 54,
34, 30, 54, 34, 21, 19, 25, 21, 19, 47, 28, 58, 28, 11, 29, 36, 30, 56,
31, 38, 29, 48, 36, 34, 45, 35, 39, 55, 10, 31, 72, 44, 31, 44, 34, 15,
39, 5, 35, 35, 50, 66, 45, 50, 47, 40, 20, 22, 50, 34, 46, 55, 44, 55,
62, 38, 46, 45, 52, 27, 51, 33, 29, 16, 40, 37, 62, 37, 46, 26, 37, 47,
26, 39, 36, 35, 31, 48, 19, 41, 56, 44, 54, 67, 36, 27, 39, 31, 46, 19,
50, 29, 48, 28, 52, 49, 30, 39, 53, 54, 20, 29, 48, 40, 44, 49, 53, 19,
23, 33, 32, 47, 36, 42, 38, 24, 13, 52, 45, 52, 46, 59, 18, 31, 37, 35,
22, 26, 9, 12, 20, 36, 10, 41, 31, 48, 42, 44, 29, 38, 53, 27, 50, 46,
64, 22, 30, 37, 24, 50, 52, 32, 43, 51, 78, 70, 62, 34, 58, 27, 61, 27,
54, 59, 48, 42, 58, 67, 50, 24, 42, 30, 29, 36, 52, 53, 27, 20, 38, 9,
29, 17, 34, 26, 8, 32, 52, 27, 31, 35, 31, 23, 50, 24, 41, 67, 44, 69,
21, 30, 58, 33, 32, 44, 53, 41, 41, 40, 15, 48, 56, 39, 37, 59, 20, 61,
38, 44, 23, 28, 32, 54, 29, 33, 46, 42, 63, 58, 47, 37, 32, 12, 39, 46,
13, 56, 68, 49, 59, 35, 23, 13, 47, 27, 69, 4, 49, 35, 60, 41, 5, 28, 67,
51, 42, 45, 28, 36, 42, 52, 50, 46, 36, 35, 17, 33, 20, 23, 53, 38, 39,
43, 29, 37, 55, 44, 32, 35, 20, 63, 51, 39, 50, 30, 27, 80, 18, 53, 54,
51, 53, 39, 32, 63, 10, 31, 32, 39, 38, 44, 30, 37, 40, 44, 43, 30, 20,
44, 58, 70, 65, 54, 47, 40, 54, 36, 46, 48, 54, 31, 29, 47, 48, 27, 46,
24, 40, 50, 28, 50, 31, 19, 50, 61, 37, 36, 47, 25, 67, 31, 38, 19, 39,
25, 14, 76, 34, 52, 22, 55, 47, 20, 39, 34, 54, 40, 44, 59, 48, 41, 50,
29, 25, 42, 64, 38, 23, 55, 27, 40, 47, 24, 34, 66, 31, 56, 10, 46, 43,
45, 30, 48, 15, 28, 43, 50, 16, 35, 28, 45, 40, 38, 48, 16, 26, 30, 26,
30, 68, 67, 53, 44, 45, 51, 47, 45, 29, 45, 46, 46, 75, 21, 28, 30, 35,
44, 45, 42, 48, 33, 52, 49, 53, 39, 36, 25, 49, 45, 17, 20, 61, 18, 29,
68, 50, 47, 28, 41, 26, 36, 40, 16, 46, 26, 38, 37, 59, 56, 18, 57, 33,
65, 44, 42, 37, 55, 38, 46, 8, 16, 51, 27, 51, 54, 27, 12, 10, 48, 70,
19, 39, 39, 28, 36, 23, 33, 32, 31, 24, 7, 37, 21, 31, 36, 46, 21, 51,
61, 54, 24, 36, 74, 40, 49, 25, 40, 46, 19, 28, 44, 58, 10, 34, 43, 45,
30, 36, 48, 33, 50, 43, 50, 35, 16, 40, 36, 38, 35, 54, 37, 40, 42, 14,
35, 41, 47, 51, 50, 61, 36, 58, 30, 46, 44, 38, 20, 11, 34, 42, 59, 38,
71, 40, 25, 35, 52, 26, 66, 49, 36, 31, 24, 52, 58, 60, 7, 31, 49, 35,
61, 56, 46, 32, 19, 78, 35]},
'test_3': {'capacity': 100, 'num_items': 5000,
'items': [55, 51, 16, 43, 30, 49, 52, 44, 48, 29, 52, 34, 37, 25, 53, 48, 33, 34,
37, 72, 42, 46, 13, 64, 42, 66, 60, 37, 27, 48, 32, 46, 41, 36, 52, 22,
17, 30, 32, 37, 39, 35, 43, 55, 49, 23, 43, 66, 36, 42, 30, 37, 29, 44,
29, 48, 51, 47, 60, 51, 40, 36, 55, 60, 42, 60, 54, 20, 28, 43, 46, 41,
39, 36, 22, 23, 22, 44, 44, 41, 35, 50, 17, 30, 24, 46, 32, 66, 39, 54,
34, 24, 41, 49, 37, 41, 5, 34, 49, 44, 24, 44, 20, 31, 46, 32, 86, 31,
48, 38, 49, 16, 46, 58, 18, 41, 26, 61, 48, 51, 16, 48, 30, 48, 21, 34,
13, 37, 59, 30, 34, 68, 59, 36, 28, 19, 61, 50, 14, 44, 43, 18, 48, 69,
55, 63, 69, 69, 25, 55, 44, 55, 29, 63, 50, 47, 37, 40, 35, 25, 25, 34,
49, 30, 40, 34, 47, 43, 65, 69, 47, 67, 36, 56, 18, 16, 34, 48, 31, 13,
61, 42, 24, 52, 42, 35, 37, 33, 17, 21, 49, 57, 47, 27, 25, 52, 20, 20,
36, 40, 46, 44, 59, 46, 47, 54, 38, 65, 68, 54, 47, 36, 61, 25, 53, 34,
21, 54, 61, 27, 31, 50, 42, 43, 25, 29, 32, 26, 26, 37, 33, 29, 30, 64,
37, 52, 43, 43, 47, 59, 37, 38, 33, 66, 34, 32, 53, 14, 67, 10, 35, 58,
50, 23, 36, 46, 52, 34, 48, 24, 28, 47, 49, 19, 60, 20, 23, 18, 34, 32,
62, 31, 50, 53, 26, 53, 27, 39, 40, 61, 48, 41, 40, 32, 33, 42, 30, 31,
50, 19, 36, 64, 46, 36, 29, 55, 49, 43, 42, 62, 47, 36, 49, 47, 27, 59,
24, 46, 40, 48, 35, 39, 62, 31, 67, 37, 15, 10, 17, 66, 48, 35, 24, 36,
41, 17, 34, 43, 70, 44, 55, 50, 35, 42, 14, 33, 63, 12, 62, 56, 60, 17,
26, 45, 62, 68, 24, 66, 24, 52, 27, 12, 68, 43, 41, 38, 75, 65, 51, 63,
20, 24, 32, 46, 41, 32, 51, 64, 60, 11, 59, 54, 47, 60, 26, 38, 76, 15,
46, 7, 25, 57, 23, 32, 34, 26, 25, 38, 59, 45, 38, 33, 31, 37, 37, 44,
46, 21, 22, 52, 29, 19, 39, 41, 39, 31, 51, 32, 23, 21, 30, 49, 64, 28,
49, 19, 48, 19, 49, 16, 34, 46, 61, 13, 45, 39, 36, 36, 32, 40, 29, 54,
34, 37, 38, 65, 27, 28, 38, 46, 34, 38, 50, 54, 34, 39, 39, 21, 38, 44,
21, 52, 59, 33, 69, 38, 54, 13, 44, 52, 32, 28, 44, 43, 58, 21, 52, 35,
42, 34, 49, 39, 26, 69, 25, 37, 49, 54, 56, 65, 43, 32, 36, 27, 40, 23,
48, 24, 13, 25, 38, 29, 40, 26, 36, 50, 47, 25, 59, 24, 45, 28, 41, 23,
55, 44, 49, 64, 14, 49, 13, 12, 14, 61, 37, 63, 45, 17, 33, 27, 32, 15,
48, 54, 28, 36, 24, 45, 43, 26, 55, 29, 60, 53, 30, 87, 48, 51, 47, 54,
38, 53, 51, 25, 48, 12, 30, 36, 80, 63, 30, 33, 38, 33, 32, 24, 12, 29,
41, 26, 64, 37, 24, 83, 27, 62, 52, 45, 23, 39, 37, 51, 52, 48, 23, 34,
51, 27, 41, 50, 52, 73, 23, 38, 38, 25, 36, 52, 79, 21, 42, 60, 68, 48,
23, 15, 33, 39, 50, 23, 39, 64, 51, 16, 27, 41, 70, 50, 34, 29, 44, 18,
63, 47, 14, 36, 45, 69, 71, 42, 11, 49, 10, 43, 31, 48, 54, 31, 40, 35,
40, 38, 33, 46, 43, 34, 26, 49, 8, 46, 11, 27, 27, 11, 64, 47, 37, 41,
68, 28, 31, 69, 36, 40, 45, 49, 55, 35, 46, 44, 66, 50, 53, 37, 30, 66,
14, 63, 39, 45, 42, 37, 48, 55, 54, 32, 18, 64, 39, 49, 68, 35, 40, 16,
51, 51, 41, 54, 41, 27, 17, 40, 36, 54, 58, 36, 46, 29, 34, 35, 18, 41,
59, 49, 44, 36, 50, 29, 36, 15, 58, 30, 15, 46, 26, 30, 62, 50, 35, 19,
35, 20, 32, 19, 69, 19, 40, 51, 51, 53, 17, 38, 40, 10, 43, 22, 72, 33,
70, 14, 48, 38, 50, 42, 21, 28, 36, 44, 67, 34, 22, 17, 18, 28, 49, 66,
26, 53, 41, 21, 8, 26, 39, 54, 45, 42, 28, 49, 62, 66, 41, 36, 41, 32,
31, 20, 42, 26, 39, 37, 29, 29, 21, 41, 26, 36, 57, 44, 45, 26, 42, 44,
45, 47, 61, 51, 27, 22, 44, 44, 25, 7, 36, 21, 53, 26, 38, 26, 28, 60,
57, 28, 65, 64, 33, 34, 29, 26, 48, 42, 46, 21, 31, 62, 58, 47, 56, 42,
50, 52, 41, 23, 28, 64, 11, 46, 36, 56, 44, 58, 58, 29, 13, 68, 46, 45,
15, 29, 53, 51, 58, 27, 35, 47, 39, 48, 34, 26, 36, 54, 60, 56, 67, 40,
39, 63, 47, 44, 24, 58, 48, 48, 49, 46, 41, 68, 42, 50, 73, 23, 23, 36,
41, 43, 20, 63, 36, 20, 39, 49, 25, 32, 53, 21, 31, 54, 30, 22, 28, 37,
57, 37, 41, 42, 21, 14, 48, 22, 49, 39, 21, 36, 19, 31, 64, 50, 12, 32,
58, 45, 35, 21, 49, 58, 69, 48, 37, 27, 44, 32, 20, 24, 35, 49, 54, 19,
53, 40, 49, 67, 26, 49, 70, 43, 30, 38, 27, 35, 57, 39, 45, 38, 41, 15,
21, 54, 26, 34, 46, 64, 36, 28, 45, 63, 57, 67, 22, 26, 8, 42, 47, 36,
66, 23, 42, 24, 16, 37, 39, 57, 54, 26, 33, 17, 21, 66, 26, 32, 35, 54,
40, 19, 59, 41, 45, 34, 45, 31, 32, 20, 35, 50, 24, 41, 93, 47, 30, 45,
32, 45, 37, 40, 67, 32, 14, 28, 41, 62, 34, 28, 33, 28, 41, 61, 37, 46,
23, 32, 33, 39, 37, 49, 36, 32, 61, 27, 68, 62, 52, 40, 39, 46, 23, 49,
17, 38, 31, 23, 17, 25, 70, 47, 46, 50, 15, 34, 56, 51, 48, 74, 27, 64,
11, 51, 46, 37, 35, 51, 23, 35, 36, 31, 55, 32, 33, 49, 12, 39, 48, 20,
35, 58, 70, 36, 52, 21, 46, 32, 41, 42, 42, 13, 14, 44, 31, 51, 47, 21,
45, 43, 38, 44, 44, 32, 54, 30, 51, 36, 8, 44, 14, 28, 35, 34, 40, 28,
16, 49, 21, 33, 39, 48, 65, 38, 58, 38, 35, 41, 36, 77, 33, 38, 29, 23,
20, 59, 38, 30, 32, 25, 27, 28, 45, 43, 42, 23, 20, 37, 29, 49, 51, 10,
73, 12, 33, 30, 21, 48, 38, 48, 46, 31, 37, 35, 26, 67, 21, 66, 55, 43,
26, 49, 52, 39, 33, 59, 33, 25, 54, 55, 16, 19, 34, 49, 42, 44, 26, 32,
40, 25, 53, 33, 36, 61, 66, 55, 78, 54, 31, 44, 40, 25, 31, 65, 57, 50,
25, 17, 52, 23, 50, 24, 54, 28, 56, 26, 41, 46, 43, 43, 46, 39, 26, 26,
40, 59, 31, 24, 30, 14, 53, 34, 54, 34, 46, 66, 51, 52, 56, 30, 45, 38,
22, 49, 55, 40, 24, 54, 41, 44, 38, 39, 40, 15, 7, 76, 42, 53, 44, 39,
39, 41, 38, 53, 23, 52, 44, 28, 62, 41, 69, 43, 60, 37, 33, 37, 69, 38,
49, 35, 37, 29, 22, 37, 52, 40, 40, 20, 18, 30, 39, 49, 10, 9, 62, 47,
46, 27, 79, 43, 37, 34, 57, 56, 45, 42, 44, 47, 21, 27, 59, 36, 17, 39,
45, 69, 28, 28, 48, 20, 47, 48, 60, 31, 56, 43, 54, 19, 19, 59, 67, 23,
48, 52, 26, 50, 18, 70, 22, 15, 42, 39, 29, 64, 23, 57, 24, 31, 12, 25,
20, 54, 49, 65, 60, 41, 32, 45, 41, 57, 54, 35, 16, 27, 54, 55, 71, 33,
21, 51, 39, 45, 29, 36, 28, 7, 8, 34, 38, 26, 33, 81, 62, 15, 31, 19, 42,
25, 47, 53, 45, 49, 52, 33, 42, 34, 59, 54, 45, 54, 31, 47, 52, 42, 26,
46, 36, 41, 54, 31, 52, 60, 42, 41, 47, 43, 19, 54, 17, 31, 34, 77, 49,
12, 27, 36, 61, 31, 47, 45, 53, 48, 44, 18, 45, 51, 21, 32, 20, 38, 32,
15, 35, 45, 34, 38, 35, 48, 60, 61, 37, 54, 26, 74, 56, 22, 38, 20, 24,
42, 26, 48, 58, 61, 45, 40, 48, 50, 25, 36, 67, 44, 52, 30, 69, 35, 39,
46, 65, 76, 41, 45, 28, 34, 41, 27, 61, 51, 18, 34, 45, 20, 29, 54, 27,
32, 65, 16, 27, 47, 25, 17, 38, 38, 35, 34, 22, 34, 36, 15, 49, 47, 78,
20, 28, 26, 42, 34, 32, 38, 42, 50, 32, 47, 37, 32, 52, 39, 30, 29, 58,
27, 25, 38, 50, 49, 39, 50, 43, 27, 55, 49, 49, 58, 31, 18, 41, 49, 49,
31, 12, 41, 68, 51, 83, 22, 38, 39, 65, 35, 17, 49, 28, 21, 19, 53, 40,
44, 67, 49, 17, 25, 31, 24, 29, 41, 26, 35, 38, 36, 61, 38, 37, 13, 49,
58, 37, 32, 57, 46, 39, 38, 25, 47, 17, 50, 33, 51, 44, 47, 47, 35, 42,
47, 50, 31, 46, 11, 28, 52, 22, 31, 50, 54, 22, 39, 36, 29, 34, 34, 60,
47, 29, 40, 49, 26, 51, 26, 52, 39, 49, 14, 52, 19, 34, 48, 39, 14, 57,
40, 49, 16, 68, 45, 30, 29, 55, 40, 42, 43, 33, 61, 38, 40, 23, 9, 47,
59, 38, 38, 39, 30, 59, 45, 81, 48, 62, 22, 40, 20, 46, 19, 62, 56, 40,
34, 35, 34, 26, 40, 34, 26, 48, 37, 22, 45, 26, 38, 13, 21, 37, 37, 31,
56, 47, 17, 42, 12, 35, 58, 29, 40, 39, 34, 25, 50, 49, 10, 58, 62, 28,
84, 47, 41, 48, 62, 54, 49, 53, 58, 33, 52, 43, 27, 29, 53, 81, 52, 31,
23, 37, 50, 68, 28, 30, 14, 39, 55, 44, 40, 37, 28, 31, 42, 40, 51, 45,
58, 67, 36, 39, 34, 26, 61, 49, 57, 51, 42, 26, 63, 46, 41, 58, 13, 49,
39, 43, 49, 23, 43, 51, 51, 20, 47, 15, 55, 72, 18, 21, 25, 37, 49, 39,
45, 52, 39, 73, 31, 38, 36, 36, 29, 33, 33, 21, 22, 36, 41, 65, 69, 28,
28, 26, 59, 26, 41, 35, 14, 22, 44, 43, 40, 34, 54, 29, 36, 50, 37, 44,
48, 26, 44, 64, 32, 48, 46, 50, 37, 45, 40, 11, 31, 14, 32, 42, 40, 36,
34, 36, 48, 29, 16, 48, 55, 54, 58, 32, 35, 55, 28, 43, 24, 38, 52, 34,
34, 20, 63, 31, 57, 38, 31, 27, 51, 34, 18, 60, 47, 55, 39, 41, 39, 27,
39, 67, 57, 41, 21, 13, 39, 42, 28, 33, 32, 31, 57, 18, 50, 32, 16, 42,
44, 15, 31, 51, 48, 15, 22, 40, 29, 26, 14, 51, 38, 39, 40, 21, 52, 59,
23, 38, 26, 45, 32, 61, 40, 51, 35, 44, 53, 38, 49, 29, 26, 21, 37, 20,
54, 29, 56, 28, 75, 29, 47, 59, 36, 24, 31, 32, 51, 43, 45, 72, 44, 30,
62, 39, 30, 36, 37, 33, 31, 32, 39, 30, 64, 46, 25, 22, 70, 45, 30, 62,
67, 61, 40, 9, 41, 5, 30, 52, 32, 38, 8, 13, 67, 27, 40, 36, 36, 38, 31,
27, 39, 33, 72, 56, 41, 64, 51, 62, 21, 36, 51, 30, 36, 29, 33, 17, 43,
18, 38, 24, 59, 30, 36, 15, 27, 45, 14, 47, 29, 36, 51, 58, 45, 49, 61,
37, 45, 38, 58, 30, 58, 52, 29, 65, 38, 43, 18, 30, 28, 41, 42, 11, 51,
22, 57, 38, 54, 36, 55, 38, 29, 46, 35, 27, 26, 56, 47, 27, 29, 22, 38,
13, 24, 32, 42, 32, 50, 46, 35, 24, 41, 54, 43, 47, 36, 37, 30, 48, 34,
55, 38, 35, 75, 28, 12, 57, 39, 21, 18, 33, 17, 26, 48, 68, 55, 50, 50,
30, 45, 26, 37, 52, 53, 22, 73, 54, 39, 24, 26, 27, 23, 38, 41, 48, 47,
30, 36, 22, 38, 27, 26, 33, 58, 70, 68, 8, 29, 9, 19, 17, 32, 42, 50, 60,
43, 51, 25, 30, 56, 22, 70, 52, 26, 22, 53, 47, 23, 19, 61, 46, 39, 47,
11, 39, 29, 37, 70, 52, 41, 37, 36, 51, 33, 29, 41, 46, 44, 24, 24, 58,
11, 53, 34, 44, 53, 39, 52, 74, 16, 53, 46, 38, 71, 57, 26, 38, 54, 54,
40, 47, 81, 31, 52, 29, 29, 52, 64, 30, 63, 40, 26, 42, 56, 55, 36, 37,
19, 40, 51, 29, 51, 57, 45, 31, 57, 32, 27, 39, 42, 31, 23, 42, 27, 48,
31, 35, 25, 52, 58, 62, 6, 80, 29, 72, 54, 43, 48, 29, 50, 49, 19, 53,
48, 36, 35, 35, 9, 55, 37, 20, 56, 46, 50, 13, 48, 13, 18, 41, 52, 35,
33, 43, 39, 25, 31, 41, 32, 55, 28, 41, 43, 15, 66, 16, 47, 18, 40, 25,
27, 45, 39, 30, 43, 52, 44, 24, 74, 45, 36, 28, 46, 43, 7, 27, 48, 44,
80, 39, 46, 39, 31, 34, 29, 19, 8, 36, 37, 12, 43, 54, 20, 22, 31, 28,
45, 19, 40, 47, 44, 54, 32, 20, 39, 51, 61, 42, 33, 72, 38, 30, 48, 28,
36, 32, 31, 59, 38, 37, 67, 68, 14, 20, 33, 59, 44, 35, 18, 49, 53, 63,
27, 45, 41, 38, 35, 42, 13, 34, 23, 26, 64, 21, 24, 55, 42, 52, 35, 26,
24, 33, 29, 51, 50, 21, 42, 58, 48, 25, 34, 46, 21, 44, 29, 42, 43, 55,
48, 38, 54, 27, 38, 29, 29, 40, 51, 20, 66, 29, 39, 41, 23, 54, 27, 37,
44, 29, 40, 52, 18, 35, 25, 31, 41, 22, 28, 22, 55, 55, 27, 17, 69, 75,
33, 32, 65, 34, 60, 40, 39, 36, 21, 36, 59, 10, 44, 16, 41, 25, 11, 30,
33, 40, 63, 27, 38, 56, 49, 49, 33, 30, 26, 61, 28, 26, 48, 37, 42, 46,
25, 50, 21, 33, 78, 26, 19, 36, 34, 40, 33, 42, 50, 35, 33, 52, 46, 46,
28, 23, 55, 26, 30, 31, 42, 40, 63, 63, 43, 32, 42, 32, 13, 37, 53, 42,
22, 51, 61, 18, 25, 20, 36, 20, 36, 19, 41, 30, 64, 57, 38, 35, 31, 40,
46, 45, 31, 42, 24, 37, 33, 28, 53, 9, 35, 20, 30, 9, 49, 30, 52, 51, 61,
41, 11, 29, 37, 50, 49, 32, 50, 72, 49, 58, 32, 45, 30, 19, 30, 52, 16,
41, 38, 41, 41, 33, 22, 31, 44, 57, 24, 67, 52, 29, 29, 10, 56, 60, 76,
33, 69, 26, 32, 62, 18, 20, 38, 16, 50, 30, 31, 36, 40, 46, 26, 75, 34,
46, 34, 61, 28, 65, 37, 30, 62, 65, 35, 50, 27, 51, 43, 34, 32, 22, 41,
30, 35, 30, 60, 44, 50, 46, 26, 27, 39, 62, 23, 25, 36, 41, 50, 35, 36,
21, 28, 18, 58, 22, 11, 27, 26, 41, 36, 30, 60, 37, 64, 29, 56, 21, 44,
33, 49, 49, 53, 38, 41, 24, 60, 38, 26, 60, 9, 54, 42, 23, 46, 77, 23,
42, 37, 30, 23, 15, 26, 35, 21, 25, 39, 45, 28, 58, 52, 26, 34, 55, 59,
11, 21, 7, 57, 17, 28, 41, 54, 29, 38, 39, 29, 19, 39, 45, 52, 54, 40,
38, 22, 42, 46, 35, 29, 20, 35, 21, 42, 40, 32, 50, 27, 48, 68, 25, 44,
42, 64, 35, 77, 15, 32, 32, 31, 45, 52, 14, 63, 48, 17, 45, 37, 16, 21,
13, 39, 26, 29, 49, 24, 41, 39, 43, 41, 35, 34, 21, 39, 37, 23, 28, 51,
51, 27, 33, 36, 40, 49, 39, 40, 50, 41, 62, 49, 59, 39, 48, 49, 16, 39,
51, 47, 32, 51, 27, 36, 39, 28, 50, 27, 28, 18, 36, 37, 28, 23, 27, 15,
60, 49, 29, 13, 24, 32, 36, 51, 23, 27, 70, 13, 28, 57, 19, 61, 27, 60,
23, 46, 39, 43, 22, 69, 42, 30, 39, 9, 17, 53, 27, 45, 52, 29, 7, 13, 45,
45, 47, 36, 65, 49, 59, 41, 33, 26, 65, 21, 23, 19, 48, 27, 56, 38, 57,
47, 42, 63, 45, 33, 15, 22, 14, 15, 30, 51, 38, 39, 41, 48, 31, 39, 61,
29, 75, 47, 35, 58, 50, 26, 40, 53, 65, 53, 43, 44, 56, 45, 60, 40, 22,
33, 59, 53, 47, 56, 67, 47, 46, 45, 34, 75, 48, 29, 62, 24, 34, 36, 55,
31, 67, 17, 36, 29, 51, 41, 33, 25, 48, 38, 16, 63, 46, 43, 46, 45, 35,
45, 77, 35, 28, 66, 51, 20, 41, 36, 23, 65, 40, 37, 30, 51, 23, 38, 15,
63, 47, 37, 24, 18, 28, 42, 27, 44, 36, 46, 43, 41, 46, 57, 49, 43, 40,
44, 53, 23, 33, 63, 30, 32, 36, 47, 43, 35, 7, 67, 48, 33, 54, 12, 64,
57, 12, 52, 8, 58, 45, 42, 43, 54, 54, 59, 32, 35, 36, 20, 43, 40, 37,
45, 38, 41, 50, 29, 15, 34, 73, 30, 37, 55, 47, 21, 33, 37, 39, 60, 14,
52, 67, 48, 12, 37, 40, 57, 59, 64, 47, 13, 31, 57, 59, 30, 30, 22, 39,
38, 13, 32, 46, 24, 47, 16, 44, 32, 49, 28, 61, 65, 24, 24, 19, 22, 42,
20, 51, 43, 25, 27, 54, 28, 55, 36, 27, 32, 27, 55, 51, 41, 46, 37, 53,
19, 68, 44, 65, 29, 22, 55, 14, 59, 76, 50, 37, 46, 49, 38, 20, 34, 58,
52, 62, 30, 48, 45, 37, 17, 51, 33, 41, 18, 34, 17, 22, 51, 48, 14, 69,
26, 47, 54, 31, 19, 49, 49, 53, 51, 50, 69, 53, 27, 24, 33, 48, 50, 37,
42, 48, 37, 49, 68, 34, 49, 22, 44, 26, 39, 32, 43, 32, 55, 46, 73, 42,
18, 57, 53, 27, 3, 46, 51, 49, 59, 57, 26, 34, 32, 22, 47, 60, 35, 42,
28, 71, 30, 35, 52, 54, 54, 35, 35, 34, 37, 42, 70, 42, 33, 35, 56, 24,
34, 52, 54, 53, 41, 45, 24, 16, 35, 65, 38, 35, 45, 18, 46, 16, 19, 25,
34, 30, 49, 54, 28, 32, 46, 42, 30, 32, 31, 38, 28, 43, 34, 51, 52, 58,
45, 31, 59, 24, 31, 52, 33, 53, 26, 48, 45, 61, 38, 57, 36, 28, 37, 41,
40, 47, 25, 54, 17, 50, 30, 56, 26, 42, 34, 23, 19, 70, 45, 47, 68, 39,
24, 35, 56, 39, 26, 25, 22, 49, 40, 38, 32, 31, 32, 56, 48, 45, 43, 40,
58, 44, 37, 54, 40, 19, 27, 12, 41, 34, 29, 17, 86, 50, 49, 38, 22, 72,
33, 19, 47, 47, 59, 64, 62, 65, 62, 29, 49, 43, 46, 30, 70, 59, 40, 34,
52, 47, 29, 42, 31, 28, 68, 52, 24, 32, 40, 18, 35, 28, 41, 31, 58, 29,
58, 36, 31, 32, 34, 48, 66, 32, 34, 48, 35, 31, 22, 38, 23, 21, 42, 41,
34, 24, 65, 55, 29, 47, 43, 56, 38, 18, 31, 32, 54, 18, 22, 43, 67, 55,
24, 39, 49, 35, 46, 28, 28, 49, 18, 52, 28, 74, 62, 60, 59, 23, 36, 28,
61, 58, 68, 16, 25, 41, 38, 21, 51, 28, 56, 43, 38, 24, 29, 65, 37, 44,
25, 41, 40, 36, 36, 38, 57, 63, 29, 41, 51, 16, 71, 59, 14, 19, 36, 20,
31, 59, 75, 24, 36, 52, 53, 29, 50, 51, 68, 24, 49, 49, 18, 63, 57, 46,
46, 34, 63, 38, 40, 39, 46, 45, 49, 3, 73, 23, 30, 43, 63, 45, 46, 33,
20, 65, 35, 65, 65, 44, 19, 38, 14, 41, 53, 54, 61, 55, 40, 28, 53, 38,
38, 49, 65, 61, 50, 31, 42, 48, 13, 26, 64, 71, 46, 29, 25, 28, 60, 62,
48, 37, 73, 43, 21, 32, 57, 48, 20, 43, 52, 45, 47, 67, 21, 29, 32, 16,
56, 32, 71, 35, 29, 38, 52, 37, 57, 52, 19, 39, 65, 26, 33, 36, 25, 47,
40, 44, 36, 55, 28, 25, 25, 27, 44, 42, 36, 64, 24, 30, 41, 24, 30, 54,
38, 35, 43, 27, 57, 51, 34, 20, 15, 45, 34, 34, 49, 14, 28, 61, 50, 53,
69, 33, 9, 29, 55, 54, 45, 27, 51, 29, 68, 52, 52, 59, 18, 28, 21, 35,
52, 13, 19, 34, 40, 41, 33, 43, 38, 54, 66, 77, 11, 31, 51, 59, 34, 25,
66, 44, 25, 41, 21, 52, 36, 40, 26, 32, 31, 42, 52, 41, 27, 41, 25, 27,
45, 38, 48, 45, 27, 44, 31, 19, 38, 21, 57, 38, 65, 36, 57, 37, 38, 73,
48, 51, 52, 54, 37, 55, 52, 20, 37, 38, 48, 16, 45, 20, 36, 43, 51, 12,
27, 60, 46, 63, 48, 67, 31, 42, 37, 64, 21, 30, 49, 47, 41, 29, 45, 52,
35, 32, 61, 13, 36, 44, 35, 34, 40, 26, 38, 46, 48, 60, 52, 19, 29, 35,
37, 22, 61, 23, 43, 28, 27, 63, 30, 34, 52, 35, 56, 50, 37, 31, 16, 51,
39, 53, 52, 16, 24, 57, 23, 29, 26, 39, 40, 51, 53, 38, 54, 47, 35, 44,
44, 51, 29, 43, 55, 61, 39, 33, 43, 42, 51, 11, 47, 29, 67, 25, 47, 10,
66, 61, 29, 61, 20, 18, 51, 50, 36, 22, 42, 44, 43, 55, 21, 23, 28, 68,
24, 31, 70, 73, 70, 43, 16, 49, 32, 19, 56, 73, 28, 32, 39, 15, 46, 18,
42, 20, 43, 15, 65, 66, 21, 59, 27, 44, 31, 31, 38, 72, 44, 32, 46, 41,
40, 58, 33, 53, 63, 22, 16, 38, 40, 24, 61, 19, 29, 11, 18, 23, 49, 22,
20, 60, 35, 53, 28, 59, 49, 56, 27, 35, 61, 47, 61, 50, 44, 40, 22, 29,
59, 61, 59, 21, 52, 32, 44, 36, 23, 55, 42, 12, 55, 33, 46, 49, 10, 56,
25, 29, 42, 53, 55, 50, 27, 18, 22, 50, 47, 41, 54, 20, 56, 62, 18, 40,
26, 6, 62, 41, 51, 33, 36, 53, 52, 60, 17, 48, 36, 30, 27, 41, 27, 57,
14, 41, 53, 36, 44, 52, 27, 20, 44, 71, 38, 18, 35, 39, 34, 42, 17, 58,
47, 22, 28, 48, 19, 37, 38, 39, 12, 29, 61, 19, 30, 18, 31, 41, 53, 35,
32, 52, 20, 55, 35, 41, 45, 45, 35, 35, 50, 37, 29, 28, 53, 26, 55, 51,
31, 44, 25, 29, 21, 45, 42, 35, 17, 51, 34, 47, 70, 51, 48, 11, 44, 15,
64, 40, 51, 25, 47, 48, 53, 49, 47, 47, 42, 52, 50, 42, 52, 39, 48, 35,
51, 53, 34, 49, 59, 47, 45, 58, 27, 26, 22, 37, 42, 66, 46, 29, 52, 54,
34, 52, 39, 33, 52, 43, 41, 35, 46, 37, 47, 28, 40, 11, 37, 51, 55, 28,
71, 54, 48, 18, 45, 52, 41, 25, 19, 24, 54, 45, 36, 31, 31, 10, 45, 36,
41, 44, 41, 30, 65, 57, 65, 68, 24, 34, 50, 40, 56, 36, 26, 33, 71, 45,
5, 21, 50, 52, 31, 22, 30, 35, 56, 18, 28, 15, 37, 28, 37, 60, 36, 25,
26, 55, 54, 44, 55, 49, 49, 16, 42, 19, 39, 42, 46, 46, 41, 30, 28, 42,
69, 52, 32, 61, 45, 38, 9, 24, 28, 13, 26, 54, 49, 37, 47, 38, 49, 22,
55, 53, 48, 19, 46, 33, 27, 61, 31, 47, 46, 25, 25, 54, 18, 52, 38, 36,
27, 11, 42, 44, 48, 71, 42, 22, 53, 67, 26, 32, 49, 40, 32, 16, 36, 52,
27, 39, 44, 62, 85, 51, 41, 55, 64, 50, 39, 27, 38, 40, 35, 61, 24, 14,
55, 48, 49, 50, 44, 14, 17, 42, 59, 30, 38, 23, 55, 29, 34, 34, 44, 55,
28, 9, 27, 49, 49, 12, 51, 38, 44, 46, 55, 26, 42, 38, 18, 53, 70, 28,
70, 58, 41, 42, 44, 31, 46, 43, 22, 59, 22, 17, 18, 24, 32, 31, 51, 26,
14, 65, 47, 47, 55, 55, 29, 27, 55, 36, 38, 52, 36, 31, 44, 29, 29, 36,
39, 34, 22, 32, 44, 45, 22, 37, 16, 65, 46, 41, 18, 52, 48, 36, 36, 8,
60, 64, 29, 61, 35, 41, 46, 29, 34, 71, 26, 49, 42, 46, 60, 56, 35, 11,
58, 27, 42, 55, 47, 39, 28, 36, 34, 59, 38, 50, 58, 34, 59, 31, 41, 39,
14, 42, 27, 33, 34, 45, 56, 63, 46, 40, 21, 45, 34, 33, 44, 49, 35, 25,
35, 19, 62, 42, 34, 49, 63, 43, 48, 59, 55, 37, 26, 16, 82, 61, 41, 19,
11, 32, 50, 47, 55, 27, 26, 21, 28, 40, 69, 42, 45, 74, 40, 19, 38, 21,
62, 39, 31, 59, 29, 59, 27, 27, 56, 37, 35, 28, 26, 59, 39, 74, 59, 31,
56, 67, 48, 31, 28, 72, 27, 29, 36, 26, 44, 32, 39, 39, 74, 61, 34, 47,
47, 55, 21, 32, 18, 55, 24, 33, 46, 37, 56, 29, 39, 55, 41, 34, 36, 31,
48, 31, 49, 31, 63, 10, 87, 42, 38, 28, 32, 46, 29, 34, 52, 59, 21, 17,
31, 30, 57, 37, 37, 26, 46, 29, 58, 63, 18, 66, 37, 55, 53, 43, 53, 21,
47, 31, 41, 38, 26, 49, 36, 53, 37, 45, 63, 48, 13, 48, 39, 26, 35, 45,
43, 27, 49, 39, 29, 16, 49, 26, 26, 44, 45, 21, 39, 41, 52, 15, 25, 53,
36, 58, 45, 50, 32, 47, 40, 47, 38, 54, 55, 58, 48, 43, 50, 60, 43, 48,
20, 13, 32, 44, 57, 39, 12, 44, 59, 58, 33, 43, 59, 65, 58, 41, 25, 51,
33, 54, 32, 32, 34, 41, 65, 41, 48, 34, 38, 14, 54, 40, 46, 73, 18, 33,
37, 30, 42, 39, 29, 71, 29, 21, 38, 17, 45, 49, 25, 52, 35, 34, 42, 14,
40, 19, 40, 35, 45, 28, 36, 32, 64, 43, 50, 33, 27, 60, 42, 36, 36, 49,
69, 61, 41, 60, 27, 55, 25, 42, 43, 22, 39, 57, 48, 35, 53, 52, 47, 41,
27, 58, 43, 59, 27, 48, 20, 31, 52, 26, 50, 23, 75, 49, 37, 45, 57, 56,
44, 39, 34, 45, 30, 18, 35, 30, 76, 28, 51, 40, 55, 61, 67, 53, 24, 42,
42, 36, 51, 53, 71, 39, 31, 30, 42, 35, 24, 41, 65, 51, 16, 43, 47, 41,
50, 41, 24, 60, 24, 32, 48, 24, 64, 31, 60, 43, 18, 44, 41, 17, 38, 12,
34, 42, 38, 48, 7, 13, 62, 63, 13, 41, 51, 31, 34, 29, 35, 48, 38, 15,
53, 32, 70, 40, 8, 31, 22, 27, 26, 54, 16, 43, 15, 22, 42, 48, 53, 64,
63, 20, 37, 40, 36, 4, 42, 42, 43, 32, 54, 66, 72, 30, 38, 30, 35, 41,
47, 21, 18, 63, 33, 31, 39, 59, 42, 20, 47, 27, 47, 59, 22, 34, 45, 14,
63, 40, 54, 25, 19, 44, 46, 60, 55, 47, 48, 16, 34, 37, 49, 22, 34, 17,
17, 59, 25, 44, 39, 47, 31, 40, 38, 50, 50, 50, 46, 45, 38, 39, 23, 12,
21, 47, 15, 37, 38, 20, 27, 58, 37, 70, 28, 18, 41, 12, 29, 30, 47, 27,
50, 29, 39, 17, 31, 17, 41, 29, 50, 42, 65, 32, 13, 17, 34, 54, 32, 48,
39, 67, 56, 15, 41, 36, 39, 28, 30, 45, 45, 34, 46, 30, 40, 56, 48, 26,
43, 22, 61, 31, 28, 29, 50, 16, 65, 54, 44, 52, 28, 32, 19, 42, 42, 39,
39, 59, 28, 60, 66, 23, 31, 24, 28, 13, 60, 38, 27, 35, 48, 59, 40, 62,
46, 70, 25, 54, 50, 32, 46, 57, 40, 38, 11, 45, 53, 21, 50, 30, 40, 43,
16, 32, 51, 42, 49, 60, 60, 37, 44, 73, 45, 55, 33, 42, 31, 49, 44, 21,
62, 50, 58, 26, 17, 71, 17, 27, 39, 50, 40, 43, 44, 31, 21, 44, 43, 22,
60, 29, 57, 20, 39, 44, 33, 34, 34, 41, 16, 25, 51, 23, 48, 17, 34, 24,
40, 27, 39, 28, 24, 26, 36, 37, 23, 57, 29, 56, 23, 41, 67, 35, 23, 10,
69, 56, 53, 50, 45, 32, 52, 39, 42, 30, 36, 47, 47, 36, 21, 21, 51, 24,
72, 10, 17, 52, 39, 39, 19, 20, 36, 54, 36, 34, 49, 63, 37, 24, 21, 43,
28, 65, 32, 29, 38, 23, 31, 9, 44, 51, 26, 52, 54, 28, 52, 46, 32, 50,
43, 46, 40, 24, 42, 38, 24, 46, 44, 40, 29, 35, 27, 55, 32, 28, 23, 13,
33, 31, 37, 18, 19, 37, 42, 18, 24, 36, 25, 54, 65, 6, 43, 27, 37, 68,
42, 33, 41, 48, 45, 66, 15, 27, 34]},
'test_4': {'capacity': 100, 'num_items': 5000,
'items': [38, 34, 46, 40, 59, 55, 27, 37, 11, 63, 9, 31, 18, 52, 43, 50, 47, 34,
44, 47, 50, 41, 17, 40, 52, 55, 27, 29, 28, 54, 13, 57, 40, 15, 35, 27,
13, 28, 20, 8, 24, 47, 38, 48, 26, 34, 36, 47, 39, 10, 19, 57, 39, 44,
43, 56, 31, 48, 50, 26, 52, 52, 56, 41, 49, 37, 46, 37, 29, 47, 43, 30,
32, 24, 47, 37, 55, 47, 43, 10, 50, 27, 50, 27, 33, 51, 15, 43, 45, 48,
44, 59, 32, 44, 40, 46, 66, 39, 51, 30, 38, 25, 38, 28, 48, 50, 14, 41,
39, 31, 33, 38, 17, 24, 32, 23, 18, 55, 41, 40, 66, 35, 51, 63, 50, 88,
31, 63, 34, 51, 58, 32, 43, 59, 65, 43, 40, 31, 47, 66, 47, 45, 61, 24,
43, 53, 37, 36, 57, 19, 51, 6, 29, 41, 30, 11, 25, 50, 53, 53, 52, 42,
22, 29, 39, 25, 25, 34, 52, 50, 42, 59, 42, 50, 52, 49, 22, 60, 37, 50,
45, 24, 30, 40, 64, 33, 64, 47, 26, 55, 29, 39, 60, 27, 34, 41, 43, 35,
49, 40, 39, 51, 33, 45, 48, 64, 19, 47, 23, 41, 53, 35, 43, 33, 39, 34,
63, 27, 42, 34, 54, 52, 74, 27, 59, 71, 56, 33, 41, 16, 74, 34, 38, 41,
29, 30, 28, 28, 51, 29, 53, 27, 6, 15, 35, 63, 16, 52, 43, 21, 41, 21,
36, 32, 52, 39, 32, 25, 37, 52, 58, 21, 32, 35, 61, 52, 23, 58, 36, 19,
51, 61, 42, 40, 30, 34, 25, 28, 28, 19, 20, 30, 34, 63, 30, 53, 49, 24,
20, 54, 45, 18, 52, 49, 43, 37, 33, 44, 42, 43, 50, 33, 25, 29, 64, 43,
63, 45, 58, 59, 50, 73, 48, 34, 8, 26, 50, 21, 80, 24, 36, 26, 37, 65,
53, 50, 50, 60, 33, 81, 43, 57, 25, 67, 35, 35, 47, 52, 14, 60, 36, 27,
52, 24, 37, 44, 57, 42, 33, 37, 39, 43, 58, 44, 35, 46, 50, 47, 74, 25,
46, 27, 53, 54, 37, 46, 39, 27, 32, 49, 77, 37, 68, 34, 63, 56, 44, 45,
26, 74, 47, 52, 37, 37, 67, 26, 28, 39, 49, 25, 34, 40, 30, 56, 47, 50,
56, 32, 26, 50, 51, 40, 27, 61, 54, 42, 25, 43, 17, 41, 49, 26, 51, 22,
15, 52, 50, 31, 28, 31, 55, 32, 20, 33, 54, 49, 32, 42, 68, 47, 64, 6,
37, 38, 44, 37, 25, 9, 60, 44, 38, 40, 62, 48, 49, 55, 40, 55, 41, 40,
42, 51, 46, 61, 54, 45, 34, 48, 80, 63, 28, 31, 41, 49, 30, 41, 13, 48,
65, 59, 33, 42, 24, 48, 48, 30, 75, 43, 62, 60, 65, 15, 19, 33, 47, 36,
21, 31, 41, 23, 38, 51, 42, 58, 14, 42, 12, 20, 37, 35, 42, 43, 15, 43,
28, 42, 34, 55, 35, 43, 49, 28, 16, 40, 26, 27, 41, 35, 27, 46, 38, 31,
36, 21, 35, 64, 35, 33, 42, 13, 49, 51, 59, 53, 18, 27, 67, 20, 38, 26,
37, 33, 44, 31, 21, 23, 46, 38, 36, 65, 39, 52, 35, 42, 30, 38, 33, 45,
72, 21, 35, 54, 29, 57, 52, 33, 20, 30, 45, 33, 53, 73, 48, 49, 32, 36,
62, 66, 30, 56, 53, 29, 42, 24, 46, 39, 20, 43, 38, 52, 25, 58, 22, 38,
44, 48, 34, 40, 32, 8, 35, 45, 25, 68, 30, 45, 67, 56, 40, 22, 30, 74,
27, 48, 33, 67, 39, 11, 37, 53, 45, 57, 42, 45, 50, 47, 40, 40, 61, 64,
51, 28, 18, 12, 49, 43, 47, 44, 55, 31, 53, 37, 31, 47, 48, 31, 39, 42,
50, 14, 33, 42, 39, 50, 37, 55, 47, 50, 78, 37, 38, 30, 61, 39, 48, 30,
26, 48, 62, 46, 27, 54, 38, 36, 46, 34, 35, 64, 24, 39, 75, 29, 70, 38,
28, 39, 10, 24, 49, 47, 33, 47, 58, 30, 10, 26, 28, 43, 33, 29, 46, 36,
35, 19, 36, 10, 37, 31, 7, 42, 46, 63, 82, 49, 42, 42, 22, 54, 42, 50,
30, 51, 61, 48, 43, 29, 13, 33, 36, 58, 38, 47, 59, 57, 19, 33, 56, 7,
49, 41, 49, 11, 40, 68, 28, 11, 36, 39, 26, 26, 64, 25, 36, 18, 53, 33,
39, 45, 62, 30, 23, 38, 31, 26, 35, 26, 4, 44, 39, 34, 29, 23, 36, 62,
39, 41, 38, 14, 55, 19, 46, 57, 51, 37, 19, 27, 33, 36, 34, 38, 43, 27,
66, 30, 27, 46, 48, 48, 59, 81, 58, 40, 50, 35, 45, 51, 53, 53, 46, 52,
39, 17, 49, 35, 32, 41, 54, 46, 33, 42, 44, 24, 43, 45, 28, 29, 44, 44,
34, 46, 44, 17, 54, 27, 39, 42, 41, 26, 39, 57, 38, 17, 21, 52, 47, 24,
32, 37, 45, 13, 62, 48, 31, 42, 19, 23, 30, 50, 15, 31, 28, 42, 51, 45,
47, 23, 40, 52, 85, 54, 36, 20, 38, 34, 18, 25, 14, 34, 43, 21, 35, 39,
45, 33, 52, 24, 40, 51, 29, 26, 51, 41, 64, 57, 29, 45, 48, 35, 37, 38,
42, 46, 36, 43, 26, 41, 62, 62, 63, 6, 21, 30, 30, 21, 36, 33, 58, 41,
53, 29, 42, 9, 57, 27, 37, 48, 25, 23, 31, 33, 32, 42, 35, 15, 13, 61,
30, 16, 47, 25, 31, 62, 5, 50, 19, 38, 61, 27, 26, 35, 40, 24, 31, 30,
18, 18, 41, 36, 61, 11, 46, 7, 8, 42, 39, 28, 28, 33, 37, 37, 44, 6, 53,
35, 29, 35, 67, 29, 31, 49, 34, 46, 21, 23, 35, 48, 28, 38, 67, 45, 59,
44, 50, 61, 24, 49, 58, 9, 16, 40, 14, 18, 34, 47, 37, 56, 22, 41, 39,
35, 59, 57, 34, 24, 16, 48, 36, 38, 44, 23, 79, 24, 10, 36, 51, 32, 39,
43, 55, 28, 27, 25, 42, 45, 63, 24, 41, 47, 19, 32, 26, 57, 30, 24, 32,
62, 73, 35, 65, 30, 67, 38, 41, 30, 37, 48, 22, 58, 50, 8, 42, 44, 72,
42, 67, 24, 64, 55, 54, 42, 13, 13, 27, 27, 19, 53, 28, 33, 23, 36, 70,
54, 55, 37, 56, 35, 35, 53, 3, 43, 26, 43, 29, 69, 45, 61, 45, 46, 19,
40, 25, 43, 38, 62, 45, 58, 71, 45, 28, 42, 42, 11, 56, 58, 39, 35, 66,
23, 30, 42, 35, 50, 24, 44, 61, 56, 42, 41, 56, 48, 54, 21, 35, 51, 21,
29, 16, 44, 40, 50, 34, 38, 63, 58, 20, 51, 30, 39, 33, 29, 7, 39, 36,
59, 16, 45, 54, 49, 73, 30, 55, 32, 53, 83, 28, 44, 38, 54, 32, 23, 30,
50, 12, 52, 52, 46, 28, 47, 32, 26, 8, 60, 9, 36, 27, 27, 69, 49, 45, 31,
16, 48, 14, 31, 36, 44, 35, 48, 47, 51, 55, 40, 43, 42, 21, 51, 70, 53,
18, 37, 37, 53, 26, 28, 53, 65, 33, 27, 17, 42, 32, 19, 65, 31, 13, 32,
42, 24, 45, 54, 51, 48, 45, 54, 60, 31, 62, 43, 43, 43, 58, 33, 9, 46,
43, 16, 77, 52, 55, 46, 70, 78, 35, 42, 27, 24, 62, 40, 41, 43, 60, 43,
46, 27, 54, 47, 49, 51, 35, 42, 46, 21, 37, 47, 13, 39, 42, 21, 24, 45,
11, 50, 29, 36, 43, 49, 46, 28, 36, 47, 49, 42, 35, 57, 44, 41, 51, 59,
68, 37, 40, 32, 67, 21, 35, 28, 36, 35, 60, 39, 35, 39, 13, 51, 24, 8,
21, 59, 34, 42, 33, 41, 44, 22, 35, 33, 45, 80, 36, 42, 26, 25, 45, 46,
23, 30, 27, 53, 58, 50, 71, 39, 35, 49, 18, 56, 43, 16, 51, 24, 60, 53,
57, 51, 27, 34, 49, 47, 55, 37, 13, 11, 34, 53, 21, 24, 29, 61, 56, 45,
15, 33, 40, 31, 18, 36, 44, 9, 20, 41, 48, 34, 38, 35, 65, 48, 18, 11,
37, 28, 39, 51, 59, 42, 54, 44, 41, 10, 30, 54, 44, 38, 22, 44, 11, 54,
30, 40, 50, 49, 34, 26, 33, 39, 31, 44, 51, 47, 40, 41, 9, 42, 28, 45,
28, 36, 47, 50, 7, 47, 64, 43, 44, 46, 46, 11, 45, 26, 29, 31, 61, 44,
53, 71, 31, 69, 6, 42, 38, 51, 34, 51, 38, 45, 27, 29, 32, 25, 32, 25,
36, 43, 56, 49, 36, 36, 60, 46, 24, 36, 45, 57, 56, 41, 43, 35, 18, 52,
33, 41, 66, 71, 25, 28, 17, 11, 40, 34, 34, 12, 38, 31, 24, 52, 39, 19,
66, 55, 24, 43, 24, 33, 39, 66, 30, 24, 8, 62, 55, 64, 40, 59, 53, 42,
52, 29, 26, 24, 40, 32, 43, 30, 38, 55, 39, 16, 27, 33, 58, 31, 66, 35,
30, 26, 18, 34, 50, 35, 23, 30, 36, 36, 21, 33, 46, 52, 48, 31, 30, 29,
9, 27, 26, 40, 39, 45, 38, 60, 40, 34, 49, 45, 78, 34, 29, 56, 38, 20,
83, 19, 34, 37, 33, 54, 69, 47, 32, 49, 45, 48, 42, 19, 44, 30, 21, 39,
30, 29, 67, 37, 29, 33, 74, 38, 36, 10, 26, 27, 26, 49, 57, 56, 26, 34,
33, 9, 20, 22, 36, 53, 16, 69, 28, 35, 58, 53, 9, 50, 43, 30, 58, 49, 39,
40, 27, 42, 40, 42, 19, 39, 46, 58, 62, 30, 48, 30, 39, 36, 17, 37, 51,
18, 56, 48, 18, 24, 39, 21, 48, 8, 45, 36, 42, 44, 38, 50, 40, 51, 27,
23, 47, 16, 62, 49, 37, 44, 50, 17, 45, 45, 68, 12, 22, 59, 54, 38, 11,
43, 51, 21, 34, 29, 49, 41, 17, 33, 78, 18, 30, 47, 71, 33, 56, 44, 55,
46, 48, 50, 45, 31, 45, 27, 50, 46, 36, 43, 40, 59, 52, 53, 44, 29, 33,
59, 29, 55, 48, 38, 38, 21, 52, 22, 35, 38, 19, 31, 51, 47, 52, 41, 29,
26, 28, 60, 27, 40, 61, 44, 39, 36, 34, 37, 37, 39, 48, 73, 26, 24, 34,
29, 32, 59, 40, 41, 31, 14, 63, 19, 38, 45, 40, 58, 27, 55, 66, 45, 31,
28, 51, 22, 31, 15, 16, 31, 29, 34, 55, 52, 33, 46, 43, 70, 44, 40, 33,
31, 28, 52, 22, 37, 61, 17, 15, 21, 42, 54, 35, 25, 63, 15, 38, 52, 49,
58, 39, 65, 32, 31, 52, 43, 46, 44, 51, 34, 43, 56, 60, 80, 10, 46, 18,
17, 25, 37, 33, 34, 61, 31, 44, 64, 22, 30, 22, 35, 57, 38, 37, 42, 56,
39, 54, 25, 57, 52, 58, 36, 27, 36, 43, 24, 50, 60, 36, 16, 26, 18, 62,
50, 19, 39, 15, 34, 27, 49, 33, 22, 49, 45, 33, 43, 39, 65, 20, 44, 58,
42, 24, 38, 36, 23, 37, 41, 35, 33, 10, 31, 58, 59, 24, 36, 39, 61, 27,
43, 34, 37, 37, 31, 55, 44, 28, 11, 48, 34, 56, 41, 67, 51, 35, 26, 40,
22, 31, 46, 36, 21, 29, 22, 37, 31, 30, 68, 37, 47, 37, 33, 31, 72, 48,
33, 40, 44, 47, 52, 20, 25, 61, 27, 33, 57, 61, 46, 17, 29, 15, 68, 31,
35, 24, 54, 42, 24, 9, 12, 48, 52, 43, 43, 42, 23, 57, 53, 75, 36, 59,
46, 40, 38, 37, 51, 52, 30, 62, 41, 41, 71, 57, 20, 40, 51, 26, 60, 46,
57, 12, 9, 47, 26, 30, 30, 51, 27, 20, 47, 64, 36, 32, 34, 68, 31, 34,
18, 42, 24, 25, 17, 20, 78, 61, 47, 61, 19, 42, 27, 28, 52, 35, 14, 37,
51, 44, 44, 57, 48, 49, 46, 23, 41, 39, 37, 45, 70, 38, 30, 16, 36, 45,
26, 53, 29, 39, 29, 59, 28, 42, 31, 60, 52, 18, 34, 38, 52, 32, 40, 60,
81, 58, 55, 19, 28, 62, 54, 52, 35, 13, 9, 26, 26, 70, 49, 25, 30, 33,
12, 54, 29, 32, 51, 30, 64, 54, 28, 39, 23, 31, 22, 38, 40, 54, 42, 75,
34, 15, 33, 63, 37, 32, 21, 34, 47, 47, 39, 39, 49, 33, 31, 49, 43, 45,
55, 62, 39, 17, 53, 47, 39, 42, 22, 47, 64, 29, 17, 34, 24, 34, 47, 4,
32, 54, 63, 52, 32, 31, 43, 38, 36, 34, 21, 46, 60, 35, 25, 40, 18, 36,
50, 34, 27, 73, 48, 31, 48, 37, 19, 24, 61, 20, 36, 60, 32, 25, 39, 40,
38, 52, 21, 7, 52, 79, 60, 58, 57, 50, 50, 27, 40, 45, 21, 36, 28, 23,
38, 41, 35, 42, 6, 26, 23, 36, 19, 59, 41, 28, 45, 45, 57, 33, 55, 63,
42, 19, 35, 47, 17, 44, 31, 11, 7, 15, 36, 66, 42, 19, 41, 40, 30, 49,
49, 55, 51, 48, 21, 51, 39, 32, 42, 38, 61, 44, 26, 12, 25, 28, 52, 14,
56, 23, 47, 36, 51, 25, 31, 43, 34, 58, 25, 30, 34, 24, 90, 49, 36, 20,
55, 49, 43, 22, 64, 76, 33, 57, 50, 28, 42, 40, 23, 56, 39, 27, 23, 40,
47, 38, 49, 52, 39, 39, 43, 17, 44, 28, 43, 49, 53, 70, 31, 48, 63, 29,
25, 31, 45, 29, 40, 43, 46, 17, 27, 60, 56, 53, 54, 66, 30, 44, 29, 46,
32, 22, 40, 28, 34, 37, 19, 51, 42, 26, 19, 28, 66, 36, 33, 62, 23, 70,
62, 54, 49, 44, 39, 59, 58, 60, 39, 75, 41, 59, 33, 63, 51, 53, 38, 28,
52, 80, 39, 50, 29, 63, 48, 54, 32, 19, 11, 55, 27, 39, 36, 33, 18, 39,
15, 38, 23, 35, 46, 34, 31, 25, 26, 55, 30, 32, 22, 56, 45, 39, 31, 21,
28, 68, 36, 35, 45, 17, 36, 47, 23, 37, 17, 42, 53, 37, 42, 53, 45, 23,
34, 30, 26, 42, 39, 31, 43, 62, 55, 40, 75, 37, 41, 40, 26, 35, 26, 65,
18, 41, 37, 31, 43, 60, 62, 44, 42, 74, 41, 51, 30, 40, 49, 52, 55, 36,
22, 41, 50, 19, 53, 11, 32, 24, 18, 34, 62, 47, 39, 35, 34, 32, 35, 23,
36, 28, 37, 48, 65, 46, 57, 7, 26, 69, 38, 58, 50, 47, 38, 21, 50, 35,
45, 40, 46, 36, 48, 58, 36, 30, 54, 38, 56, 24, 44, 35, 30, 33, 27, 81,
44, 80, 45, 49, 38, 19, 23, 30, 27, 40, 71, 35, 67, 18, 33, 73, 46, 33,
44, 51, 31, 52, 44, 57, 51, 26, 27, 67, 23, 14, 36, 34, 41, 40, 55, 23,
37, 18, 21, 26, 43, 33, 42, 53, 21, 35, 52, 51, 30, 48, 30, 37, 50, 46,
8, 43, 30, 54, 53, 35, 58, 38, 47, 35, 8, 52, 38, 37, 81, 29, 43, 55, 37,
25, 49, 41, 39, 32, 38, 46, 59, 18, 46, 46, 44, 14, 35, 50, 49, 16, 33,
44, 36, 42, 77, 33, 36, 51, 39, 18, 58, 10, 43, 58, 60, 55, 41, 25, 63,
20, 39, 69, 29, 30, 65, 59, 23, 50, 25, 33, 36, 31, 44, 23, 54, 8, 49,
14, 31, 39, 61, 58, 32, 59, 37, 32, 57, 26, 38, 64, 61, 45, 37, 39, 45,
36, 28, 41, 38, 28, 20, 37, 57, 30, 36, 53, 42, 58, 26, 45, 18, 74, 53,
48, 52, 23, 49, 20, 35, 8, 27, 38, 65, 28, 7, 48, 29, 48, 50, 37, 41, 56,
36, 43, 44, 30, 32, 21, 48, 40, 29, 52, 56, 37, 57, 34, 16, 54, 20, 56,
33, 16, 38, 25, 74, 20, 52, 25, 60, 50, 29, 44, 60, 35, 32, 41, 42, 26,
43, 25, 30, 36, 31, 23, 48, 14, 29, 32, 59, 41, 32, 27, 23, 34, 41, 30,
46, 66, 52, 66, 31, 39, 25, 78, 24, 47, 33, 54, 7, 34, 56, 28, 33, 31,
40, 31, 15, 62, 42, 47, 44, 43, 25, 35, 32, 45, 6, 45, 20, 65, 13, 29,
47, 49, 43, 37, 51, 38, 50, 52, 48, 40, 55, 49, 23, 42, 38, 18, 21, 45,
56, 37, 33, 28, 50, 46, 43, 34, 67, 27, 22, 33, 44, 37, 27, 50, 46, 37,
14, 49, 24, 53, 34, 26, 54, 27, 35, 46, 45, 78, 18, 41, 25, 29, 30, 17,
17, 7, 50, 21, 69, 49, 61, 15, 35, 33, 7, 27, 20, 32, 45, 40, 54, 18, 15,
54, 42, 50, 41, 69, 45, 48, 49, 59, 27, 26, 63, 66, 35, 32, 50, 18, 31,
51, 62, 57, 59, 19, 47, 51, 32, 44, 65, 26, 43, 60, 65, 33, 50, 22, 32,
34, 45, 59, 90, 68, 52, 38, 37, 25, 46, 49, 29, 15, 46, 26, 36, 37, 50,
35, 29, 23, 31, 19, 68, 37, 34, 33, 49, 65, 43, 41, 52, 35, 37, 30, 30,
37, 30, 41, 58, 22, 36, 66, 43, 50, 49, 29, 39, 42, 70, 20, 30, 62, 41,
29, 29, 45, 38, 59, 46, 5, 31, 52, 44, 51, 60, 45, 33, 50, 40, 39, 46,
45, 63, 32, 53, 53, 43, 31, 34, 69, 36, 61, 18, 28, 26, 38, 31, 19, 55,
42, 53, 39, 62, 29, 55, 59, 22, 53, 29, 46, 39, 26, 26, 61, 38, 26, 50,
59, 53, 52, 42, 24, 25, 54, 15, 48, 43, 37, 31, 51, 26, 59, 37, 66, 68,
39, 39, 47, 28, 45, 42, 57, 41, 66, 21, 25, 58, 29, 40, 28, 27, 78, 39,
44, 27, 67, 63, 35, 63, 22, 49, 26, 44, 36, 34, 34, 38, 42, 44, 43, 41,
52, 7, 20, 51, 38, 50, 58, 35, 36, 27, 35, 48, 34, 67, 20, 48, 31, 40,
14, 65, 45, 75, 35, 32, 24, 46, 44, 30, 20, 50, 17, 38, 58, 60, 24, 53,
51, 56, 44, 65, 18, 52, 32, 35, 56, 37, 42, 48, 54, 48, 18, 22, 42, 32,
40, 39, 40, 41, 57, 53, 36, 26, 34, 26, 61, 42, 54, 50, 46, 56, 34, 43,
33, 41, 35, 20, 16, 32, 54, 50, 54, 60, 70, 24, 35, 47, 30, 13, 31, 46,
41, 36, 44, 48, 32, 33, 33, 56, 51, 39, 30, 46, 41, 54, 39, 48, 46, 43,
26, 34, 27, 43, 25, 57, 61, 62, 19, 47, 23, 27, 36, 48, 47, 58, 60, 23,
36, 31, 32, 10, 44, 46, 33, 49, 31, 67, 24, 40, 52, 15, 40, 44, 28, 48,
37, 40, 39, 45, 34, 50, 47, 29, 44, 20, 54, 35, 30, 51, 35, 44, 34, 54,
48, 35, 51, 28, 52, 36, 18, 40, 55, 19, 62, 58, 31, 22, 19, 32, 59, 42,
30, 32, 51, 67, 20, 38, 33, 94, 37, 59, 69, 61, 33, 35, 40, 43, 33, 28,
38, 48, 52, 43, 21, 55, 64, 38, 57, 47, 34, 39, 35, 40, 67, 34, 35, 64,
25, 21, 31, 41, 44, 24, 49, 54, 32, 23, 64, 64, 32, 37, 55, 45, 38, 45,
34, 35, 36, 35, 41, 29, 34, 55, 34, 45, 18, 48, 38, 24, 35, 45, 49, 34,
57, 34, 51, 57, 21, 47, 53, 64, 40, 54, 58, 14, 51, 63, 29, 56, 41, 64,
25, 21, 40, 75, 13, 50, 34, 45, 50, 65, 32, 42, 19, 41, 33, 18, 26, 35,
50, 40, 22, 34, 44, 55, 56, 10, 31, 13, 39, 20, 47, 12, 44, 52, 41, 43,
52, 31, 49, 35, 37, 58, 20, 17, 14, 38, 59, 27, 56, 21, 36, 54, 35, 26,
17, 26, 50, 32, 58, 37, 60, 57, 52, 42, 15, 54, 21, 18, 40, 48, 29, 38,
42, 48, 21, 46, 41, 48, 19, 20, 36, 21, 36, 49, 53, 16, 53, 22, 25, 62,
45, 23, 28, 30, 63, 44, 23, 37, 28, 22, 65, 43, 60, 21, 8, 25, 28, 52,
58, 46, 59, 4, 47, 64, 23, 35, 31, 33, 50, 45, 45, 24, 46, 51, 52, 68,
47, 19, 48, 63, 30, 38, 25, 41, 40, 59, 40, 23, 41, 27, 71, 30, 31, 73,
72, 52, 49, 30, 58, 53, 32, 72, 44, 45, 52, 43, 66, 43, 48, 17, 41, 27,
72, 24, 20, 63, 42, 36, 13, 41, 67, 40, 41, 34, 30, 39, 23, 38, 26, 46,
19, 26, 65, 46, 20, 31, 32, 49, 60, 58, 41, 9, 18, 29, 54, 34, 47, 51,
28, 44, 52, 44, 22, 56, 30, 52, 14, 41, 71, 50, 27, 15, 44, 25, 43, 39,
38, 58, 39, 51, 49, 27, 50, 52, 31, 17, 44, 45, 15, 42, 34, 51, 53, 55,
18, 66, 61, 22, 22, 36, 27, 64, 13, 76, 65, 36, 22, 30, 42, 57, 34, 52,
17, 58, 71, 39, 75, 24, 44, 18, 37, 64, 45, 23, 16, 22, 49, 46, 33, 46,
39, 41, 35, 30, 37, 25, 24, 47, 65, 20, 43, 55, 71, 27, 21, 55, 55, 48,
46, 8, 46, 46, 34, 19, 54, 58, 52, 42, 28, 13, 66, 33, 43, 21, 51, 55,
41, 43, 44, 48, 17, 22, 41, 39, 44, 53, 20, 32, 39, 64, 27, 50, 44, 43,
51, 34, 24, 26, 61, 42, 17, 45, 37, 60, 30, 22, 23, 44, 43, 33, 55, 29,
32, 31, 31, 51, 65, 80, 43, 57, 44, 29, 24, 12, 64, 42, 52, 24, 51, 22,
39, 42, 55, 33, 48, 47, 62, 31, 46, 14, 25, 55, 34, 21, 29, 47, 44, 21,
44, 58, 59, 24, 29, 38, 51, 39, 25, 44, 37, 62, 13, 48, 48, 39, 43, 12,
6, 52, 27, 47, 44, 34, 54, 42, 49, 38, 34, 35, 62, 35, 36, 49, 32, 19,
48, 61, 32, 57, 58, 27, 52, 44, 39, 26, 23, 42, 45, 56, 55, 52, 35, 38,
31, 31, 28, 20, 40, 48, 44, 40, 71, 63, 48, 44, 52, 47, 35, 63, 62, 25,
37, 35, 35, 39, 32, 43, 45, 58, 68, 25, 37, 50, 48, 30, 51, 31, 28, 52,
63, 50, 81, 36, 59, 48, 44, 27, 18, 19, 26, 54, 54, 39, 43, 24, 40, 13,
39, 22, 23, 29, 53, 34, 23, 61, 56, 43, 49, 48, 49, 42, 9, 27, 33, 39,
29, 26, 53, 46, 46, 43, 41, 28, 34, 29, 33, 43, 44, 15, 41, 30, 32, 55,
75, 50, 26, 55, 68, 15, 17, 22, 55, 33, 52, 23, 39, 39, 39, 74, 18, 21,
37, 36, 23, 64, 51, 20, 65, 38, 25, 68, 58, 33, 53, 27, 25, 59, 35, 49,
51, 28, 38, 40, 36, 27, 46, 24, 17, 47, 38, 64, 52, 18, 32, 20, 27, 48,
37, 46, 77, 10, 39, 33, 48, 29, 38, 37, 41, 81, 39, 19, 54, 46, 33, 60,
29, 52, 40, 14, 54, 38, 27, 34, 41, 37, 34, 57, 18, 23, 36, 31, 73, 39,
40, 33, 31, 22, 35, 36, 50, 28, 41, 31, 18, 38, 53, 27, 43, 33, 29, 34,
36, 48, 18, 39, 38, 27, 47, 51, 68, 44, 39, 16, 29, 54, 16, 42, 38, 43,
33, 25, 27, 56, 57, 57, 50, 59, 42, 46, 58, 48, 52, 37, 10, 25, 63, 18,
49, 26, 32, 23, 31, 47, 28, 11, 32, 54, 17, 66, 27, 31, 30, 50, 49, 36,
20, 32, 72, 30, 27, 14, 58, 40, 41, 51, 39, 48, 19, 49, 58, 58, 50, 54,
40, 29, 30, 33, 33, 44, 39, 39, 32, 37, 45, 38, 48, 28, 41, 40, 53, 52,
29, 38, 44, 57, 22, 39, 24, 45, 20, 38, 53, 43, 38, 54, 40, 35, 17, 53,
18, 34, 44, 18, 38, 55, 48, 46, 35, 26, 21, 34, 62, 53, 46, 30, 6, 18,
63, 56, 15, 58, 68, 47, 49, 47, 43, 26, 42, 31, 28, 42, 18, 35, 66, 45,
53, 67, 41, 31, 34, 48, 42, 57, 40, 47, 16, 67, 45, 61, 8, 12, 44, 74,
35, 41, 40, 37, 38, 46, 37, 56, 32, 57, 25, 51, 48, 47, 31, 60, 15, 64,
39, 46, 37, 38, 10, 48, 31, 62, 13, 26, 34, 33, 53, 61, 28, 67, 8, 33,
24, 32, 26, 66, 35, 52, 32, 43, 43, 27, 45, 34, 33, 35, 51, 33, 48, 39,
33, 40, 20, 30, 32, 34, 71, 62, 29, 54, 31, 24, 47, 11, 22, 18, 34, 41,
36, 65, 41, 35, 63, 27, 29, 44, 38, 13, 36, 23, 25, 40, 55, 47, 49, 46,
36, 53, 38, 16, 13, 28, 63, 28, 49, 15, 46, 12, 24, 50, 24, 49, 61, 79,
37, 21, 45, 33, 38, 38, 30, 49, 48, 52, 49, 45, 48, 9, 47, 49, 44, 49,
28, 28, 43, 10, 46, 52, 15, 51, 45, 54, 30, 10, 50, 25, 44, 25, 53, 50,
13, 65, 20, 66, 25, 39, 10, 40, 10, 38, 50, 36, 30, 51, 46, 53, 31, 41,
42, 35, 62, 51, 14, 33, 37, 57, 43, 56, 21, 22, 50, 41, 50, 27, 32, 11,
49, 56, 23, 54, 32, 46, 44, 29, 31, 25, 19, 50, 37, 46, 47, 48, 51, 20,
43, 57, 33, 44, 46, 70, 34, 45, 13, 36, 53, 28, 50, 10, 48, 27, 19, 52,
22, 51, 49, 65, 21, 40, 40, 18, 53, 27, 38, 37, 32, 74, 52, 23, 40, 54,
55, 51, 61, 34, 37, 43, 33, 33, 73, 48, 46, 48, 54, 49, 20, 33, 37, 43,
15, 36, 42, 40, 29, 43, 18, 31, 56, 36, 24, 57, 48, 67, 20, 16, 15, 62,
35, 53, 36, 43, 35, 35, 51, 62, 53, 66, 44, 34, 50, 34, 40, 58, 44, 52,
25, 30, 23, 52, 32, 50, 27, 28, 48, 30, 53, 50, 50, 35, 15, 22, 19, 45,
51, 22, 39, 36, 49, 61, 57, 58, 40, 43, 81, 79, 54, 41, 20, 22, 37, 12,
34, 61, 23, 37, 57, 36, 38, 43, 30, 60, 20, 45, 35, 32, 23, 27, 33, 30,
22, 24, 51, 23, 26, 35, 10, 70, 48, 38, 11, 24, 67, 32, 24, 62, 49, 24,
30, 49, 51, 31, 32, 14, 59, 50, 51, 30, 68, 38, 19, 37, 34, 46, 37, 63,
32, 21, 41, 43, 24, 41, 67, 26, 36, 46, 54, 61, 49, 35, 16, 16, 16, 56,
41, 41, 17, 40, 12, 46, 48, 19, 73, 31, 11, 52, 50, 26, 41, 55, 35, 23,
56, 22, 33, 60, 44, 23, 40, 23, 31, 43, 46, 26, 40, 40, 56, 29, 33, 24,
20, 53, 62, 22, 51, 68, 62, 56, 30, 56, 49, 64, 35, 39, 29, 36, 47, 24,
74, 36, 39, 54, 18, 21, 55, 34, 70, 24, 37, 31, 39, 63, 11, 42, 61, 31,
62, 46, 25, 38, 19, 53, 33, 26, 23, 52, 52, 36, 30, 10, 48, 58, 26, 29,
16, 23, 34, 22, 15, 26, 42, 15, 18, 46, 59, 58, 30, 42, 49, 16, 14, 50,
29, 27, 41, 48, 59, 42, 32, 33, 43, 43, 53, 52, 43, 63, 44, 19, 46, 43,
34, 50, 50, 23, 37, 36, 76, 50, 49, 54, 40, 35, 52, 42, 15, 32, 27, 22,
36, 26, 62, 31, 37, 50, 59, 35, 28, 18, 33, 39, 56, 44, 53, 39, 13, 12,
42, 44, 56, 58, 45, 31, 44, 74, 28, 46, 44, 31, 36, 40, 35, 41, 23, 34,
27, 27, 64, 39, 31, 51, 15, 38, 58, 41, 30, 31, 56, 44, 43, 41, 31, 10,
56, 66, 19, 54, 43, 35, 50, 40, 43, 50, 39, 19, 29, 17, 16, 46, 33, 11,
38, 47, 47, 33, 21, 45, 35, 37, 78, 69, 42, 59, 50, 30, 43, 50, 49, 29,
61, 46, 62, 25, 39, 67, 32, 43, 21, 26, 16, 26, 18, 55, 37, 33, 23, 33,
45, 47, 32, 51, 45, 23, 56, 49, 75, 28, 21, 34, 28, 40, 47, 34, 37, 43,
25, 31, 56, 65, 38, 14, 25, 33, 20, 7, 40, 39, 25, 56, 28, 51, 24, 52,
35, 46, 57, 52, 38, 56, 31, 18, 14, 20, 45, 36, 28, 24, 30, 50, 39, 43,
64, 31, 22, 48, 42, 42, 68, 51, 16, 37, 22, 43, 55, 22, 26, 41, 40, 29,
27, 35, 29, 59, 42, 50, 59, 31, 29, 52, 55, 30, 26, 30, 30, 39, 32, 40,
19, 45, 30, 32, 12, 52, 37, 26, 45, 36, 60, 58, 15, 9, 38, 38, 36, 44,
47, 27, 38, 46, 36, 44, 26, 28, 24, 32, 44, 14, 31, 62, 60, 61, 12, 45,
38, 55, 27, 30, 30, 70, 48, 38, 49, 33, 46, 47, 39, 43, 22, 29, 31, 37,
69, 14, 45, 81, 38, 45, 32, 13, 41, 7, 38, 44, 54, 45, 35, 13, 35, 53,
55, 25, 9, 15, 36, 40, 26, 35, 25, 45, 15, 55, 47, 22, 50, 29, 41, 35,
46, 25, 33, 23, 20, 35, 34, 31, 32, 29, 42, 46, 19, 60, 57, 31, 29, 31,
36, 50, 59, 51, 33, 31, 61, 64, 28, 58, 48, 43, 24, 33, 40, 43, 21, 48,
37, 44, 14, 31, 28, 41, 33, 50, 52, 59, 54, 50, 23, 47, 27, 28, 54, 44,
34, 28, 60, 46, 37, 29, 28, 54, 14, 26, 19, 41, 46, 31, 20, 74, 27, 31,
38, 48, 24, 48, 57, 72, 11, 43]}}
def l1_bound(items: Tuple[int, ...], capacity: int) -> float:
"""Computes L1 lower bound on OPT for bin packing.
Args:
items: Tuple of items to pack into bins.
capacity: Capacity of bins.
Returns:
Lower bound on number of bins required to pack items.
"""
return np.ceil(np.sum(items) / capacity)
def l1_bound_dataset(instances: dict) -> float:
"""Computes the mean L1 lower bound across a dataset of bin packing instances.
Args:
instances: Dictionary containing a set of bin packing instances.
Returns:
Average L1 lower bound on number of bins required to pack items.
"""
l1_bounds = []
for name in instances:
instance = instances[name]
l1_bounds.append(l1_bound(instance['items'], instance['capacity']))
return np.mean(l1_bounds)
opt_num_bins = {}
for name, dataset in datasets.items():
opt_num_bins[name] = l1_bound_dataset(dataset)
if __name__ == '__main__':
print(datasets['OR3'].keys())
================================================
FILE: baseline/funsearch/funsearch_bin_packing_llm_api.py
================================================
import json
import multiprocessing
from typing import Collection, Any
import http.client
from implementation import funsearch
from implementation import config
from implementation import sampler
from implementation import evaluator_accelerate
from implementation import evaluator
from implementation import code_manipulation
import bin_packing_utils
import json
import multiprocessing
from typing import Collection, Any
import http.client
from implementation import sampler
def _trim_preface_of_body(sample: str) -> str:
"""Trim the redundant descriptions/symbols/'def' declaration before the function body.
Please see my comments in sampler.LLM (in sampler.py).
Since the LLM used in this file is not a pure code completion LLM, this trim function is required.
-Example sample (function & description generated by LLM):
-------------------------------------
This is the optimized function ...
def priority_v2(...) -> ...:
return ...
This function aims to ...
-------------------------------------
-This function removes the description above the function's signature, and the function's signature.
-The indent of the code is preserved.
-Return of this function:
-------------------------------------
return ...
This function aims to ...
-------------------------------------
"""
lines = sample.splitlines()
func_body_lineno = 0
find_def_declaration = False
for lineno, line in enumerate(lines):
# find the first 'def' statement in the given code
if line[:3] == 'def':
func_body_lineno = lineno
find_def_declaration = True
break
if find_def_declaration:
code = ''
for line in lines[func_body_lineno + 1:]:
code += line + '\n'
return code
return sample
class LLMAPI(sampler.LLM):
"""Language model that predicts continuation of provided source code.
"""
def __init__(self, samples_per_prompt: int, trim=True):
super().__init__(samples_per_prompt)
additional_prompt = ('Complete a different and more complex Python function. '
'Be creative and you can insert multiple if-else and for-loop in the code logic.'
'Only output the Python code, no descriptions.')
self._additional_prompt = additional_prompt
self._trim = trim
def draw_samples(self, prompt: str) -> Collection[str]:
"""Returns multiple predicted continuations of `prompt`."""
return [self._draw_sample(prompt) for _ in range(self._samples_per_prompt)]
def _draw_sample(self, content: str) -> str:
prompt = '\n'.join([content, self._additional_prompt])
while True:
try:
conn = http.client.HTTPSConnection("api.chatanywhere.com.cn")
payload = json.dumps({
"max_tokens": 512,
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": prompt
}
]
})
headers = {
'Authorization': 'Bearer sk-ys02zx......(replace with your own)......',
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
'Content-Type': 'application/json'
}
conn.request("POST", "/v1/chat/completions", payload, headers)
res = conn.getresponse()
data = res.read().decode("utf-8")
data = json.loads(data)
response = data['choices'][0]['message']['content']
# trim function
if self._trim:
response = _trim_preface_of_body(response)
return response
except Exception:
continue
class Sandbox(evaluator.Sandbox):
"""Sandbox for executing generated code. Implemented by RZ.
RZ: Sandbox returns the 'score' of the program and:
1) avoids the generated code to be harmful (accessing the internet, take up too much RAM).
2) stops the execution of the code in time (avoid endless loop).
"""
def __init__(self, verbose=False, numba_accelerate=True):
"""
Args:
verbose : Print evaluate information.
numba_accelerate: Use numba to accelerate the evaluation. It should be noted that not all numpy functions
support numba acceleration, such as np.piecewise().
"""
self._verbose = verbose
self._numba_accelerate = numba_accelerate
def run(
self,
program: str,
function_to_run: str, # RZ: refers to the name of the function to run (e.g., 'evaluate')
function_to_evolve: str, # RZ: accelerate the code by decorating @numba.jit() on function_to_evolve.
inputs: Any, # refers to the dataset
test_input: str, # refers to the current instance
timeout_seconds: int,
**kwargs # RZ: add this
) -> tuple[Any, bool]:
"""Returns `function_to_run(test_input)` and whether execution succeeded.
RZ: If the generated code (generated by LLM) is executed successfully,
the output of this function is the score of a given program.
RZ: PLEASE NOTE THAT this SandBox is only designed for bin-packing problem.
"""
dataset = inputs[test_input]
result_queue = multiprocessing.Queue()
process = multiprocessing.Process(
target=self._compile_and_run_function,
args=(program, function_to_run, function_to_evolve, dataset, self._numba_accelerate, result_queue)
)
process.start()
process.join(timeout=timeout_seconds)
if process.is_alive():
# if the process is not finished in time, we consider the program illegal
process.terminate()
process.join()
results = None, False
else:
if not result_queue.empty():
results = result_queue.get_nowait()
else:
results = None, False
if self._verbose:
print(f'================= Evaluated Program =================')
program_: code_manipulation.Program = code_manipulation.text_to_program(text=program)
func_to_evolve_: str = kwargs.get('func_to_evolve', 'priority')
function_: code_manipulation.Function = program_.get_function(func_to_evolve_)
function_: str = str(function_).strip('\n')
print(f'{function_}')
print(f'-----------------------------------------------------')
print(f'Score: {str(results)}')
print(f'=====================================================')
print(f'\n\n')
return results
def _compile_and_run_function(self, program, function_to_run, function_to_evolve, dataset, numba_accelerate,
result_queue):
try:
# optimize the code (decorate function_to_run with @numba.jit())
if numba_accelerate:
program = evaluator_accelerate.add_numba_decorator(
program=program,
function_to_evolve=function_to_evolve
)
# compile the program, and maps the global func/var/class name to its address
all_globals_namespace = {}
# execute the program, map func/var/class to global namespace
exec(program, all_globals_namespace)
# get the pointer of 'function_to_run'
function_to_run = all_globals_namespace[function_to_run]
# return the execution results
results = function_to_run(dataset)
# the results must be int or float
if not isinstance(results, (int, float)):
result_queue.put((None, False))
return
result_queue.put((results, True))
except:
# if raise any exception, we assume the execution failed
result_queue.put((None, False))
specification = r'''
import numpy as np
def get_valid_bin_indices(item: float, bins: np.ndarray) -> np.ndarray:
"""Returns indices of bins in which item can fit."""
return np.nonzero((bins - item) >= 0)[0]
def online_binpack(
items: tuple[float, ...], bins: np.ndarray
) -> tuple[list[list[float, ...], ...], np.ndarray]:
"""Performs online binpacking of `items` into `bins`."""
# Track which items are added to each bin.
packing = [[] for _ in bins]
# Add items to bins.
for item in items:
# Extract bins that have sufficient space to fit item.
valid_bin_indices = get_valid_bin_indices(item, bins)
# Score each bin based on heuristic.
priorities = priority(item, bins[valid_bin_indices])
# Add item to bin with highest priority.
best_bin = valid_bin_indices[np.argmax(priorities)]
bins[best_bin] -= item
packing[best_bin].append(item)
# Remove unused bins from packing.
packing = [bin_items for bin_items in packing if bin_items]
return packing, bins
@funsearch.run
def evaluate(instances: dict) -> float:
"""Evaluate heuristic function on a set of online binpacking instances."""
# List storing number of bins used for each instance.
num_bins = []
# Perform online binpacking for each instance.
for name in instances:
instance = instances[name]
capacity = instance['capacity']
items = instance['items']
# Create num_items bins so there will always be space for all items,
# regardless of packing order. Array has shape (num_items,).
bins = np.array([capacity for _ in range(instance['num_items'])])
# Pack items into bins and return remaining capacity in bins_packed, which
# has shape (num_items,).
_, bins_packed = online_binpack(items, bins)
# If remaining capacity in a bin is equal to initial capacity, then it is
# unused. Count number of used bins.
num_bins.append((bins_packed != capacity).sum())
# Score of heuristic function is negative of average number of bins used
# across instances (as we want to minimize number of bins).
return -np.mean(num_bins)
@funsearch.evolve
def priority(item: float, bins: np.ndarray) -> np.ndarray:
"""Returns priority with which we want to add item to each bin.
Args:
item: Size of item to be added to the bin.
bins: Array of capacities for each bin.
Return:
Array of same size as bins with priority score of each bin.
"""
ratios = item / bins
log_ratios = np.log(ratios)
priorities = -log_ratios
return priorities
'''
# It should be noted that the if __name__ == '__main__' is required.
# Because the inner code uses multiprocess evaluation.
if __name__ == '__main__':
class_config = config.ClassConfig(llm_class=LLMAPI, sandbox_class=Sandbox)
config = config.Config(samples_per_prompt=4)
bin_packing_or3 = {'OR3': bin_packing_utils.datasets['OR3']}
global_max_sample_num = 10 # if it is set to None, funsearch will execute an endless loop
funsearch.main(
specification=specification,
inputs=bin_packing_or3,
config=config,
max_sample_nums=global_max_sample_num,
class_config=class_config,
log_dir='logs/funsearch_llm_api',
)
================================================
FILE: baseline/funsearch/funsearch_bin_packing_local_llm.py
================================================
import json
import multiprocessing
from typing import Collection, Any
import requests
from implementation import funsearch
from implementation import config
from implementation import sampler
from implementation import evaluator_accelerate
from implementation import evaluator
from implementation import code_manipulation
import bin_packing_utils
def _trim_preface_of_body(sample: str) -> str:
"""Trim the redundant descriptions/symbols/'def' declaration before the function body.
Please see my comments in sampler.LLM (in sampler.py).
Since the LLM used in this file is not a pure code completion LLM, this trim function is required.
-Example sample (function & description generated by LLM):
-------------------------------------
This is the optimized function ...
def priority_v2(...) -> ...:
return ...
This function aims to ...
-------------------------------------
-This function removes the description above the function's signature, and the function's signature.
-The indent of the code is preserved.
-Return of this function:
-------------------------------------
return ...
This function aims to ...
-------------------------------------
"""
lines = sample.splitlines()
func_body_lineno = 0
find_def_declaration = False
for lineno, line in enumerate(lines):
# find the first 'def' statement in the given code
if line[:3] == 'def':
func_body_lineno = lineno
find_def_declaration = True
break
if find_def_declaration:
code = ''
for line in lines[func_body_lineno + 1:]:
code += line + '\n'
return code
return sample
class LocalLLM(sampler.LLM):
"""Language model that predicts continuation of provided source code.
"""
def __init__(self, samples_per_prompt: int, batch_inference: bool = True, trim=True) -> None:
"""
Args:
batch_inference: Use batch inference when sample functions. The batch size equals to the samples_per_prompt.
"""
super().__init__(samples_per_prompt)
url = 'http://127.0.0.1:11011/completions'
additional_prompt = ('Complete a different and more complex Python function. '
'Be creative and you can insert multiple if-else and for-loop in the code logic.'
'Only output the Python code, no descriptions.')
self._batch_inference = batch_inference
self._url = url
self._additional_prompt = additional_prompt
self._trim = trim
def draw_samples(self, prompt: str) -> Collection[str]:
"""Returns multiple predicted continuations of `prompt`.
"""
while True:
try:
all_samples = []
if self._batch_inference:
response = self._do_request(prompt)
for res in response:
all_samples.append(res)
else:
for _ in range(self._samples_per_prompt):
response = self._do_request(prompt)
all_samples.append(response)
# trim samples
if self._trim:
all_samples = [_trim_preface_of_body(sample) for sample in all_samples]
return all_samples
except:
continue
def _do_request(self, content: str) -> str:
content = content.strip('\n').strip()
# repeat the prompt for batch inference (inorder to decease the sample delay)
repeat_prompt: int = self._samples_per_prompt if self._batch_inference else 1
data = {
'prompt': content,
'repeat_prompt': repeat_prompt,
'params': {
'do_sample': True,
'temperature': None,
'top_k': None,
'top_p': None,
'add_special_tokens': False,
'skip_special_tokens': True,
}
}
headers = {'Content-Type': 'application/json'}
response = requests.post(self._url, data=json.dumps(data), headers=headers)
if response.status_code == 200:
response = response.json()["content"]
return response if self._batch_inference else response[0]
class Sandbox(evaluator.Sandbox):
"""Sandbox for executing generated code. Implemented by RZ.
RZ: Sandbox returns the 'score' of the program and:
1) avoids the generated code to be harmful (accessing the internet, take up too much RAM).
2) stops the execution of the code in time (avoid endless loop).
"""
def __init__(self, verbose=False, numba_accelerate=True):
"""
Args:
verbose : Print evaluate information.
numba_accelerate: Use numba to accelerate the evaluation. It should be noted that not all numpy functions
support numba acceleration, such as np.piecewise().
"""
self._verbose = verbose
self._numba_accelerate = numba_accelerate
def run(
self,
program: str,
function_to_run: str, # RZ: refers to the name of the function to run (e.g., 'evaluate')
function_to_evolve: str, # RZ: accelerate the code by decorating @numba.jit() on function_to_evolve.
inputs: Any, # refers to the dataset
test_input: str, # refers to the current instance
timeout_seconds: int,
**kwargs # RZ: add this
) -> tuple[Any, bool]:
"""Returns `function_to_run(test_input)` and whether execution succeeded.
RZ: If the generated code (generated by LLM) is executed successfully,
the output of this function is the score of a given program.
RZ: PLEASE NOTE THAT this SandBox is only designed for bin-packing problem.
"""
dataset = inputs[test_input]
result_queue = multiprocessing.Queue()
process = multiprocessing.Process(
target=self._compile_and_run_function,
args=(program, function_to_run, function_to_evolve, dataset, self._numba_accelerate, result_queue)
)
process.start()
process.join(timeout=timeout_seconds)
if process.is_alive():
# if the process is not finished in time, we consider the program illegal
process.terminate()
process.join()
results = None, False
else:
if not result_queue.empty():
results = result_queue.get_nowait()
else:
results = None, False
if self._verbose:
print(f'================= Evaluated Program =================')
program_: code_manipulation.Program = code_manipulation.text_to_program(text=program)
func_to_evolve_: str = kwargs.get('func_to_evolve', 'priority')
function_: code_manipulation.Function = program_.get_function(func_to_evolve_)
function_: str = str(function_).strip('\n')
print(f'{function_}')
print(f'-----------------------------------------------------')
print(f'Score: {str(results)}')
print(f'=====================================================')
print(f'\n\n')
return results
def _compile_and_run_function(self, program, function_to_run, function_to_evolve, dataset, numba_accelerate,
result_queue):
try:
# optimize the code (decorate function_to_run with @numba.jit())
if numba_accelerate:
program = evaluator_accelerate.add_numba_decorator(
program=program,
function_to_evolve=function_to_evolve
)
# compile the program, and maps the global func/var/class name to its address
all_globals_namespace = {}
# execute the program, map func/var/class to global namespace
exec(program, all_globals_namespace)
# get the pointer of 'function_to_run'
function_to_run = all_globals_namespace[function_to_run]
# return the execution results
results = function_to_run(dataset)
# the results must be int or float
if not isinstance(results, (int, float)):
result_queue.put((None, False))
return
result_queue.put((results, True))
except:
# if raise any exception, we assume the execution failed
result_queue.put((None, False))
specification = r'''
import numpy as np
def get_valid_bin_indices(item: float, bins: np.ndarray) -> np.ndarray:
"""Returns indices of bins in which item can fit."""
return np.nonzero((bins - item) >= 0)[0]
def online_binpack(
items: tuple[float, ...], bins: np.ndarray
) -> tuple[list[list[float, ...], ...], np.ndarray]:
"""Performs online binpacking of `items` into `bins`."""
# Track which items are added to each bin.
packing = [[] for _ in bins]
# Add items to bins.
for item in items:
# Extract bins that have sufficient space to fit item.
valid_bin_indices = get_valid_bin_indices(item, bins)
# Score each bin based on heuristic.
priorities = priority(item, bins[valid_bin_indices])
# Add item to bin with highest priority.
best_bin = valid_bin_indices[np.argmax(priorities)]
bins[best_bin] -= item
packing[best_bin].append(item)
# Remove unused bins from packing.
packing = [bin_items for bin_items in packing if bin_items]
return packing, bins
@funsearch.run
def evaluate(instances: dict) -> float:
"""Evaluate heuristic function on a set of online binpacking instances."""
# List storing number of bins used for each instance.
num_bins = []
# Perform online binpacking for each instance.
for name in instances:
instance = instances[name]
capacity = instance['capacity']
items = instance['items']
# Create num_items bins so there will always be space for all items,
# regardless of packing order. Array has shape (num_items,).
bins = np.array([capacity for _ in range(instance['num_items'])])
# Pack items into bins and return remaining capacity in bins_packed, which
# has shape (num_items,).
_, bins_packed = online_binpack(items, bins)
# If remaining capacity in a bin is equal to initial capacity, then it is
# unused. Count number of used bins.
num_bins.append((bins_packed != capacity).sum())
# Score of heuristic function is negative of average number of bins used
# across instances (as we want to minimize number of bins).
return -np.mean(num_bins)
@funsearch.evolve
def priority(item: float, bins: np.ndarray) -> np.ndarray:
"""Returns priority with which we want to add item to each bin.
Args:
item: Size of item to be added to the bin.
bins: Array of capacities for each bin.
Return:
Array of same size as bins with priority score of each bin.
"""
ratios = item / bins
log_ratios = np.log(ratios)
priorities = -log_ratios
return priorities
'''
# It should be noted that the if __name__ == '__main__' is required.
# Because the inner code uses multiprocess evaluation.
if __name__ == '__main__':
class_config = config.ClassConfig(llm_class=LocalLLM, sandbox_class=Sandbox)
config = config.Config(samples_per_prompt=4)
bin_packing_or3 = {'OR3': bin_packing_utils.datasets['OR3']}
global_max_sample_num = 10 # if it is set to None, funsearch will execute an endless loop
funsearch.main(
specification=specification,
inputs=bin_packing_or3,
config=config,
max_sample_nums=global_max_sample_num,
class_config=class_config,
log_dir='logs/funsearch_local_llm',
)
================================================
FILE: baseline/funsearch/implementation/code_manipulation.py
================================================
# Copyright 2023 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tools for manipulating Python code.
It implements 2 classes representing unities of code:
- Function, containing all the information we need about functions: name, args,
body and optionally a return type and a docstring.
- Program, which contains a code preface (which could be imports, global
variables and classes, ...) and a list of Functions.
RZ: The frequently used word 'call' in this file refers to the name of the function. For example the following:
def add_five(param) -> int:
return param + 5
The 'call' of the function is 'add_file'.
"""
from __future__ import annotations
import ast
from collections.abc import Iterator, MutableSet, Sequence
import dataclasses
import io
import tokenize
from absl import logging
@dataclasses.dataclass
class Function:
"""A parsed Python function."""
name: str
args: str
body: str
return_type: str | None = None
docstring: str | None = None
score: int | None = None # RZ: add this to record the score of the function.
global_sample_nums: int | None = None # RZ: record the order of the current program in the sequence of samples taken.
sample_time: float | None = None # RZ: add this
evaluate_time: float | None = None # RZ: add this
def __str__(self) -> str:
return_type = f' -> {self.return_type}' if self.return_type else ''
function = f'def {self.name}({self.args}){return_type}:\n'
if self.docstring:
# self.docstring is already indented on every line except the first one.
# Here, we assume the indentation is always two spaces. => RZ: two spaces is ugly, change to four
# RZ: two spaces is ugly, change to four spaces.
new_line = '\n' if self.body else ''
# function += f' """{self.docstring}"""{new_line}' # two spaces indentation
function += f' """{self.docstring}"""{new_line}'
# self.body is already indented.
function += self.body + '\n\n'
return function
def __setattr__(self, name: str, value: str) -> None:
# Ensure there aren't leading & trailing new lines in `body`.
if name == 'body':
value = value.strip('\n')
# Ensure there aren't leading & trailing quotes in `docstring``.
if name == 'docstring' and value is not None:
if '"""' in value:
value = value.strip()
value = value.replace('"""', '')
super().__setattr__(name, value)
@dataclasses.dataclass(frozen=True)
class Program:
"""A parsed Python program."""
# `preface` is everything from the beginning of the code till the first
# function is found.
preface: str
functions: list[Function]
def __str__(self) -> str:
program = f'{self.preface}\n' if self.preface else ''
program += '\n'.join([str(f) for f in self.functions])
return program
def find_function_index(self, function_name: str) -> int:
"""Returns the index of input function name."""
function_names = [f.name for f in self.functions]
count = function_names.count(function_name)
if count == 0:
raise ValueError(
f'function {function_name} does not exist in program:\n{str(self)}'
)
if count > 1:
raise ValueError(
f'function {function_name} exists more than once in program:\n'
f'{str(self)}'
)
index = function_names.index(function_name)
return index
def get_function(self, function_name: str) -> Function:
index = self.find_function_index(function_name)
return self.functions[index]
class ProgramVisitor(ast.NodeVisitor):
"""Parses code to collect all required information to produce a `Program`.
Note that we do not store function decorators.
"""
def __init__(self, sourcecode: str):
self._codelines: list[str] = sourcecode.splitlines()
self._preface: str = ''
self._functions: list[Function] = []
self._current_function: str | None = None
def visit_FunctionDef(self, # pylint: disable=invalid-name
node: ast.FunctionDef) -> None:
"""Collects all information about the function being parsed."""
if node.col_offset == 0: # We only care about first level functions.
self._current_function = node.name
# -------------------------------------------------------------------------
# RZ: BUGS!!! 这里问题很大 没有考虑到一些极端的情况 例如解析到的第一个函数就有装饰器
# 如果解析的第一个函数有装饰器 那么装饰器也会被保留在前面的代码片段中
# 但在算法的流程中 这个装饰器是无效的 后续评估会报错
# Here is an issue: some cases were not taken into consideration.
# For instance, if the first parsed function has decorators,
# these decorators will also be retained in the preceding code snippet.
# However, in the algorithm's flow, these decorators are invalid,
# leading to subsequent evaluations reporting errors.
# -------------------------------------------------------------------------
# if not self._functions:
# self._preface = '\n'.join(self._codelines[:node.lineno - 1])
# -------------------------------------------------------------------------
# TODO Fix bugs 判断下如果函数 is decorated, 找到装饰器的最小行号, 并只保留其上面的部分作为 preface
if not self._functions:
has_decorators = bool(node.decorator_list)
if has_decorators:
# find the minimum line number and retain the code above
decorator_start_line = min(decorator.lineno for decorator in node.decorator_list)
self._preface = '\n'.join(self._codelines[:decorator_start_line - 1])
else:
self._preface = '\n'.join(self._codelines[:node.lineno - 1])
function_end_line = node.end_lineno
body_start_line = node.body[0].lineno - 1
# Extract the docstring.
docstring = None
if isinstance(node.body[0], ast.Expr) and isinstance(node.body[0].value, ast.Str):
docstring = f' """{ast.literal_eval(ast.unparse(node.body[0]))}"""'
if len(node.body) > 1:
body_start_line = node.body[1].lineno - 1
else:
body_start_line = function_end_line
self._functions.append(Function(
name=node.name,
args=ast.unparse(node.args), # RZ: ast.unparse() failed in Python3.8. Let us try Python3.9
return_type=ast.unparse(node.returns) if node.returns else None,
docstring=docstring,
body='\n'.join(self._codelines[body_start_line:function_end_line]),
))
self.generic_visit(node)
def return_program(self) -> Program:
return Program(preface=self._preface, functions=self._functions)
def text_to_program(text: str) -> Program:
"""Returns Program object by parsing input text using Python AST.
"""
try:
# We assume that the program is composed of some preface (e.g. imports,
# classes, assignments, ...) followed by a sequence of functions.
tree = ast.parse(text)
visitor = ProgramVisitor(text)
visitor.visit(tree)
return visitor.return_program()
except Exception as e:
logging.warning('Failed parsing %s', text)
raise e
def text_to_function(text: str) -> Function:
"""Returns Function object by parsing input text using Python AST."""
program = text_to_program(text)
if len(program.functions) != 1:
raise ValueError(f'Only one function expected, got {len(program.functions)}'
f':\n{program.functions}')
return program.functions[0]
def _tokenize(code: str) -> Iterator[tokenize.TokenInfo]:
"""Transforms `code` into Python tokens."""
code_bytes = code.encode()
code_io = io.BytesIO(code_bytes)
return tokenize.tokenize(code_io.readline)
def _untokenize(tokens: Sequence[tokenize.TokenInfo]) -> str:
"""Transforms a list of Python tokens into code."""
code_bytes = tokenize.untokenize(tokens)
return code_bytes.decode()
def _yield_token_and_is_call(code: str) -> Iterator[tuple[tokenize.TokenInfo, bool]]:
"""Yields each token with a bool indicating whether it is a function call.
"""
try:
tokens = _tokenize(code)
prev_token = None
is_attribute_access = False
for token in tokens:
if (prev_token and # If the previous token exists and
prev_token.type == tokenize.NAME and # it is a Python identifier
token.type == tokenize.OP and # and the current token is a delimiter
token.string == '('): # and in particular it is '('.
yield prev_token, not is_attribute_access
is_attribute_access = False
else:
if prev_token:
is_attribute_access = (
prev_token.type == tokenize.OP and prev_token.string == '.'
)
yield prev_token, False
prev_token = token
if prev_token:
yield prev_token, False
except Exception as e:
logging.warning('Failed parsing %s', code)
raise e
def rename_function_calls(code: str, source_name: str, target_name: str) -> str:
"""Renames function calls from `source_name` to `target_name`.
"""
if source_name not in code:
return code
modified_tokens = []
for token, is_call in _yield_token_and_is_call(code):
if is_call and token.string == source_name:
# Replace the function name token
modified_token = tokenize.TokenInfo(
type=token.type,
string=target_name,
start=token.start,
end=token.end,
line=token.line
)
modified_tokens.append(modified_token)
else:
modified_tokens.append(token)
return _untokenize(modified_tokens)
def get_functions_called(code: str) -> MutableSet[str]:
"""Returns the set of all functions called in `code`.
"""
return set(token.string for token, is_call in
_yield_token_and_is_call(code) if is_call)
def yield_decorated(code: str, module: str, name: str) -> Iterator[str]:
"""Yields names of functions decorated with `@module.name` in `code`.
"""
tree = ast.parse(code)
for node in ast.walk(tree):
if isinstance(node, ast.FunctionDef):
for decorator in node.decorator_list:
attribute = None
if isinstance(decorator, ast.Attribute):
attribute = decorator
elif isinstance(decorator, ast.Call):
attribute = decorator.func
if (attribute is not None
and attribute.value.id == module
and attribute.attr == name):
yield node.name
================================================
FILE: baseline/funsearch/implementation/config.py
================================================
# Copyright 2023 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Configuration of a FunSearch experiment."""
from __future__ import annotations
import dataclasses
from typing import Type
from implementation import sampler
from implementation import evaluator
@dataclasses.dataclass(frozen=True)
class ProgramsDatabaseConfig:
"""Configuration of a ProgramsDatabase.
Attributes:
functions_per_prompt: Number of previous programs to include in prompts.
num_islands: Number of islands to maintain as a diversity mechanism.
reset_period: How often (in seconds) the weakest islands should be reset.
cluster_sampling_temperature_init: Initial temperature for softmax sampling
of clusters within an island.
cluster_sampling_temperature_period: Period of linear decay of the cluster
sampling temperature.
"""
functions_per_prompt: int = 2
num_islands: int = 10
reset_period: int = 4 * 60 * 60
cluster_sampling_temperature_init: float = 0.1
cluster_sampling_temperature_period: int = 30_000
@dataclasses.dataclass(frozen=True)
class Config:
"""Configuration of a FunSearch experiment.
Attributes:
programs_database: Configuration of the evolutionary algorithm.
num_samplers: Number of independent Samplers in the experiment. A value
larger than 1 only has an effect when the samplers are able to execute
in parallel, e.g. on different machines of a distributed system.
num_evaluators: Number of independent program Evaluators in the experiment.
A value larger than 1 is only expected to be useful when the Evaluators
can execute in parallel as part of a distributed system.
samples_per_prompt: How many independently sampled program continuations to
obtain for each prompt.
"""
programs_database: ProgramsDatabaseConfig = dataclasses.field(default_factory=ProgramsDatabaseConfig)
num_samplers: int = 1 # RZ: I just use one samplers
# num_evaluators: int = 140
num_evaluators: int = 1 # RZ: I just use one evaluators
samples_per_prompt: int = 4
@dataclasses.dataclass()
class ClassConfig:
"""Implemented by RZ. Configuration of 'class LLM' and 'class SandBox' used in this implementation.
"""
llm_class: Type[sampler.LLM]
sandbox_class: Type[evaluator.Sandbox]
================================================
FILE: baseline/funsearch/implementation/evaluator.py
================================================
# Copyright 2023 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Class for evaluating programs proposed by the Sampler."""
from __future__ import annotations
from abc import abstractmethod, ABC
import ast
import time
from collections.abc import Sequence
import copy
from typing import Any, Type
import profile
from implementation import code_manipulation
from implementation import programs_database
class _FunctionLineVisitor(ast.NodeVisitor):
"""Visitor that finds the last line number of a function with a given name."""
def __init__(self, target_function_name: str) -> None:
self._target_function_name: str = target_function_name
self._function_end_line: int | None = None
def visit_FunctionDef(self, node: Any) -> None: # pylint: disable=invalid-name
"""Collects the end line number of the target function."""
if node.name == self._target_function_name:
self._function_end_line = node.end_lineno
self.generic_visit(node)
@property
def function_end_line(self) -> int:
"""Line number of the final line of function `target_function_name`."""
assert self._function_end_line is not None # Check internal correctness.
return self._function_end_line
def _trim_function_body(generated_code: str) -> str:
"""Extracts the body of the generated function, trimming anything after it.
RZ: the arg generated_code must only include the body of the generated function (an example is shown below):
--------------
a = item
return a
--------------
Please note that the indentation is REQUIRED !!!
"""
if not generated_code:
return ''
code = f'def fake_function_header():\n{generated_code}'
tree = None
# We keep trying and deleting code from the end until the parser succeeds.
while tree is None:
try:
tree = ast.parse(code)
except SyntaxError as e:
# RZ: "e.lineno - 1" locates the line number of the lost python code
code = '\n'.join(code.splitlines()[:e.lineno - 1])
if not code:
# Nothing could be saved from `generated_code`
return ''
visitor = _FunctionLineVisitor('fake_function_header')
visitor.visit(tree)
body_lines = code.splitlines()[1:visitor.function_end_line]
return '\n'.join(body_lines) + '\n\n'
def _sample_to_program(
generated_code: str,
version_generated: int | None,
template: code_manipulation.Program,
function_to_evolve: str,
) -> tuple[code_manipulation.Function, str]:
"""Returns the compiled generated function and the full runnable program.
RZ: This function removes the code after the generated function body.
"""
body = _trim_function_body(generated_code)
if version_generated is not None:
body = code_manipulation.rename_function_calls(
code=body,
source_name=f'{function_to_evolve}_v{version_generated}',
target_name=function_to_evolve
)
program = copy.deepcopy(template)
evolved_function = program.get_function(function_to_evolve)
evolved_function.body = body
return evolved_function, str(program)
class Sandbox(ABC):
"""Sandbox for executing generated code.
RZ: Sandbox 1) avoids the generated code to be harmful (accessing the internet, take up too much RAM).
2) stops the execution of the code in time (avoid endless loop).
"""
@abstractmethod
def run(
self,
program: str,
function_to_run: str,
function_to_evolve: str,
inputs: Any, # refers to the full dataset, added by RZ
test_input: str, # refers to the current instance
timeout_seconds: int,
**kwargs
) -> tuple[Any, bool]:
"""Returns `function_to_run(test_input)` and whether execution succeeded.
RZ: If the generated code (generated by LLM) is executed successfully, the output of this function
"""
raise NotImplementedError(
'Must provide a sandbox for executing untrusted code.')
def _calls_ancestor(program: str, function_to_evolve: str) -> bool:
"""Returns whether the generated function is calling an earlier version."""
for name in code_manipulation.get_functions_called(program):
# In `program` passed into this function the most recently generated
# function has already been renamed to `function_to_evolve` (wihout the
# suffix). Therefore, any function call starting with `function_to_evolve_v`
# is a call to an ancestor function.
if name.startswith(f'{function_to_evolve}_v'):
return True
return False
class Evaluator:
"""Class that analyses functions generated by LLMs."""
def __init__(
self,
database: programs_database.ProgramsDatabase,
template: code_manipulation.Program,
function_to_evolve: str, # RZ: refers to the name of the function to evolve (e.g., 'priority')
function_to_run: str, # RZ: refers to the name of the function to run (e.g., 'evaluate')
inputs: Sequence[Any], # RZ: I guess this refers to the evaluate instance
timeout_seconds: int = 30,
sandbox_class: Type[Sandbox] = Sandbox
):
self._database = database
self._template = template
self._function_to_evolve = function_to_evolve
self._function_to_run = function_to_run
self._inputs = inputs
self._timeout_seconds = timeout_seconds
self._sandbox = sandbox_class()
def analyse(
self,
sample: str,
island_id: int | None,
version_generated: int | None,
**kwargs # RZ: add this to do profile
) -> None:
"""Compiles the sample into a program and executes it on test inputs.
Args:
sample: RZ: please note that the sample must be preprocessed--only have function body,
no description before it (except annotations), no symbols before it.
Or the "_sample_to_program" function will fail!!!
"""
# RZ: 'new_function' refers to the evolved function ('def' statement + function body)
# RZ: 'program' is the template code + new_function
new_function, program = _sample_to_program(
sample, version_generated, self._template, self._function_to_evolve)
scores_per_test = {}
time_reset = time.time()
for current_input in self._inputs:
# RZ: IMPORTANT !!! if self._inputs is a dict,
# current_input is a key (perhaps in string type)
# do not ignore this when implementing SandBox !!!
test_output, runs_ok = self._sandbox.run(
program, self._function_to_run, self._function_to_evolve, self._inputs, current_input,
self._timeout_seconds
)
if runs_ok and not _calls_ancestor(program, self._function_to_evolve) and test_output is not None:
if not isinstance(test_output, (int, float)):
print(f'RZ=> Error: test_output is {test_output}')
raise ValueError('@function.run did not return an int/float score.')
scores_per_test[current_input] = test_output
evaluate_time = time.time() - time_reset
# RZ: If 'score_per_test' is not empty, the score of the program will be recorded to the profiler by the 'register_program'.
# This is because the register_program will do reduction for a given Function score.
# If 'score_per_test' is empty, we record it to the profiler at once.
if scores_per_test:
self._database.register_program(
new_function,
island_id,
scores_per_test,
**kwargs,
evaluate_time=evaluate_time
)
else:
profiler: profile.Profiler = kwargs.get('profiler', None)
if profiler:
global_sample_nums = kwargs.get('global_sample_nums', None)
sample_time = kwargs.get('sample_time', None)
new_function.global_sample_nums = global_sample_nums
new_function.score = None
new_function.sample_time = sample_time
new_function.evaluate_time = evaluate_time
profiler.register_function(new_function)
================================================
FILE: baseline/funsearch/implementation/evaluator_accelerate.py
================================================
# Implemented by RZ.
# This file aims to accelerate the original evaluate logic using 'numba' package.
# You should install numba package in your Python environment or the later evaluation will fail.
import ast
def add_numba_decorator(
program: str,
function_to_evolve: str,
) -> str:
"""
This function aims to accelerate the evaluation of the searched code. This is achieved by decorating '@numba.jit()'
to the function_to_evolve. However, it should be noted that not all numpy functions support numba acceleration:
such as np.piecewise(). So use this function wisely. Hahaha!
Example input program:
def func(a: np.ndarray):
return a * 2
Example output program
import numba
numba.jit()
def func(a: np.ndarray):
return a * 2
"""
# parse to syntax tree
tree = ast.parse(program)
# check if 'import numba' already exists
numba_imported = False
for node in tree.body:
if isinstance(node, ast.Import) and any(alias.name == 'numba' for alias in node.names):
numba_imported = True
break
# add 'import numba' to the top of the program
if not numba_imported:
import_node = ast.Import(names=[ast.alias(name='numba', asname=None)])
tree.body.insert(0, import_node)
# traverse the tree, and find the function_to_run
for node in ast.walk(tree):
if isinstance(node, ast.FunctionDef) and node.name == function_to_evolve:
# the @numba.jit() decorator instance
decorator = ast.Call(
func=ast.Attribute(
value=ast.Name(id='numba', ctx=ast.Load()),
attr='jit',
ctx=ast.Load()
),
args=[], # args do not have argument name
keywords=[ast.keyword(arg='nopython', value=ast.NameConstant(value=True))]
# keywords have argument name
)
# add the decorator to the decorator_list of the node
node.decorator_list.append(decorator)
# turn the tree to string and return
modified_program = ast.unparse(tree)
return modified_program
if __name__ == '__main__':
code = '''
import numpy as np
import numba
def func1():
return 3
def func():
return 5
'''
res = add_numba_decorator(code, 'func')
print(res)
================================================
FILE: baseline/funsearch/implementation/funsearch.py
================================================
# Copyright 2023 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""A single-threaded implementation of the FunSearch pipeline."""
from __future__ import annotations
# from collections.abc import Sequence
# RZ: there are multiple errors in the original code
# we should use typing.xxx rather than collections.abc.xxx
from typing import Any, Tuple, Sequence
from implementation import code_manipulation
from implementation import config as config_lib
from implementation import evaluator
from implementation import programs_database
from implementation import sampler
from implementation import profile
def _extract_function_names(specification: str) -> Tuple[str, str]:
"""Returns the name of the function to evolve and of the function to run.
RZ: The so-called specification refers to the boilerplate code template for a task.
The template MUST have two important functions decorated with '@funsearch.run', '@funsearch.evolve' respectively.
The function labeled with '@funsearch.run' is going to evaluate the generated code (like fitness evaluation).
The function labeled with '@funsearch.evolve' is the function to be searched (like 'greedy' in cap-set).
This function (_extract_function_names) makes sure that these decorators appears in the specification.
"""
run_functions = list(code_manipulation.yield_decorated(specification, 'funsearch', 'run'))
if len(run_functions) != 1:
raise ValueError('Expected 1 function decorated with `@funsearch.run`.')
evolve_functions = list(code_manipulation.yield_decorated(specification, 'funsearch', 'evolve'))
if len(evolve_functions) != 1:
raise ValueError('Expected 1 function decorated with `@funsearch.evolve`.')
return evolve_functions[0], run_functions[0]
def main(
specification: str,
inputs: Sequence[Any],
config: config_lib.Config,
max_sample_nums: int | None,
class_config: config_lib.ClassConfig,
**kwargs
):
"""Launches a FunSearch experiment.
RZ:
Args:
specification: the boilerplate code for the problem.
inputs : the data instances for the problem (see 'bin_packing_utils.py').
config : config file.
max_sample_nums: the maximum samples nums from LLM. 'None' refers to no stop.
"""
function_to_evolve, function_to_run = _extract_function_names(specification)
template = code_manipulation.text_to_program(specification)
database = programs_database.ProgramsDatabase(config.programs_database, template, function_to_evolve)
# get log_dir and create profiler
log_dir = kwargs.get('log_dir', None)
if log_dir is None:
profiler = None
else:
profiler = profile.Profiler(log_dir)
evaluators = []
for _ in range(config.num_evaluators):
evaluators.append(evaluator.Evaluator(
database,
template,
function_to_evolve,
function_to_run,
inputs,
sandbox_class=class_config.sandbox_class
))
# We send the initial implementation to be analysed by one of the evaluators.
initial = template.get_function(function_to_evolve).body
evaluators[0].analyse(initial, island_id=None, version_generated=None, profiler=profiler)
# Set global max sample nums.
samplers = [sampler.Sampler(database, evaluators, config.samples_per_prompt, max_sample_nums=max_sample_nums, llm_class=class_config.llm_class)
for _ in range(config.num_samplers)]
# This loop can be executed in parallel on remote sampler machines. As each
# sampler enters an infinite loop, without parallelization only the first
# sampler will do any work.
for s in samplers:
s.sample(profiler=profiler)
================================================
FILE: baseline/funsearch/implementation/profile.py
================================================
# implemented by RZ
# profile the experiment using tensorboard
from __future__ import annotations
import os.path
from typing import List, Dict
import logging
import json
from implementation import code_manipulation
from torch.utils.tensorboard import SummaryWriter
class Profiler:
def __init__(
self,
log_dir: str | None = None,
pkl_dir: str | None = None,
max_log_nums: int | None = None,
):
"""
Args:
log_dir : folder path for tensorboard log files.
pkl_dir : save the results to a pkl file.
max_log_nums: stop logging if exceeding max_log_nums.
"""
logging.getLogger().setLevel(logging.INFO)
self._log_dir = log_dir
self._json_dir = os.path.join(log_dir, 'samples')
os.makedirs(self._json_dir, exist_ok=True)
# self._pkl_dir = pkl_dir
self._max_log_nums = max_log_nums
self._num_samples = 0
self._cur_best_program_sample_order = None
self._cur_best_program_score = -99999999
self._evaluate_success_program_num = 0
self._evaluate_failed_program_num = 0
self._tot_sample_time = 0
self._tot_evaluate_time = 0
self._all_sampled_functions: Dict[int, code_manipulation.Function] = {}
if log_dir:
self._writer = SummaryWriter(log_dir=log_dir)
self._each_sample_best_program_score = []
self._each_sample_evaluate_success_program_num = []
self._each_sample_evaluate_failed_program_num = []
self._each_sample_tot_sample_time = []
self._each_sample_tot_evaluate_time = []
def _write_tensorboard(self):
if not self._log_dir:
return
self._writer.add_scalar(
'Best Score of Function',
self._cur_best_program_score,
global_step=self._num_samples
)
self._writer.add_scalars(
'Legal/Illegal Function',
{
'legal function num': self._evaluate_success_program_num,
'illegal function num': self._evaluate_failed_program_num
},
global_step=self._num_samples
)
self._writer.add_scalars(
'Total Sample/Evaluate Time',
{'sample time': self._tot_sample_time, 'evaluate time': self._tot_evaluate_time},
global_step=self._num_samples
)
def _write_json(self, programs: code_manipulation.Function):
sample_order = programs.global_sample_nums
sample_order = sample_order if sample_order is not None else 0
function_str = str(programs)
score = programs.score
content = {
'sample_order': sample_order,
'function': function_str,
'score': score
}
path = os.path.join(self._json_dir, f'samples_{sample_order}.json')
with open(path, 'w') as json_file:
json.dump(content, json_file)
def register_function(self, programs: code_manipulation.Function):
if self._max_log_nums is not None and self._num_samples >= self._max_log_nums:
return
sample_orders: int = programs.global_sample_nums
if sample_orders not in self._all_sampled_functions:
self._num_samples += 1
self._all_sampled_functions[sample_orders] = programs
self._record_and_verbose(sample_orders)
self._write_tensorboard()
self._write_json(programs)
def _record_and_verbose(self, sample_orders: int):
function = self._all_sampled_functions[sample_orders]
# function_name = function.name
# function_body = function.body.strip('\n')
function_str = str(function).strip('\n')
sample_time = function.sample_time
evaluate_time = function.evaluate_time
score = function.score
# log attributes of the function
print(f'================= Evaluated Function =================')
print(f'{function_str}')
print(f'------------------------------------------------------')
print(f'Score : {str(score)}')
print(f'Sample time : {str(sample_time)}')
print(f'Evaluate time: {str(evaluate_time)}')
print(f'Sample orders: {str(sample_orders)}')
print(f'======================================================\n\n')
# update best function
if function.score is not None and score > self._cur_best_program_score:
self._cur_best_program_score = score
self._cur_best_program_sample_order = sample_orders
# update statistics about function
if score:
self._evaluate_success_program_num += 1
else:
self._evaluate_failed_program_num += 1
if sample_time:
self._tot_sample_time += sample_time
if evaluate_time:
self._tot_evaluate_time += evaluate_time
# update ...
# self._each_sample_best_program_score.append(self._cur_best_program_score)
# self._each_sample_evaluate_success_program_num.append(self._evaluate_success_program_num)
# self._each_sample_evaluate_failed_program_num.append(self._evaluate_failed_program_num)
# self._each_sample_tot_sample_time.append(self._tot_sample_time)
# self._each_sample_tot_evaluate_time.append(self._tot_evaluate_time)
================================================
FILE: baseline/funsearch/implementation/programs_database.py
================================================
# Copyright 2023 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""A programs database that implements the evolutionary algorithm."""
from __future__ import annotations
import profile
from collections.abc import Mapping, Sequence
import copy
import dataclasses
import time
from typing import Any, Tuple, Mapping
from absl import logging
import numpy as np
import scipy
from implementation import code_manipulation
from implementation import config as config_lib
# RZ: I change the original code "tuple[float, ...]" to "Tuple[float, ...]"
Signature = Tuple[float, ...]
# RZ: the code is also incorrect
# We should use typing.Mapping rather than abc.Mapping
ScoresPerTest = Mapping[Any, float]
def _softmax(logits: np.ndarray, temperature: float) -> np.ndarray:
"""Returns the tempered softmax of 1D finite `logits`."""
if not np.all(np.isfinite(logits)):
non_finites = set(logits[~np.isfinite(logits)])
raise ValueError(f'`logits` contains non-finite value(s): {non_finites}')
if not np.issubdtype(logits.dtype, np.floating):
logits = np.array(logits, dtype=np.float32)
result = scipy.special.softmax(logits / temperature, axis=-1)
# Ensure that probabilities sum to 1 to prevent error in `np.random.choice`.
index = np.argmax(result)
result[index] = 1 - np.sum(result[0:index]) - np.sum(result[index + 1:])
return result
def _reduce_score(scores_per_test: ScoresPerTest) -> float:
"""Reduces per-test scores into a single score.
"""
# TODO RZ: change the code to average the score of each test.
# return scores_per_test[list(scores_per_test.keys())[-1]]
test_scores = [scores_per_test[k] for k in scores_per_test.keys()]
return sum(test_scores) / len(test_scores)
def _get_signature(scores_per_test: ScoresPerTest) -> Signature:
"""Represents test scores as a canonical signature."""
return tuple(scores_per_test[k] for k in sorted(scores_per_test.keys()))
@dataclasses.dataclass(frozen=True)
class Prompt:
"""A prompt produced by the ProgramsDatabase, to be sent to Samplers.
Attributes:
code: The prompt, ending with the header of the function to be completed.
version_generated: The function to be completed is `_v{version_generated}`.
island_id: Identifier of the island that produced the implementations
included in the prompt. Used to direct the newly generated implementation
into the same island.
"""
code: str
version_generated: int
island_id: int
class ProgramsDatabase:
"""A collection of programs, organized as islands."""
def __init__(
self,
config: config_lib.ProgramsDatabaseConfig,
template: code_manipulation.Program,
function_to_evolve: str,
) -> None:
self._config: config_lib.ProgramsDatabaseConfig = config
self._template: code_manipulation.Program = template
self._function_to_evolve: str = function_to_evolve
# Initialize empty islands.
self._islands: list[Island] = []
for _ in range(config.num_islands):
self._islands.append(
Island(template, function_to_evolve, config.functions_per_prompt,
config.cluster_sampling_temperature_init,
config.cluster_sampling_temperature_period))
self._best_score_per_island: list[float] = (
[-float('inf')] * config.num_islands)
self._best_program_per_island: list[code_manipulation.Function | None] = (
[None] * config.num_islands)
self._best_scores_per_test_per_island: list[ScoresPerTest | None] = (
[None] * config.num_islands)
self._last_reset_time: float = time.time()
def get_prompt(self) -> Prompt:
"""Returns a prompt containing implementations from one chosen island."""
island_id = np.random.randint(len(self._islands))
code, version_generated = self._islands[island_id].get_prompt()
return Prompt(code, version_generated, island_id)
def _register_program_in_island(
self,
program: code_manipulation.Function,
island_id: int,
scores_per_test: ScoresPerTest,
**kwargs # RZ: add this for profiling
) -> None:
"""Registers `program` in the specified island."""
self._islands[island_id].register_program(program, scores_per_test)
score = _reduce_score(scores_per_test)
if score > self._best_score_per_island[island_id]:
self._best_program_per_island[island_id] = program
self._best_scores_per_test_per_island[island_id] = scores_per_test
self._best_score_per_island[island_id] = score
logging.info('Best score of island %d increased to %s', island_id, score)
# ======== RZ: profiling ========
profiler: profile.Profiler = kwargs.get('profiler', None)
if profiler:
global_sample_nums = kwargs.get('global_sample_nums', None)
sample_time = kwargs.get('sample_time', None)
evaluate_time = kwargs.get('evaluate_time', None)
program.score = score
program.global_sample_nums = global_sample_nums
program.sample_time = sample_time
program.evaluate_time = evaluate_time
profiler.register_function(program)
def register_program(
self,
program: code_manipulation.Function,
island_id: int | None,
scores_per_test: ScoresPerTest,
**kwargs # RZ: add this for profiling
) -> None:
"""Registers `program` in the database."""
# In an asynchronous implementation we should consider the possibility of
# registering a program on an island that had been reset after the prompt
# was generated. Leaving that out here for simplicity.
if island_id is None:
# This is a program added at the beginning, so adding it to all islands.
for island_id in range(len(self._islands)):
self._register_program_in_island(program, island_id, scores_per_test, **kwargs)
else:
self._register_program_in_island(program, island_id, scores_per_test, **kwargs)
# Check whether it is time to reset an island.
if time.time() - self._last_reset_time > self._config.reset_period:
self._last_reset_time = time.time()
self.reset_islands()
def reset_islands(self) -> None:
"""Resets the weaker half of islands."""
# We sort best scores after adding minor noise to break ties.
indices_sorted_by_score: np.ndarray = np.argsort(
self._best_score_per_island +
np.random.randn(len(self._best_score_per_island)) * 1e-6)
num_islands_to_reset = self._config.num_islands // 2
reset_islands_ids = indices_sorted_by_score[:num_islands_to_reset]
keep_islands_ids = indices_sorted_by_score[num_islands_to_reset:]
for island_id in reset_islands_ids:
self._islands[island_id] = Island(
self._template,
self._function_to_evolve,
self._config.functions_per_prompt,
self._config.cluster_sampling_temperature_init,
self._config.cluster_sampling_temperature_period)
self._best_score_per_island[island_id] = -float('inf')
founder_island_id = np.random.choice(keep_islands_ids)
founder = self._best_program_per_island[founder_island_id]
founder_scores = self._best_scores_per_test_per_island[founder_island_id]
self._register_program_in_island(founder, island_id, founder_scores)
class Island:
"""A sub-population of the programs database."""
def __init__(
self,
template: code_manipulation.Program,
function_to_evolve: str,
functions_per_prompt: int,
cluster_sampling_temperature_init: float,
cluster_sampling_temperature_period: int,
) -> None:
self._template: code_manipulation.Program = template
self._function_to_evolve: str = function_to_evolve
self._functions_per_prompt: int = functions_per_prompt
self._cluster_sampling_temperature_init = cluster_sampling_temperature_init
self._cluster_sampling_temperature_period = (
cluster_sampling_temperature_period)
self._clusters: dict[Signature, Cluster] = {}
self._num_programs: int = 0
def register_program(
self,
program: code_manipulation.Function,
scores_per_test: ScoresPerTest,
) -> None:
"""Stores a program on this island, in its appropriate cluster."""
signature = _get_signature(scores_per_test)
if signature not in self._clusters:
score = _reduce_score(scores_per_test)
self._clusters[signature] = Cluster(score, program)
else:
self._clusters[signature].register_program(program)
self._num_programs += 1
def get_prompt(self) -> tuple[str, int]:
"""Constructs a prompt containing functions from this island."""
signatures = list(self._clusters.keys())
cluster_scores = np.array(
[self._clusters[signature].score for signature in signatures])
# Convert scores to probabilities using softmax with temperature schedule.
period = self._cluster_sampling_temperature_period
temperature = self._cluster_sampling_temperature_init * (
1 - (self._num_programs % period) / period)
probabilities = _softmax(cluster_scores, temperature)
# At the beginning of an experiment when we have few clusters, place fewer
# programs into the prompt.
functions_per_prompt = min(len(self._clusters), self._functions_per_prompt)
idx = np.random.choice(
len(signatures), size=functions_per_prompt, p=probabilities)
chosen_signatures = [signatures[i] for i in idx]
implementations = []
scores = []
for signature in chosen_signatures:
cluster = self._clusters[signature]
implementations.append(cluster.sample_program())
scores.append(cluster.score)
indices = np.argsort(scores)
sorted_implementations = [implementations[i] for i in indices]
version_generated = len(sorted_implementations) + 1
return self._generate_prompt(sorted_implementations), version_generated
def _generate_prompt(
self,
implementations: Sequence[code_manipulation.Function]) -> str:
"""Creates a prompt containing a sequence of function `implementations`."""
implementations = copy.deepcopy(implementations) # We will mutate these.
# Format the names and docstrings of functions to be included in the prompt.
versioned_functions: list[code_manipulation.Function] = []
for i, implementation in enumerate(implementations):
new_function_name = f'{self._function_to_evolve}_v{i}'
implementation.name = new_function_name
# Update the docstring for all subsequent functions after `_v0`.
if i >= 1:
implementation.docstring = (
f'Improved version of `{self._function_to_evolve}_v{i - 1}`.')
# If the function is recursive, replace calls to itself with its new name.
implementation = code_manipulation.rename_function_calls(
str(implementation), self._function_to_evolve, new_function_name)
versioned_functions.append(
code_manipulation.text_to_function(implementation))
# Create the header of the function to be generated by the LLM.
next_version = len(implementations)
new_function_name = f'{self._function_to_evolve}_v{next_version}'
header = dataclasses.replace(
implementations[-1],
name=new_function_name,
body='',
docstring=('Improved version of '
f'`{self._function_to_evolve}_v{next_version - 1}`.'),
)
versioned_functions.append(header)
# Replace functions in the template with the list constructed here.
prompt = dataclasses.replace(self._template, functions=versioned_functions)
return str(prompt)
class Cluster:
"""A cluster of programs on the same island and with the same Signature."""
def __init__(self, score: float, implementation: code_manipulation.Function):
self._score = score
self._programs: list[code_manipulation.Function] = [implementation]
self._lengths: list[int] = [len(str(implementation))]
@property
def score(self) -> float:
"""Reduced score of the signature that this cluster represents."""
return self._score
def register_program(self, program: code_manipulation.Function) -> None:
"""Adds `program` to the cluster."""
self._programs.append(program)
self._lengths.append(len(str(program)))
def sample_program(self) -> code_manipulation.Function:
"""Samples a program, giving higher probability to shorther programs."""
normalized_lengths = (np.array(self._lengths) - min(self._lengths)) / (
max(self._lengths) + 1e-6)
probabilities = _softmax(-normalized_lengths, temperature=1.0)
return np.random.choice(self._programs, p=probabilities)
================================================
FILE: baseline/funsearch/implementation/sampler.py
================================================
# Copyright 2023 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Class for sampling new programs."""
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Collection, Sequence, Type
import numpy as np
import time
from implementation import evaluator
from implementation import programs_database
class LLM(ABC):
"""Language model that predicts continuation of provided source code.
RZ: The sampled function code must be trimmed! Especially using instruct-based LLM.
-For example, the sampled function code (with description) is:
------------------------------------------------------------------------------------------------------------------
Here is the function.
def priority_v2(..., ...) -> Any:
a = np.array([1, 2, 3])
if len(a) > 2:
return a / a.sum()
else:
return a / a.mean()
This function is going to ..., and returns ...[Descriptions by LLM]
------------------------------------------------------------------------------------------------------------------
-The descriptions above the function's signature, and the function's signature must be removed.
-The above code must be trimmed as follows:
------------------------------------------------------------------------------------------------------------------
a = np.array([1, 2, 3])
if len(a) > 2:
return a / a.sum()
else:
return a / a.mean()
Here is the function. This function is going to ..., and returns ...[Descriptions by LLM]
------------------------------------------------------------------------------------------------------------------
Please note that the indent must be preserved. And the additional descriptions can also be preserved,
which will be trimmed by Evaluator.
"""
def __init__(self, samples_per_prompt: int) -> None:
self._samples_per_prompt = samples_per_prompt
def _draw_sample(self, prompt: str) -> str:
"""Returns a predicted continuation of `prompt`."""
raise NotImplementedError('Must provide a language model.')
@abstractmethod
def draw_samples(self, prompt: str) -> Collection[str]:
"""Returns multiple predicted continuations of `prompt`."""
return [self._draw_sample(prompt) for _ in range(self._samples_per_prompt)]
class Sampler:
"""Node that samples program continuations and sends them for analysis.
"""
_global_samples_nums: int = 1 # RZ: this variable records the global sample nums
def __init__(
self,
database: programs_database.ProgramsDatabase,
evaluators: Sequence[evaluator.Evaluator],
samples_per_prompt: int,
max_sample_nums: int | None = None,
llm_class: Type[LLM] = LLM
):
self._samples_per_prompt = samples_per_prompt
self._database = database
self._evaluators = evaluators
self._llm = llm_class(samples_per_prompt)
self._max_sample_nums = max_sample_nums
def sample(self, **kwargs):
"""Continuously gets prompts, samples programs, sends them for analysis.
"""
while True:
# stop the search process if hit global max sample nums
if self._max_sample_nums and self.__class__._global_samples_nums >= self._max_sample_nums:
break
prompt = self._database.get_prompt()
reset_time = time.time()
samples = self._llm.draw_samples(prompt.code)
sample_time = (time.time() - reset_time) / self._samples_per_prompt
# This loop can be executed in parallel on remote evaluator machines.
for sample in samples:
self._global_sample_nums_plus_one() # RZ: add _global_sample_nums
cur_global_sample_nums = self._get_global_sample_nums()
chosen_evaluator: evaluator.Evaluator = np.random.choice(self._evaluators)
chosen_evaluator.analyse(
sample,
prompt.island_id,
prompt.version_generated,
**kwargs,
global_sample_nums=cur_global_sample_nums,
sample_time=sample_time
)
def _get_global_sample_nums(self) -> int:
return self.__class__._global_samples_nums
def set_global_sample_nums(self, num):
self.__class__._global_samples_nums = num
def _global_sample_nums_plus_one(self):
self.__class__._global_samples_nums += 1
================================================
FILE: baseline/funsearch/llm-server/llm_server.py
================================================
import gc
from argparse import ArgumentParser
from threading import Thread
from typing import Iterator, Optional
import torch
from transformers import (
AutoConfig, AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer, BitsAndBytesConfig, TextStreamer
)
from flask import Flask, request, jsonify, Response, stream_with_context
from flask_cors import CORS
import json
import os
# model_path_home = '/raid/zhichao/zhangrui/LLMs'
default_model_path_path = '/raid/zhichao/zhangrui/LLMs/CodeLlama-7b-Instruct-hf'
# arguments
parser = ArgumentParser()
parser.add_argument('--d', nargs='+', default=['1', '2', '3'])
parser.add_argument('--quantization', default=False, action='store_true')
parser.add_argument('--path', type=str, default=default_model_path_path)
parser.add_argument('--host', type=str, default='127.0.0.1')
parser.add_argument('--port', type=int, default=11011)
args = parser.parse_args()
# cuda visible devices
cuda_visible_devices = ','.join(args.d)
os.environ['CUDA_VISIBLE_DEVICES'] = cuda_visible_devices
# set quantization (do not quantization by default)
if args.quantization:
quantization_config = BitsAndBytesConfig(
load_in_8bit=True,
# load_in_4bit=True,
# bnb_4bit_compute_dtype=torch.float16,
# llm_int8_enable_fp32_cpu_offload=True
)
else:
quantization_config = None
# CodeLlama-Python model
pretrained_model_path = args.path
config = AutoConfig.from_pretrained(
pretrained_model_name_or_path=pretrained_model_path,
# model_id,
# cache_dir=None,
)
# config.pretraining_tp = 1
model = AutoModelForCausalLM.from_pretrained(
pretrained_model_name_or_path=pretrained_model_path,
# model_id=None,
# config=config,
quantization_config=quantization_config,
device_map='auto',
# cache_dir=None,
# use_safetensors=False,
)
# tokenizer for the LLM
tokenizer = AutoTokenizer.from_pretrained(
pretrained_model_name_or_path=pretrained_model_path,
)
# Flask API
app = Flask(__name__)
CORS(app)
@app.route(f'/completions', methods=['POST'])
def completions():
content = request.json
prompt = content['prompt']
prompt = [
{'role': 'user', 'content': prompt}
]
repeat_prompt = content.get('repeat_prompt', 1)
# due to the limitations of the GPU devices in the server, the maximum repeat prompt have to be restricted
max_repeat_prompt = 10
repeat_prompt = min(max_repeat_prompt, repeat_prompt)
print(f'========================================== Prompt ==========================================')
print(f'{prompt}\n')
print(f'============================================================================================')
print(f'\n\n')
max_new_tokens = 512
temperature = 0.3
do_sample = True
top_k = 30
top_p = 0.9
num_return_sequences = 1
eos_token_id = 32021
pad_token_id = 32021
if 'params' in content:
params: dict = content.get('params')
max_new_tokens = params.get('max_new_tokens', 512)
temperature = params.get('temperature', 0.3)
do_sample = params.get('do_sample', True)
top_k = params.get('top_k', 30)
top_p = params.get('top_p', 0.9)
num_return_sequences = params.get('num_return_sequences', 1)
eos_token_id = params.get('eos_token_id', 32021)
pad_token_id = params.get('pad_token_id', 32021)
while True:
inputs = tokenizer.apply_chat_template(prompt, add_generation_prompt=True, return_tensors='pt')
inputs = torch.vstack([inputs] * repeat_prompt).to(model.device)
try:
# LLM inference
output = model.generate(
inputs,
max_new_tokens=max_new_tokens,
temperature=temperature,
do_sample=do_sample,
top_k=top_k,
top_p=top_p,
num_return_sequences=num_return_sequences,
eos_token_id=eos_token_id,
pad_token_id=pad_token_id
)
except torch.cuda.OutOfMemoryError as e:
# clear cache
gc.collect()
if torch.cuda.device_count() > 0:
torch.cuda.empty_cache()
# decrease repeat_prompt num
repeat_prompt = max(repeat_prompt // 2, 1)
continue
content = []
for i, out_ in enumerate(output):
content.append(tokenizer.decode(output[i, len(inputs[i]):], skip_special_tokens=True))
print(f'======================================== Response Content ========================================')
print(f'{content}\n')
print(f'==================================================================================================')
print(f'\n\n')
# clear cache
gc.collect()
if torch.cuda.device_count() > 0:
torch.cuda.empty_cache()
# Send back the response.
return jsonify(
{'content': content}
)
if __name__ == '__main__':
app.run(host=args.host, port=args.port)
================================================
FILE: baseline/funsearch/llm-server/request.py
================================================
import time
import requests
import json
url = 'http://127.0.0.1:11011/completions'
while True:
prompt = '''Complete a Python function inspired by the given functions.
You must generate a function that is different from the previous functions.
You must be creative and you can add various control flow statements.
Only output the Python code, no descriptions.
def priority_v0(item: float, bins: np.ndarray) -> np.ndarray:
"""Returns priority with which we want to add item to each bin.
Args:
item: Size of item to be added to the bin.
bins: Array of capacities for each bin.
Return:
Array of same size as bins with priority score of each bin.
"""
penalty = np.arange(len(bins), 0, -1)
scores = bins / (bins - item) - penalty
max_capacity_bins = np.where(bins == bins.max())[0]
for idx in max_capacity_bins:
scores[idx] = -np.inf
return scores
def priority_v1(item: float, bins: np.ndarray) -> np.ndarray:
"""Improved version of `priority_v0`."""
'''
data = {
'prompt': prompt,
'repeat_prompt': 5,
'system_prompt': '',
'stream': False,
'params': {
'temperature': 0.5,
'top_k': None,
'top_p': None,
'add_special_tokens': False,
'skip_special_tokens': True,
}
}
# inputs, max_new_tokens=512, do_sample=False, top_k=50, top_p=0.95, num_return_sequences=1, eos_token_id=32021
headers = {'Content-Type': 'application/json'}
record_time = time.time()
response = requests.post(url, data=json.dumps(data), headers=headers)
durations = time.time() - record_time
def process_response_content(content: str) -> str:
ret = content.split('[/INST]')[1]
return ret
if response.status_code == 200:
print(f'Query time: {durations}')
# print(f'Response: {response.json()}')
content = response.json()["content"]
for c in content:
# content = process_response_content(content)
print(f'{c}')
else:
print('Failed to make the POST request.')
================================================
FILE: baseline/funsearch/requiremetns.txt
================================================
# Rui Zhang 01/09/2024
# funsearch requires the following requirements
# Python version MUST be larger or equal than Python 3.9 !!!
transformers
bitsandbytes
torch
absl-py
scipy
flask
flask-cors
numba
tensorboard
tensorboardX
================================================
FILE: docs/QuickGuide.md
================================================
# Step-by-step Guide on Applying EoH on Your Problem ?
Coming soon
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_1.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (max_capacity - bins) / max_capacity)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = bins - item\n scores = capacity / np.maximum(capacity, 1)\n scores = np.where(bins == bins.max(), 0, scores)\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n full_bins = bins == np.max(bins)\n scores = (full_bins * item) + (1 - full_bins) * remaining_capacity\n scores[scores == np.max(scores)] = 0\n return scores",
"objective": 0.14358,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n full_bins = bins == np.max(bins)\n scores = (full_bins * item) + (1 - full_bins) * remaining_capacity\n return scores",
"objective": 0.76245,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n item_arr = np.full_like(bins, item)\n non_zero_mask = bins != item_arr\n scores = np.where(non_zero_mask, bins / item_arr, np.inf)\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_10.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = item / (bins[mask] - item + 1e-6)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / (bins[mask] - item + 1) * np.log(bins[mask])\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (item / bins)**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (3 * bins[mask] - 2 * item) / (2 * np.arange(len(bins)) + 2)[mask] + (2 * bins[mask] > 3 * item).astype(int)\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = np.power(normalized_capacity, num_bins) * np.arange(num_bins, 0, -1)\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (3 * bins[mask] - 2 * item) / (2 + np.arange(len(bins)))[mask] + (2 * bins[mask] > 3 * item).astype(int)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (2 * bins[mask] - item) / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04186,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item * np.arange(1, len(bins)+1)) * (bins != max_capacity)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = 0\n scores[~mask] = bins[~mask] / (np.maximum(1, bins[~mask] - item) + 1e-6)\n\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = bins[mask] / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 3 * np.arange(len(bins))\n scores[bins == max_capacity] -= 2 * item\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i in range(len(bins)):\n if bins[i] != max_capacity:\n scores[i] = (3 * bins[i] - 2 * item) / (2 + i) + (bins[i] > item)\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n sorted_bins = np.sort(bins)\n max_capacity = sorted_bins[-1]\n scores = (sorted_bins - item * np.arange(1, len(sorted_bins)+1)) * (sorted_bins != max_capacity)\n return scores",
"objective": 0.04296,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 3 * np.arange(len(bins)) + (bins == max_capacity) * item\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04367,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_11.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask]))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = item / (bins[mask] - item + 1e-6)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / (bins[mask] - item + 1) * np.log(bins[mask])\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (item / bins)**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (3 * bins[mask] - 2 * item) / (2 * np.arange(len(bins)) + 2)[mask] + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = bins[i] / (np.maximum(1, bins[i] - item) + 1e-6) * (i+1)\n \n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = np.power(normalized_capacity, num_bins) * np.arange(num_bins, 0, -1)\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (3 * bins[mask] - 2 * item) / (2 + np.arange(len(bins)))[mask] + (2 * bins[mask] > 3 * item).astype(int)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (2 * bins[mask] - item) / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04186,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item * np.arange(1, len(bins)+1)) * (bins != max_capacity)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n mask = bins != np.max(bins)\n scores = np.zeros_like(bins)\n scores[mask] = bins[mask] / (np.maximum(1, bins[mask] - item) + 1e-6)\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = bins[mask] / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 3 * np.arange(len(bins))\n scores[bins == max_capacity] -= 2 * item\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i in range(len(bins)):\n if bins[i] != max_capacity:\n scores[i] = (3 * bins[i] - 2 * item) / (2 + i) + (bins[i] > item)\n \n return scores",
"objective": 0.04276,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_12.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask])) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1e-6) + (2 * bins[mask] > 3 * item).astype(int)\n scores[~mask] = -1\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask]))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item))\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = item / (bins[mask] - item + 1e-6)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / (bins[mask] - item + 1) * np.log(bins[mask])\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == np.max(bins), -1, np.square(item / bins))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = ((bins[mask] + item) / (bins[mask] - item + 1)) / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.empty_like(bins)\n \n diff = bins - item\n diff[diff <= 0] = 1\n scores = bins / diff * (np.arange(len(bins)) + 1)\n scores[bins == max_capacity] = -1\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (3 * bins[mask] - 2 * item) / (2 * np.arange(len(bins)) + 2)[mask] + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = bins[i] / (np.maximum(1, bins[i] - item) + 1e-6) * (i+1)\n \n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = np.power(normalized_capacity, num_bins) * np.arange(num_bins, 0, -1)\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (3 * bins[mask] - 2 * item) / (2 + np.arange(len(bins)))[mask] + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (2 * bins[mask] - item) / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04186,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_13.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n \n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask])) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (bins[mask] - item + 1e-6) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.sqrt(item / (bins[mask] - item + 1))\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask]))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item))\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = item / (bins[mask] - item + 1e-6)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / (bins[mask] - item + 1) * np.log(bins[mask])\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Exclude bins with maximum capacity\n mask = bins != max_capacity\n \n # Calculate the scores for each bin\n scores[mask] = (item / (bins[mask] - item + 1)) ** 2\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == np.max(bins), -1, np.square(item / bins))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = ((bins[mask] + item) / (bins[mask] - item + 1)) / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.empty_like(bins)\n \n diff = bins - item\n diff[diff <= 0] = 1\n scores = bins / diff * (np.arange(len(bins)) + 1)\n scores[bins == max_capacity] = -1\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (3 * bins[mask] - 2 * item) / (2 * np.arange(len(bins)) + 2)[mask] + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = bins[i] / (np.maximum(1, bins[i] - item) + 1e-6) * (i+1)\n \n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = np.power(normalized_capacity, num_bins) * np.arange(num_bins, 0, -1)\n return scores",
"objective": 0.04145,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_14.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / (bins[mask] - item + 1)) ** 2 + np.log(bins[mask]) * bins[mask]\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask])) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = ((item ** 2) / (bins[mask] - item + 1)) + (np.log(bins[mask]) * bins[mask])\n \n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) + (2 * bins[mask] > 3 * item).astype(int)\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.zeros_like(bins)\n\n scores[mask] = item / (bins[mask] - item + 1e-6) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.sqrt(item / (bins[mask] - item + 1))\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask]))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item))\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = item / (bins[mask] - item + 1e-6)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / (bins[mask] - item + 1) * np.log(bins[mask])\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / (bins[mask] - item + 1)) ** 2\n\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == np.max(bins), -1, np.square(item / bins))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (item / (bins[mask] - item + 1)) / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.empty_like(bins)\n \n diff = bins - item\n diff[diff <= 0] = 1\n scores = bins / diff * (np.arange(len(bins)) + 1)\n scores[bins == max_capacity] = -1\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_15.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n # Calculate the modified scores based on the given formula\n scores[mask] = ((item / (bins[mask] - item + 1)) ** 2) + (item * bins[mask]) / np.log(bins[mask])\n \n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / (bins[mask] - item + 1)) ** 2 + np.log(bins[mask]) * bins[mask]\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask])) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = ((item ** 2) / (bins[mask] - item + 1)) + (np.log(bins[mask]) * bins[mask])\n \n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (((item ** 2) / (bins[mask] - item + 1)) + (np.log(bins[mask]) * bins[mask])) / (1 + np.sqrt(bins[mask]))\n \n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) + (2 * bins[mask] > 3 * item).astype(int)\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.zeros_like(bins)\n\n scores[mask] = item / (bins[mask] - item + 1e-6) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.sqrt(item / (bins[mask] - item + 1))\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask]))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item))\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = item / (bins[mask] - item + 1e-6)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / (bins[mask] - item + 1) * np.log(bins[mask])\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (2 * item + 1) / (bins[mask] - item + 1)\n\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / (bins[mask] - item + 1)) ** 2\n\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_16.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / (bins[mask] - item + 1)) ** 2 + (item * bins[mask]) / np.log(bins[mask])\n \n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / (bins[mask] - item + 1)) ** 2 + np.log(bins[mask]) * bins[mask]\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask])) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / (bins[mask] - item + 1)) ** 2 + np.log(bins[mask]) * bins[mask] + np.sqrt(item * bins[mask])\n \n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.sqrt(item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = ((item ** 2) / (bins[mask] - item + 1)) + (np.log(bins[mask]) * bins[mask])\n \n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (((item ** 2) / (bins[mask] - item + 1)) + (np.log(bins[mask]) * bins[mask])) / (1 + np.sqrt(bins[mask]))\n \n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) + (2 * bins[mask] > 3 * item).astype(int)\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1e-6) + (2 * bins[mask] > 3 * item).astype(int)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.sqrt(item / (bins[mask] - item + 1))\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask]))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n ones = np.ones_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = np.sqrt(item) / (bins[mask] - item + ones[mask])\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item))\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = item / (bins[mask] - item + 1e-6)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_17.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n # Calculate the first part of the score\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n\n # Calculate the second part of the score\n scores += (2 * bins > 3 * item).astype(int)\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / (bins[mask] - item + 1)) ** 2 + (item * bins[mask]) / np.log(bins[mask])\n \n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.sqrt((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = ((item / (bins[mask] - item + 1)) ** 2) + (np.log(bins[mask]) * bins[mask])\n\n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = np.sqrt(item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n \n return scores",
"objective": 0.03521,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask])) + (2 * bins[mask] > 3 * item).astype(int)\n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / (bins[mask] - item + 1)) ** 2 + np.log(bins[mask]) * bins[mask] + np.sqrt(item * bins[mask])\n \n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.sqrt(item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = ((item ** 2) / (bins[mask] - item + 1)) + (np.log(bins[mask]) * bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate scores for each bin\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Adjust scores based on remaining capacity\n scores = scores + (2 * bins > 3 * item).astype(int)\n \n # Set scores of bins with maximum capacity to zero\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = ((item ** 2) / (bins[mask] - item + 1)) + (np.log(bins[mask]) * bins[mask])\n \n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (((item ** 2) / (bins[mask] - item + 1)) + (np.log(bins[mask]) * bins[mask])) / (1 + np.sqrt(bins[mask]))\n \n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) + (2 * bins[mask] > 3 * item).astype(int)\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2\n return scores",
"objective": 0.03793,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_18.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n n = len(bins)\n scores = np.zeros(n)\n \n max_capacity = np.max(bins)\n mask = bins != max_capacity\n \n bin_item_diff = bins[mask] - item + 1\n scores[mask] = item / (bin_item_diff * (1 + np.log(bin_item_diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n \n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n # Calculate the first part of the score\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n\n # Calculate the second part of the score\n scores += (2 * bins > 3 * item).astype(int)\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = ((item / (bins[mask] - item + 1)) ** 2) + (item * bins[mask] / np.log(bins[mask])) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / (bins[mask] - item + 1)) ** 2 + (item * bins[mask]) / np.log(bins[mask])\n \n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.sqrt((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = ((item / (bins[mask] - item + 1)) ** 2) + (np.log(bins[mask]) * bins[mask])\n\n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = np.sqrt(item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n \n return scores",
"objective": 0.03521,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / ((bins[mask] - item + 1) * np.log(bins[mask])) + (2 * bins[mask] > 3 * item).astype(int)\n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / (bins[mask] - item + 1)) ** 2 + np.log(bins[mask]) * bins[mask] + np.sqrt(item * bins[mask])\n \n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + (2 * bins[mask] > 3 * item).astype(int) - (bins[mask] % item == 0).astype(int)\n\n return scores",
"objective": 0.03622,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.sqrt(item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = ((item ** 2) / (bins[mask] - item + 1)) + (np.log(bins[mask]) * bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate scores for each bin\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Adjust scores based on remaining capacity\n scores = scores + (2 * bins > 3 * item).astype(int)\n \n # Set scores of bins with maximum capacity to zero\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_19.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_item_diff = bins - item + 1\n \n scores = item / (bin_item_diff * (1 + np.log(bin_item_diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1)**2)) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.square(item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item)) + np.log(bins[mask])\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n # Calculate the first part of the score\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n\n # Calculate the second part of the score\n scores += (2 * bins > 3 * item).astype(int)\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = ((item / (bins[mask] - item + 1)) ** 2) + (item * bins[mask] / np.log(bins[mask])) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) ** 2)) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.power(item / (bins[mask] - item + 1), 2) + item * bins[mask] / np.log(bins[mask]) + np.sqrt(bins[mask]) + (bins[mask] > 3 * item * 2).astype(int)\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_diff = bins - item + 1\n \n scores = (item / (bin_diff * (1 + np.log(bin_diff)))) ** 2 + np.sqrt(bins)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.0336,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = ((item**2) / ((bins[mask] - item + 1)**2 * (1 + np.log(bins[mask] - item + 1)**2))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03421,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.sqrt((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.log(bins[mask]) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = ((item / (bins[mask] - item + 1)) ** 2) + (np.log(bins[mask]) * bins[mask])\n\n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.sqrt(item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03521,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_2.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (max_capacity - bins) / max_capacity)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (max_capacity - bin_capacity + item) / max_capacity\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(num_bins, 0, -1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = (normalized_capacity ** num_bins) * weights\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = bins[i] / max(1, bins[i] - item)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 2 * np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, (max_capacity - bins) / max_capacity)\n scores = scores * (bins > item)\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n scores[bins == item] = -1\n scores[bins > item] = item / bins[bins > item]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = bins - item\n scores = capacity / np.maximum(capacity, 1)\n scores = np.where(bins == bins.max(), 0, scores)\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = np.subtract(bins, item)\n scores = np.divide(capacity, np.maximum(capacity, 1))\n scores = np.where(capacity == bins.max(), 0, scores)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n scores[bins == max_capacity] = 0\n scores[bins != max_capacity] = (max_capacity - bins[bins != max_capacity]) / max_capacity\n scores *= bins > item\n \n scores[scores == np.max(scores)] = 0\n \n return scores",
"objective": 0.05936,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.06359,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_20.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_item_diff = bins - item + 1\n \n scores = item / (bin_item_diff * (1 + np.log(bin_item_diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) ** 2 * (1 + np.log(bins[mask] - item + 1)))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.square(item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item)) + np.log(bins[mask])\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n # Calculate the first part of the score\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))\n\n # Calculate the second part of the score\n scores += (2 * bins > 3 * item).astype(int)\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = ((item / (bins[mask] - item + 1)) ** 2) + (item * bins[mask] / np.log(bins[mask])) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) ** 2)) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.power(item / (bins[mask] - item + 1), 2) + item * bins[mask] / np.log(bins[mask]) + np.sqrt(bins[mask]) + (bins[mask] > 3 * item * 2).astype(int)\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n \n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + (2 * np.log(bins[mask]) / np.log(max_capacity))\n \n return scores",
"objective": 0.0335,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_diff = bins - item + 1\n \n scores = (item / (bin_diff * (1 + np.log(bin_diff)))) ** 2 + np.sqrt(bins)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.0336,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = ((item**2) / ((bins[mask] - item + 1)**2 * (1 + np.log(bins[mask] - item + 1)**2))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03421,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n\n scores[mask] = item / (np.sqrt((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.exp(bins[mask] - item)) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03451,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_21.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_item_diff = bins - item + 1\n \n scores = item / (bin_item_diff * (1 + np.log(bin_item_diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2 * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n first_part = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))) ** 2\n \n # Calculate the second part of the score\n second_part = np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins)\n \n # Calculate the final score\n scores = np.where(bins != max_capacity, first_part + second_part, scores)\n \n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item)) + np.log(bins[mask])\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) ** 2)) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / (bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = np.power(item / (bins[mask] - item + 1), 2) + item * bins[mask] / np.log(bins[mask]) + np.sqrt(bins[mask]) + (bins[mask] > 3 * item * 2).astype(int)\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0335,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_diff = bins - item + 1\n \n scores = (item / (bin_diff * (1 + np.log(bin_diff)))) ** 2 + np.sqrt(bins)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.0336,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_22.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_item_diff = bins - item + 1\n \n scores = item / (bin_item_diff * (1 + np.log(bin_item_diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + np.logical_and(2 * bins[mask] > 3 * item, rest_capacity > 0).astype(int)\n \n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2 * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n indices = np.arange(len(bins))\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n # Set the score of bins with maximum capacity to zero\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item)) + np.log(bins[mask])\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)**2)) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n \n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / (bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2 * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.033,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_23.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_item_diff = bins - item + 1\n \n scores = item / (bin_item_diff * (1 + np.log(bin_item_diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + ((2 * bins[mask] > 3 * item) & (rest_capacity > 0)).astype(int)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2 * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins[mask]) + ((2 * bins[mask] > 3 * item) & (rest_capacity > 0))\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item)) + np.log(bins[mask])\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n # Calculate the scores using a different formula\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (3 * bins[mask] > 2 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / (bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2 * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0329,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_24.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_item_diff = bins - item + 1\n \n scores = item / (bin_item_diff * (1 + np.log(bin_item_diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + ((2 * bins[mask] > 3 * item) & (rest_capacity > 0)).astype(int)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2 * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins[mask]) + ((2 * bins[mask] > 3 * item) & (rest_capacity > 0))\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item)) + np.log(bins[mask])\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (3 * bins[mask] > 2 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / (bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2 * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0328,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_25.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_item_diff = bins - item + 1\n \n scores = item / (bin_item_diff * (1 + np.log(bin_item_diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = (item / (rest_capacity * (1 + np.log(rest_capacity))**2)) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n \n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins[mask]) + ((2 * bins[mask] > 3 * item) & (rest_capacity > 0))\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + np.ceil((2 * bins[mask]) / (3 * item))\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (3 * bins[mask] > 2 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / (bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2 * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0328,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_26.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n bin_item_diff = bins - item + 1\n \n scores = item / (bin_item_diff * (1 + np.log(bin_item_diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n rest_capacity = bins - item\n scores = np.divide(item, np.multiply(rest_capacity, np.log1p(rest_capacity)**2)) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = (item / (rest_capacity * (1 + np.log(rest_capacity))**2)) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins[mask]) + ((2 * bins[mask] > 3 * item) & (rest_capacity > 0))\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + np.ceil((2 * bins[mask]) / (3 * item))\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (3 * bins[mask] > 2 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_27.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins[mask]) + ((2 * bins[mask] > 3 * item) & (rest_capacity > 0))\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = (item / (diff * (1 + np.log(diff)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item))\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (3 * bins[mask] > 2 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_28.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins[mask]) + ((2 * bins[mask] > 3 * item) & (rest_capacity > 0))\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = (item / (diff * (1 + np.log(diff)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item))\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (3 * bins[mask] > 2 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask])\n\n return scores",
"objective": 0.0326,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_29.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n rest_capacity = bins - item\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins[mask]) + ((2 * bins[mask] > 3 * item) & (rest_capacity > 0))\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = (item / (diff * (1 + np.log(diff)))) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2*np.log(bins[mask])\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item))\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask]) + bins[mask] // item\n\n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (3 * bins[mask] > 2 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1)))**2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0325,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_3.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (item / bins)**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.empty_like(bins)\n mask = bins == max_capacity\n scores[mask] = -1\n scores[~mask] = (item / bins[~mask])**2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(num_bins, 0, -1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = (normalized_capacity ** num_bins) * weights\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = bins[i] / max(1, bins[i] - item)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 2 * np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) / max_capacity\n scores[bins == max_capacity] = 0\n scores[bins <= item] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (bins[i] - item) / (1 + i)\n return scores",
"objective": 0.0487,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n scores[bins == item] = -1\n scores[bins > item] = item / bins[bins > item]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = bins - item\n scores = capacity / np.maximum(capacity, 1)\n scores = np.where(bins == bins.max(), 0, scores)\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = np.subtract(bins, item)\n scores = np.divide(capacity, np.maximum(capacity, 1))\n scores = np.where(capacity == bins.max(), 0, scores)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n scores[bins == max_capacity] = 0\n scores[bins != max_capacity] = (max_capacity - bins[bins != max_capacity]) / max_capacity\n scores *= bins > item\n \n scores[scores == np.max(scores)] = 0\n \n return scores",
"objective": 0.05936,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.06359,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.linspace(1, num_bins, num_bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n scores[bins == np.max(bins)] = 0\n scores = scores * (bins > item)\n return scores",
"objective": 0.06459,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_30.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n\n # Add a modified third part of the score\n scores += np.exp(-(bins - item + 1)) / (1 + np.exp(-(bins - item + 1)))\n \n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n rest_capacity = bins - item + 1\n \n scores = item / ((rest_capacity) * (1 + np.log1p(rest_capacity)**2)) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n rest_capacity = bins - item\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n rest_capacity = bins - item + 1\n \n scores = item / (rest_capacity * np.log1p(rest_capacity)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = np.exp(item / (rest_capacity * np.log1p(rest_capacity)**2)) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item))\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + 2 * np.log(bins[mask])\n\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_31.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n\n # Add a modified third part of the score\n scores += np.exp(-(bins - item + 1)) / (1 + np.exp(-(bins - item + 1)))\n \n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / ((rest_capacity) * (1 + np.log1p(rest_capacity)**2)) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n rest_capacity = bins - item\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (rest_capacity > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.exp(item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + ((2 * bins > 3 * item) & (diff > 0))\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item))\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) ** 2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_32.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n\n # Add a modified third part of the score\n scores += np.exp(-(bins - item + 1)) / (1 + np.exp(-(bins - item + 1)))\n \n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = item / (diff**2 * np.log(diff + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n rest_capacity = bins[mask] - item + 1\n\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n\n scores = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins) + ((2 * bins > 3 * item) & (diff > 0))\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.exp(item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + ((2 * bins > 3 * item) & (diff > 0))\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item / ((bins - item + 1) * (1 + np.log(bins - item + 1))))**2 + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item))\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) ** 2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.0322,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_33.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) ** 2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n\n # Add a modified third part of the score\n scores += np.exp(-(bins - item + 1)) / (1 + np.exp(-(bins - item + 1)))\n \n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = item / (diff**2 * np.log(diff + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = item / ((diff * np.log1p(diff))**2) + np.sqrt(bins) + ((2 * bins > 3 * item) & (diff > 0))\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03139,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n\n scores = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) ** 2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.exp(item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + ((2 * bins > 3 * item) & (diff > 0))\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item + 1\n sqrt_diff = np.sqrt(diff + 1)\n scores = item / (diff**2 * np.log(diff + 1)) + sqrt_diff + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item))\n return scores",
"objective": 0.032,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_34.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) ** 2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n\n # Calculate the third part of the score\n scores += np.exp(-(bins - item + 1)) / (1 + np.exp(-(bins - item + 1)))\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = item / (diff**2 * np.log(diff + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = item / (diff**2 * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03139,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.exp(item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + ((2 * bins > 3 * item) & (diff > 0))\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item + 1\n sqrt_diff = np.sqrt(diff + 1)\n scores = item / (diff**2 * np.log(diff + 1)) + sqrt_diff + (2 * bins > 3 * item).astype(int)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + np.ceil(2 * bins[mask] / (3 * item))\n return scores",
"objective": 0.032,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_35.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) ** 2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n\n # Calculate the third part of the score\n scores += np.exp(-(bins - item + 1)) / (1 + np.exp(-(bins - item + 1)))\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item**3) / (bins[mask]**3 - item**3 + 1) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff**2 * np.log1p(diff)) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = item / (diff**2 * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03139,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins) + (2 * bins > 3 * item)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1)**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / (bins[mask] - item + 1) ** 2 + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item + 1\n \n scores = np.exp(item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + ((2 * bins > 3 * item) & (diff > 0))\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03179,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_36.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**4) / (bins**4 - item**4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) ** 2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1))) * (1 + np.exp(-(bins - item + 1)))\n\n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item**3) / (bins[mask]**3 - item**3 + 1) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n scores = np.where(bins != max_capacity, (item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = item / (diff**2 * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03139,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_37.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**4) / (bins**4 - item**4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) ** 2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1))) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item**3) / (bins[mask]**3 - item**3 + 1) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n scores = np.where(bins != max_capacity, (item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item + 1\n\n scores = item / (rest_capacity * np.log1p(rest_capacity)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_38.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**4) / (bins**4 - item**4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) ** 2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (item**3) / (bins[mask]**3 - item**3 + 1) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n scores = np.where(bins != max_capacity, (item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = item / ((bins[mask] - item + 1) * (1 + np.log(bins[mask] - item + 1))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item).astype(int) + np.log(bins[mask])\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_39.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**4) / (bins**4 - item**4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) ** 2) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n scores = np.where(bins != max_capacity, (item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_4.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (item / bins)**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, -1)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(num_bins, 0, -1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = (normalized_capacity ** num_bins) * weights\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = bins[i] / (max(1, bins[i] - item) + 1e-6)\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = bins[i] / max(1, bins[i] - item)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 2 * np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) / max_capacity\n scores[bins == max_capacity] = 0\n scores[bins <= item] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (bins[mask] - item) / (1 + np.arange(len(bins)))[mask]\n return scores",
"objective": 0.0487,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n scores[bins == item] = -1\n scores[bins > item] = item / bins[bins > item]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = bins - item\n scores = capacity / np.maximum(capacity, 1)\n scores = np.where(bins == bins.max(), 0, scores)\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = np.subtract(bins, item)\n scores = np.divide(capacity, np.maximum(capacity, 1))\n scores = np.where(capacity == bins.max(), 0, scores)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n\n scores[bins == max_capacity] = 0\n scores[bins != max_capacity] = (max_capacity - bins[bins != max_capacity]) / max_capacity\n scores *= bins > item\n\n scores[scores == np.max(scores)] = 0\n\n return scores",
"objective": 0.05936,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.06359,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_40.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**4) / (bins**4 - item**4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 2) / (bins ** 2 - item ** 2 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n scores = np.where(bins != max_capacity, (item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2)) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int))\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_41.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 2) / (bins ** 2 - item ** 2 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n scores = np.where(bins != max_capacity, (item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2)) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int))\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n diff = bins[mask] - item + 1\n scores[mask] = item / (diff**2 * (1 + np.log(diff))) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03129,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_42.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 2) / (bins ** 2 - item ** 2 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item + 1\n scores = np.where(bins != max_capacity, item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**2) / (bins**2 - item**2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n scores = np.where(bins != max_capacity, (item / (diff * np.log1p(diff)**2)) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2)) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int))\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n\n rest_capacity = bins[mask] - item + 1\n scores[mask] = item / (rest_capacity * (1 + np.log(rest_capacity))**2) + np.sqrt(bins[mask]) + (2 * bins[mask] > 3 * item)\n\n return scores",
"objective": 0.03119,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_43.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n # Calculate the scores for each bin\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n # Disable the bins with maximum capacity\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 2) / (bins ** 2 - item ** 2 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != np.max(bins), item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (item > 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (3 * bins > 2 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2)) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int))\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03109,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_44.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n # Calculate the scores for each bin\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n # Disable the bins with maximum capacity\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 2) / (bins ** 2 - item ** 2 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != np.max(bins), item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (item > 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (3 * bins > 2 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2)) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int))\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + np.log(bins + 1) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03109,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_45.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 3) / (bins ** 3 - item ** 3 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 2) / (bins ** 2 - item ** 2 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != np.max(bins), item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (item > 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (3 * bins > 2 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.exp(item / (np.power(bins - item + 1, 2)) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int))\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03109,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_46.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 2) / (bins ** 2 - item ** 2 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != np.max(bins), item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (item > 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = item**3 / (bins**3 - item**3 + 1) + np.sqrt(bins) + ((3 * bins) > (2 * item)).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = item / ((bins - item + 1) * np.log(bins - item + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item / (bins - item + 1)**2) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03109,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_47.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = ((item ** 3) / (bins ** 3 - item ** 3 + 1)) + (np.sqrt(bins)) + ((2 * bins) > (3 * item)).astype(int) + (2 * np.log(bins + 1))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 2) / (bins ** 2 - item ** 2 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != np.max(bins), item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (item > 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = item**3 / (bins**3 - item**3 + 1) + np.sqrt(bins) + ((3 * bins) > (2 * item)).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item / (bins - item + 1)**2) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03109,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_48.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = ((item ** 3) / (bins ** 3 - item ** 3 + 1)) + (np.sqrt(bins)) + ((2 * bins) > (3 * item)).astype(int) + (2 * np.log(bins + 1))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = ((item ** 2) / (bins ** 2 - item ** 2 + 1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != np.max(bins), item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = np.exp(item / (np.power(bins - item + 1, 2))) + np.sqrt(bins) + np.logical_and(2 * bins > 3 * item, bins > 0).astype(int) + (item > 0).astype(int)\n\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = item**3 / (bins**3 - item**3 + 1) + np.sqrt(bins) + ((3 * bins) > (2 * item)).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item / (bins - item + 1)**2) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03109,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_49.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = item**3 / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = ((item ** 3) / (bins ** 3 - item ** 3 + 1)) + (np.sqrt(bins)) + ((2 * bins) > (3 * item)).astype(int) + (2 * np.log(bins + 1))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + 2 * np.log(bins + 1)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + ((bins % item) == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != np.max(bins), item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = ((item ** 3) / (bins ** 3 - item ** 3 + 1)) + (2 * np.sqrt(bins)) + ((2 * bins) > (3 * item)).astype(int) + (3 * np.log(bins + 1))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = item**3 / (bins**3 - item**3 + 1) + np.sqrt(bins) + ((3 * bins) > (2 * item)).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item / (bins - item + 1)**2) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03109,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_5.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = bins[i] / (bins[i] - item + 1e-6)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (item / bins)**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, -1)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = np.power(normalized_capacity, num_bins) * np.arange(num_bins, 0, -1)\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - item * (np.arange(len(bins)) + 1)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = 0\n scores[~mask] = bins[~mask] / (np.maximum(1, bins[~mask] - item) + 1e-6)\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = bins[i] / max(1, bins[i] - item)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 2 * np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n denom = bins - item\n denom[denom == 0] = 1\n \n scores[mask] = denom[mask] / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04528,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) / max_capacity\n scores[bins == max_capacity] = 0\n scores[bins <= item] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (bins[mask] - item) / (1 + np.arange(len(bins)))[mask]\n return scores",
"objective": 0.0487,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n scores[bins == item] = -1\n scores[bins > item] = item / bins[bins > item]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = bins - item\n scores = np.where(capacity == bins.max() - item, 0, capacity / np.maximum(capacity, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = np.subtract(bins, item)\n scores = np.divide(capacity, np.maximum(capacity, 1))\n scores = np.where(capacity == bins.max(), 0, scores)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_50.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log1p(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 4) / (bins ** 4 - item ** 4 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = item**3 / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins) + (bins % item == 0).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = ((item ** 3) / (bins ** 3 - item ** 3 + 1)) + (np.sqrt(bins)) + ((2 * bins) > (3 * item)).astype(int) + (2 * np.log(bins + 1))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**5) / (bins**5 - item**5 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 2)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = item**3 / (bins**3 - item**3 + 1) + np.sqrt(bins) + ((3 * bins) > (2 * item)).astype(int) + np.log(bins + 2)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the first part of the score\n scores = item / ((bins - item + 1) * (1 + np.log(bins - item + 1)))\n \n # Calculate the second part of the score\n scores += 2 * (bins > 3 * item)\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores = (item**3) / (bins**3 - item**3 + 1) + np.sqrt(bins) + (3 * bins >= 2 * item).astype(int) + np.log(bins**2 + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n diff = bins - item + 1\n scores = np.where(bins != np.max(bins), item / (diff * np.log1p(diff)**2) + np.sqrt(bins) + (2 * bins > 3 * item), 0)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int) + np.log(bins + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + 2 * np.sqrt(bins) + 2 * np.minimum(1, bins > item * 0.75) + 3 * np.log(bins + 1)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item**2) / ((bins**2 - item**2 + 1) * np.log(bins+1)) + np.sqrt(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = item**3 / (bins**3 - item**3 + 1) + np.sqrt(bins) + ((3 * bins) > (2 * item)).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 2) / (bins ** 2 - item ** 2 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item / (bins - item + 1)**2) + np.sqrt(bins) + np.log1p(bins) + (2 * bins > 3 * item).astype(int)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = (item ** 3) / (bins ** 3 - item ** 3 + 1) + np.sqrt(bins) + (3 * bins > 4 * item).astype(int) + 3 * np.log(bins + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03109,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_6.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = bins[i] / (bins[i] - item + 1e-6)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (item / bins)**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, -1)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = np.power(normalized_capacity, num_bins) * np.arange(num_bins, 0, -1)\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item * (np.arange(len(bins)) + 1)) * (bins != max_capacity)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = 0\n scores[~mask] = bins[~mask] / (np.maximum(1, bins[~mask] - item) + 1e-6)\n\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = bins[i] / max(1, bins[i] - item)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 2 * np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n denom = bins - item\n denom[denom == 0] = 1\n \n scores[mask] = denom[mask] / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04528,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = 0\n scores[:] = (2 * bins - item) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) / max_capacity\n scores[bins == max_capacity] = 0\n scores[bins <= item] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (bins[mask] - item) / (1 + np.arange(len(bins)))[mask]\n return scores",
"objective": 0.0487,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - item) / (bins[mask] - item)\n return scores",
"objective": 0.05051,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n mask = bins > item\n scores[mask] = item / bins[mask]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacity = bins - item\n scores = np.where(capacity == bins.max() - item, 0, capacity / np.maximum(capacity, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_7.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = item / (bins[i] - item + 1e-6)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (item / bins)**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = np.power(normalized_capacity, num_bins) * np.arange(num_bins, 0, -1)\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item * (np.arange(len(bins)) + 1)) * (bins != max_capacity)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = 0\n scores[~mask] = bins[~mask] / (np.maximum(1, bins[~mask] - item) + 1e-6)\n\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = 0\n scores[bins != max_capacity] = bins[bins != max_capacity] / np.maximum(1, bins[bins != max_capacity] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 2 * np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n denom = bins - item\n denom[denom == 0] = 1\n \n scores[mask] = denom[mask] / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04528,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = 0\n scores[:] = (2 * bins - item) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n scores[mask] = np.where(bins[mask] - item > 0, bins[mask] / (bins[mask] - item), 0)\n \n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, item / bins)\n scores[bins - item <= 0] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (bins[mask] - item) / (1 + np.arange(len(bins)))[mask]\n return scores",
"objective": 0.0487,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - np.arange(len(bins)), 0)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - item) / (bins[mask] - item)\n return scores",
"objective": 0.05051,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n mask = bins > item\n scores[mask] = item / bins[mask]\n return scores",
"objective": 0.05071,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_8.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i in range(len(bins)):\n if bins[i] != max_capacity:\n scores[i] = item / (bins[i] - item + 1e-6)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (item / bins)**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = np.power(normalized_capacity, num_bins) * np.arange(num_bins, 0, -1)\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (2 * bins[mask] - item) / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04186,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item * (np.arange(len(bins)) + 1)) * (bins != max_capacity)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = 0\n scores[~mask] = bins[~mask] / (np.maximum(1, bins[~mask] - item) + 1e-6)\n\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = bins[mask] / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 2 * np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n denom = bins - item\n denom[denom == 0] = 1\n \n scores[mask] = denom[mask] / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04528,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = 0\n scores[:] = (3 * bins - item) / (2 + np.arange(len(bins))) + (bins > item).astype(int)\n return scores",
"objective": 0.04618,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = 0\n scores[:] = (2 * bins - item) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n scores[mask] = np.where(bins[mask] - item > 0, bins[mask] / (bins[mask] - item), 0)\n \n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, item / bins)\n scores[bins - item <= 0] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - np.arange(len(bins))**2 - item\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04829,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run1/population_generation_9.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n for i in range(len(bins)):\n if bins[i] != max_capacity:\n scores[i] = item / (bins[i] - item + 1e-6)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, (item / bins)**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (item / bins[mask]) ** 2\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = max_capacity - bins + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = np.power(normalized_capacity, num_bins) * np.arange(num_bins, 0, -1)\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * bins - item) / (1 + np.arange(len(bins)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (3 * bins[mask] - 2 * item) / (2 + np.arange(len(bins)))[mask] + (2 * bins[mask] > 3 * item).astype(int)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (2 * bins[mask] - item) / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04186,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item * np.arange(1, len(bins)+1)) * (bins != max_capacity)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(item, bins) / (1 + np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = 0\n scores[~mask] = bins[~mask] / (np.maximum(1, bins[~mask] - item) + 1e-6)\n\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n scores[mask] = bins[mask] / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (3 * bins[mask] - 2 * item) / (2 + np.arange(len(bins)))[mask] + (bins[mask] > item).astype(int)\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 3 * np.arange(len(bins)) + (bins == max_capacity) * item\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins - 2 * np.arange(len(bins))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n \n denom = bins - item\n denom[denom == 0] = 1\n \n scores[mask] = denom[mask] / (1 + np.arange(len(bins)))[mask]\n \n return scores",
"objective": 0.04528,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = 0\n scores[:] = (3 * bins - item) / (2 + np.arange(len(bins))) + (bins > item).astype(int)\n return scores",
"objective": 0.04618,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = 0\n scores[:] = (2 * bins - item) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.04668,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_1.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * (1 - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = (bins / (bins - item)).clip(0, 1)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] == max_cap:\n scores[i] = 0\n else:\n scores[i] = bins[i] / max(1, bins[i] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_cap = np.max(bins)\n for i, bin_size in enumerate(bins):\n if bin_size == max_cap:\n scores[i] = -np.inf\n elif bin_size > item:\n scores[i] = item / bin_size\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins > item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, -1, item / bins)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item]\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = (bins // item) - (bins == max_cap)\n scores[bins < item] = 0\n return scores",
"objective": 0.10333,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - item/bins) * (bins != np.max(bins))\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n unused_bins = bins == max_capacity\n scores[unused_bins] = 0\n scores[np.logical_not(unused_bins)] = (1 - item / (bins[np.logical_not(unused_bins)] - item)) * (bins[np.logical_not(unused_bins)] != max_capacity)\n return scores",
"objective": 0.25174,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (item - bins) * (bins != max_capacity)\n return scores",
"objective": 0.89597,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_10.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / np.maximum((bins[mask] - item), 1)\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n scores[bins != max_capacity] = 1 / np.maximum((bins[bins != max_capacity] - item), 1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins != max_capacity) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = 1 / (bins[mask] - item)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / diff[diff > 0]\n return scores",
"objective": 0.04719,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = (max_cap - bins[mask] + 1) / (bins[mask] - item + 1)\n \n scores[bins == max_cap] = 0\n \n return scores",
"objective": 0.04729,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n scores[bins <= item] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = item / (item + bins[mask] - max_cap)\n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n\n scores = np.zeros(num_bins)\n mask = (bins != max_cap) & (bins != min_cap)\n scores[mask] = 1 - ((item - bins[mask]) / (item - min_cap))\n\n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = (max_cap - item) / (bins[mask] - item)\n return scores",
"objective": 0.05051,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_11.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item + 1)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n scores[bins != max_capacity] = 1 / np.maximum((bins[bins != max_capacity] - item), 1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins != max_capacity) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n num_bins = len(bins)\n \n scores = np.zeros(num_bins)\n \n mask = (bins != max_capacity) & (bins != min_capacity)\n scores[mask] = item / (bins[mask] - item)\n \n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n \n return scores",
"objective": 0.04437,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n \n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04658,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = item / (bins[mask] - item + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / diff[diff > 0]\n return scores",
"objective": 0.04719,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = (max_cap - bins[mask] + 1) / (bins[mask] - item + 1)\n \n scores[bins == max_cap] = 0\n \n return scores",
"objective": 0.04729,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_12.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n # Remove bins with maximum capacity from consideration\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n\n # Assign a higher score to bins with rest capacity equal to item size\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n scores[bins != max_capacity] = 1 / np.maximum((bins[bins != max_capacity] - item), 1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins != max_capacity) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n num_bins = len(bins)\n \n scores = np.zeros(num_bins)\n \n mask = (bins != max_capacity) & (bins != min_capacity)\n scores[mask] = item / (bins[mask] - item)\n \n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n \n return scores",
"objective": 0.04437,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n \n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04658,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins > item\n scores[mask] = item / (bins[mask] - item + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / diff[diff > 0]\n return scores",
"objective": 0.04719,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_13.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = item / (bins[mask] - item + 1)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n scores[bins != max_capacity] = 1 / np.maximum((bins[bins != max_capacity] - item), 1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins != max_capacity) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n num_bins = len(bins)\n\n scores = np.zeros(num_bins)\n\n mask = (bins != max_capacity) & (bins != min_capacity)\n scores[mask] = item / (bins[mask] - item)\n\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.04437,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n \n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04658,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins > item\n scores[mask] = item / (bins[mask] - item + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = (item + 1) / (bins[mask] - item + 1)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04699,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04709,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_14.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n \n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = np.log(item) / (diff_without_max_capacity + 0.001)\n \n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins != max_capacity) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n num_bins = len(bins)\n\n scores = np.zeros(num_bins)\n\n mask = (bins != max_capacity) & (bins != min_capacity)\n scores[mask] = item / (bins[mask] - item)\n\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.04437,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n \n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04658,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins > item\n scores[mask] = item / (bins[mask] - item + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = (item + 1) / (bins[mask] - item + 1)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04699,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_15.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n\n scores[bins_without_max_capacity] = np.log(item) / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins != max_capacity) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n num_bins = len(bins)\n\n scores = np.zeros(num_bins)\n\n mask = (bins != max_capacity) & (bins != min_capacity)\n scores[mask] = item / (bins[mask] - item)\n\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.04437,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n \n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n\n scores = np.zeros_like(bins)\n mask = (bins != max_capacity) & (bins != min_capacity)\n \n scores[mask] = item / (bins[mask] - item)\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04658,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins > item\n scores[mask] = item / (bins[mask] - item + 1)\n\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.04668,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_16.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n \n # Calculate scores based on the difference between rest capacity and item size\n diff = rest_capacity / (item + 0.001)\n scores[rest_capacity > 0] = diff[rest_capacity > 0]\n \n # Set scores to 0 if the rest capacity equals the maximum capacity\n scores[bins == max_capacity] = 0\n \n # Set scores to item size if the rest capacity equals the item size\n scores[bins == item] = item\n \n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n\n scores[bins_without_max_capacity] = np.log(item) / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins != max_capacity) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n scores[bins < max_capacity] = item / bins[bins < max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n num_bins = len(bins)\n\n scores = np.zeros(num_bins)\n\n mask = (bins != max_capacity) & (bins != min_capacity)\n scores[mask] = item / (bins[mask] - item)\n\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.04437,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n \n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n\n scores = np.zeros_like(bins)\n\n mask = (bins != max_capacity) & (bins != min_capacity)\n scores[mask] = item / (bins[mask] - item)\n\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_17.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n \n diff = rest_capacity / (item + 0.001)\n scores[rest_capacity > 0] = diff[rest_capacity > 0]\n \n scores[bins == max_capacity] = 0\n \n scores[bins == item] = item\n \n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n\n scores[bins_without_max_capacity] = np.log(item) / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n diff = bins - item\n\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n\n # Calculate scores based on the difference between rest capacity and item size\n diff = rest_capacity / (item + 0.001)\n scores = np.where(rest_capacity > 0, diff, scores)\n\n # Set scores to 0 if the rest capacity equals the maximum capacity\n scores = np.where(bins == max_capacity, 0, scores)\n\n # Set scores to item size if the rest capacity equals the item size\n scores = np.where(bins == item, item, scores)\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.maximum((bins[mask] - item), 1) + 0.001)\n\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins != max_capacity) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n scores[bins < max_capacity] = item / bins[bins < max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n num_bins = len(bins)\n\n scores = np.zeros(num_bins)\n\n mask = (bins != max_capacity) & (bins != min_capacity)\n scores[mask] = item / (bins[mask] - item)\n\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.04437,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_18.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n\n diff = rest_capacity / (item + 0.001)\n scores[rest_capacity > 0] = diff[rest_capacity > 0]\n\n scores[bins == max_capacity] = 0\n\n scores[bins == item] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = np.log(item) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item / (diff[used_bins] + 1)) + 0.001\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n diff = bins - item\n\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n scores[diff > 0] = item / (diff[diff > 0] + 0.001)\n scores[bins == max_capacity] = 0\n scores[bins == item] = item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.maximum((bins[mask] - item), 1) + 0.001)\n\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = (bins != bins.max()) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n scores[bins < max_capacity] = item / bins[bins < max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n\n diff = rest_capacity / (item + 0.001)\n scores = np.where(rest_capacity > 0, diff, scores)\n\n mask = (rest_capacity != max_capacity)\n scores[mask] = np.minimum(1, item / (rest_capacity[mask] + 0.001))\n\n return scores",
"objective": 0.04286,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_19.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n\n diff = rest_capacity / (item + 0.001)\n scores[rest_capacity > 0] = diff[rest_capacity > 0]\n\n scores[bins == max_capacity] = 0\n\n scores[bins == item] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = np.log(item) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = np.log(item) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * np.exp(-diff[diff == item] / item)\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item / (diff[used_bins] + 1)) + 0.001\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n diff = bins - item\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = item / np.maximum((bins[mask] - item) + 0.001, 1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = np.log(item) / (bins[used_bins] - item + 0.001)\n scores[bins == item] = item\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.maximum((bins[mask] - item), 1) + 0.001)\n\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = (bins != bins.max()) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n scores[bins < max_capacity] = item / bins[bins < max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n \n mask = (bins == max_capacity) | (bins == item)\n scores[mask] = 0\n \n mask = (bins != max_capacity) & (bins != item)\n scores[mask] = np.minimum(1, item / (rest_capacity[mask] + 0.001))\n\n scores[bins == item] = item\n\n return scores",
"objective": 0.04125,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_2.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n unused_bins = (bins == max_capacity)\n scores[~unused_bins] = item / bins[~unused_bins]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = (bins / (bins - item)).clip(0, 1)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n for i, b in enumerate(bins):\n if b == max_cap:\n scores[i] = 0\n else:\n scores[i] = b / max(1, b - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n \n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = -np.inf\n elif bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = (item - min_cap) / (item - bins[i])\n \n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_cap = np.max(bins)\n for i, bin_size in enumerate(bins):\n if bin_size == max_cap:\n scores[i] = -np.inf\n elif bin_size > item:\n scores[i] = item / bin_size\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins > item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n \n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n \n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = -np.inf\n elif bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = -((item - bins[i])/(item - min_cap))\n \n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_cap] = 0\n scores[bins != max_cap] = bins[bins != max_cap] / (bins[bins != max_cap] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, -1, item / bins)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin_capacity = np.max(bins)\n capacities = np.where(bins == max_bin_capacity, 0, bins - item)\n scores = np.where(capacities < item, 0, capacities)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n scores = np.zeros(num_bins)\n \n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n \n for i in range(num_bins):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (max_capacity - bins[i]) / (bins[i] - item)\n \n return scores",
"objective": 0.06681,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i, bin_size in enumerate(bins):\n if bin_size == max_cap:\n scores[i] = 0\n elif bin_size == min_cap:\n scores[i] = -np.inf\n else:\n scores[i] = (bin_size - item) / (bin_size - min_cap)\n \n return scores",
"objective": 0.06882,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n valid_bins = bins[bins != item]\n scores = valid_bins - item\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = (bins // item) - (bins == max_cap)\n scores[bins < item] = 0\n return scores",
"objective": 0.10333,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_20.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n\n diff = rest_capacity / (item + 0.001)\n\n scores[rest_capacity > 0] = diff[rest_capacity > 0]\n scores[max_capacity == bins] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = np.log(item) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n used_bins = bins < max_capacity\n\n scores[used_bins] = np.log(item) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * np.exp(-diff[diff == item] / item)\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item / (diff[used_bins] + 1)) + 0.001\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = np.sqrt(item) / (bins[used_bins] - item + 0.001)\n scores[bins == item] = item * np.log(item + 1)\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1) + np.log(item + 1)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n diff = bins - item\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / np.maximum((bins[mask] - item) + 0.001, 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = np.log(item) / (bins[used_bins] - item + 0.001)\n scores[bins == item] = item\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n bins_without_max_capacity = np.where(bins != max_capacity)\n diff_without_max_capacity = diff[bins_without_max_capacity]\n scores[bins_without_max_capacity] = item / (diff_without_max_capacity + 0.001)\n scores[diff == item] = item\n scores[bins == max_capacity] = 0\n scores[bins > item] = 1 / (bins[bins > item] - item)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = item / (np.maximum((bins[mask] - item), 1) + 0.001)\n\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = (bins != bins.max()) * (item / np.maximum((bins - item), 1))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n scores[bins < max_capacity] = item / bins[bins < max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_21.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n\n diff = rest_capacity / (item + 0.001)\n\n scores[rest_capacity > 0] = diff[rest_capacity > 0]\n scores[max_capacity == bins] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n \n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n \n used_bins = bins != max_capacity\n scores[used_bins] = item - np.abs(diff[used_bins]) + 1\n \n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n used_bins = bins < max_capacity\n\n scores[used_bins] = np.log(item) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * np.exp(-diff[diff == item] / item)\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item / (diff[used_bins] + 1)) + 0.001\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = (item / (bins[used_bins] - item + 0.001)) + np.log((bins[used_bins] - item + 1))\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1) + np.log(item + 1)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (np.maximum(diff[used_bins], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n diff = bins - item\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n \n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n \n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1)*np.exp(-np.abs(diff[used_bins])) + item\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / np.maximum((bins[mask] - item) + 0.001, 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = np.log(item) / (bins[used_bins] - item + 0.001)\n scores[bins == item] = item\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = np.log(item) / (diff + 0.001)\n\n scores[bins == max_capacity] = 0\n scores[diff == item] = 0\n\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.cbrt(item) / ((bins[used_bins] - item + 0.001)**2)\n scores[bins == item] = (item**2) * np.log(item + 1)\n\n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_22.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[max_capacity == bins] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n\n used_bins = bins != max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n diff = bins - item\n \n scores[mask] = (item / (diff[mask] + 0.001)) + np.log((diff[mask] + 1))\n scores[diff == item] = item\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item / (diff[used_bins] + 1)) + 0.001\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores[diff == item] = item\n scores[diff != item] = np.log(item + 1) / (diff[diff != item] + 0.001)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = (item / (bins[used_bins] - item + 0.001)) + np.log((bins[used_bins] - item + 1))\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1) + np.log(item + 1)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (np.maximum(diff[used_bins], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n diff = bins - item\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / np.maximum((bins[mask] - item) + 0.001, 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = np.log(item) / (bins[used_bins] - item + 0.001)\n scores[bins == item] = item\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = np.log(item) / (diff + 0.001)\n\n scores[bins == max_capacity] = 0\n scores[diff == item] = 0\n\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_23.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[(item == bins) | (bins == np.max(bins))] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n\n used_bins = bins != max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n diff = bins - item\n \n scores[mask] = (item / (diff[mask] + 0.001)) + np.log((diff[mask] + 1))\n scores[diff == item] = item\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item / (diff[used_bins] + 1)) + 0.001\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff == item] = item\n scores[diff != item] = np.log(item) / (diff[diff != item] + 0.001)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = (item / (bins[used_bins] - item + 0.001)) + np.log((bins[used_bins] - item + 1))\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1) + np.log(item + 1)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / (np.maximum(diff[mask], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n diff = bins - item\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item) + 0.001, 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (bins[used_bins] - item + 0.001)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = np.log(item) / (diff + 0.001)\n\n scores[bins == max_capacity] = 0\n scores[diff == item] = 0\n\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item), 1)\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_24.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[(item == bins) | (bins == np.max(bins))] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n\n used_bins = bins != max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001) + np.log((diff[mask] + 1))\n scores[diff == item] = item\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) / (diff[used_bins] + 1)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff == item] = item\n scores[diff != item] = np.log(item) / (diff[diff != item] + 0.001)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = np.where(bins != max_capacity)\n\n scores[used_bins] = (item / (bins[used_bins] - item + 0.001)) + np.log((bins[used_bins] - item + 1))\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + np.log(item + 1)\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / (np.maximum(diff[mask], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n diff = bins - item\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item) + 0.001, 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (bins[used_bins] - item + 0.001)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = np.log(item) / (diff + 0.001)\n\n scores[bins == max_capacity] = 0\n scores[diff == item] = 0\n\n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_25.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[(item == bins) | (bins == np.max(bins))] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n\n used_bins = bins != max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001) + np.log((diff[mask] + 1))\n scores[diff == item] = item\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = item / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) / (diff[used_bins] + 1)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff == item] = item\n scores[diff != item] = np.log(item) / (diff[diff != item] + 0.001)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = bins < max_capacity\n\n scores[used_bins] = (item / (bins[used_bins] - item + 0.001)) + np.log((bins[used_bins] - item + 1))\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1)\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / (np.maximum(diff[mask], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n diff = bins - item\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item) + 0.001, 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (bins[used_bins] - item + 0.001)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = np.log(item) / (diff + 0.001)\n\n scores[bins == max_capacity] = 0\n scores[diff == item] = 0\n\n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_26.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[(item == bins) | (bins == np.max(bins))] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n\n used_bins = bins != max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001) + np.log((diff[mask] + 1))\n scores[diff == item] = item\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) / (diff[used_bins] + 1)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff == item] = item\n scores[diff != item] = np.log(item) / (diff[diff != item] + 0.001)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n\n scores[used_bins] = item / (diff + 0.001) + np.log(diff + 1)\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1)\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / (np.maximum(diff[mask], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n diff = bins - item\n scores[mask] = item / np.maximum(diff[mask], 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item) + 0.001, 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item) / (bins[used_bins] - item + 0.001)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = np.log(item) / (diff + 0.001)\n\n scores[bins == max_capacity] = 0\n scores[diff == item] = 0\n\n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_27.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[(item == bins) | (bins == np.max(bins))] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n\n used_bins = bins != max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001) + np.log((diff[mask] + 1))\n scores[diff == item] = item\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = bins != max_capacity\n\n scores[mask] = (item + 1) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff == item] = item\n scores[diff != item] = np.log(item) / (diff[diff != item] + 0.001)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n\n scores[used_bins] = item / (diff + 0.001) + np.log(diff + 1)\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1)\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / (np.maximum(diff[mask], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = (item + 1) / (diff + 0.001)\n\n scores[bins == max_capacity] = 0\n scores[diff == item] = item\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 0.001), 0)\n scores[(bins == max_capacity) | (bins == item)] = 0\n scores[bins == item] = item\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item) + 0.001, 1)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item) / (bins[used_bins] - item + 0.001)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n\n scores = np.zeros_like(bins)\n scores = np.log(item) / (diff + 0.001)\n scores[bins == max_capacity] = 0\n scores[diff == item] = 0\n\n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_28.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[(item == bins) | (bins == np.max(bins))] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n\n used_bins = bins != max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001) + np.log((diff[mask] + 1))\n scores[diff == item] = item\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = 2 * item - bins[used_bins] + 1\n\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = bins != max_capacity\n\n scores[mask] = (item + 1) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff == item] = item\n scores[diff != item] = np.log(item) / (diff[diff != item] + 0.001)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item)\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1)\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / (np.maximum(diff[mask], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n\n scores = np.zeros_like(bins)\n scores = np.log(item) / (diff + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n \n scores[used_bins] = item / (np.sqrt(diff) + 1) + np.log(diff + 1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item) + 0.001, 1)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item) / (bins[used_bins] - item + 0.001)\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n\n scores = np.zeros_like(bins)\n scores = np.log(item) / (diff + 0.001)\n scores[bins == max_capacity] = np.min(scores) - 1\n scores[diff == item] = np.min(scores) - 1\n\n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_29.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n rest_capacity = bins - item\n used_bins = bins < max_capacity\n\n scores[used_bins] = (rest_capacity[used_bins] + 1) / (item + 0.001)\n scores[(item == bins) | (bins == max_capacity)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[(item == bins) | (bins == np.max(bins))] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n unused_bins = bins == max_capacity\n scores[unused_bins] = -1\n\n used_bins = bins != max_capacity\n scores[used_bins] = item - np.abs(bins[used_bins] - item) + 1\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001) + np.log(diff[mask] + 1)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item / (diff[used_bins] + 1)\n\n scores[diff == item] = item\n\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins < max_capacity, 2 * item - bins + 1, 0)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = bins != max_capacity\n\n scores[mask] = (item + 1) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff == item] = item\n scores[diff != item] = np.log(item) / (diff[diff != item] + 0.001)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item)\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1)\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / (np.maximum(diff[mask], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n\n scores = np.zeros_like(bins)\n scores = np.log(item) / (diff + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item - bins[used_bins] + 1) / (1 + bins[used_bins] - item)\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / np.maximum((bins[bins != max_capacity] - item) + 0.001, 1)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item) / (bins[used_bins] - item + 0.001)\n\n return scores",
"objective": 0.03924,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_3.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.full_like(bins, -np.inf)\n max_cap = np.max(bins)\n idx = np.where(bins != max_cap)\n scores[idx] = np.minimum(1, item / bins[idx])\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = (bins / (bins - item)).clip(0, 1)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n \n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = -np.inf\n elif bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = (item - min_cap) / (item - bins[i])\n \n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.where(bins == max_cap, -np.inf, np.where(bins > item, item / bins, 0))\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins > item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n \n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n \n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = 0\n elif bins[i] == min_cap:\n scores[i] = 1\n else:\n scores[i] = 1 - ((item - bins[i])/(item - min_cap))\n \n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, -1, item / bins)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n full_bins = (bins == max_capacity)\n rest_capacity = bins - item\n \n scores = np.where(full_bins, 0, rest_capacity / np.maximum(rest_capacity, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n \n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = -np.inf\n elif bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = np.exp((item - min_cap) / (item - bins[i]))\n \n return scores",
"objective": 0.05644,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin_capacity = np.max(bins)\n capacities = np.where(bins == max_bin_capacity, 0, bins - item)\n scores = np.where(capacities < item, 0, capacities)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n scores = np.zeros(num_bins)\n \n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n \n for i in range(num_bins):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (max_capacity - bins[i]) / (bins[i] - item)\n \n return scores",
"objective": 0.06681,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i, bin_size in enumerate(bins):\n if bin_size == max_cap:\n scores[i] = 0\n elif bin_size == min_cap:\n scores[i] = -np.inf\n else:\n scores[i] = (bin_size - item) / (bin_size - min_cap)\n \n return scores",
"objective": 0.06882,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_30.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[(item == bins) | (bins == max_capacity)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[(item == bins) | (bins == np.max(bins))] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = item - abs(bins[i] - item) + 1\n \n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001) + np.log(diff[mask] + 1)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = item / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n mask = bins != max_capacity\n scores[mask] = item / (diff[mask] + 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins < max_capacity, 2 * item - bins + 1, 0)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = bins != max_capacity\n\n scores[mask] = (item + 1) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff == item] = item\n scores[diff != item] = np.log(item) / (diff[diff != item] + 0.001)\n scores[bins == max_capacity] = 0\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item)\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1)\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / (np.maximum(diff[mask], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n\n scores = np.zeros_like(bins)\n scores = np.log(item) / (diff + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.where(bins != max_capacity, item / (diff + 1), 0)\n scores[diff == item] = item\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins != max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins])) + item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item - bins[used_bins] + 1) / (1 + bins[used_bins] - item)\n\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item + 0.001)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = item / (1 + bins[bins != max_capacity] - item)\n\n return scores",
"objective": 0.03914,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_31.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[(item == bins) | (bins == max_capacity)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 0.001)\n scores[(item == bins) | (bins == np.max(bins))] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, item - np.abs(bins - item) + 1)\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n scores[used_bins] = (item**2 * np.exp(-np.abs(bins[used_bins] - item))) / (np.log(item + 1) + 1)\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n \n scores[diff < item] = item / (diff[diff < item] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n mask = bins != max_capacity\n scores[mask] = item / (diff[mask] + 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins < max_capacity, 2 * item - bins + 1, 0)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = bins != max_capacity\n\n scores[mask] = (item + 1) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2*item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1) / (bins[used_bins] + 0.001)\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item)\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1)\n\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins != max_capacity\n scores[mask] = item / (np.maximum(diff[mask], 1)) ** 2\n\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n\n scores = np.zeros_like(bins)\n scores = np.log(item) / (diff + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.where(bins != max_capacity, item / (diff + 1), 0)\n scores[diff == item] = item\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n\n scores = np.zeros_like(bins)\n scores = np.exp(-diff) * item\n scores[diff == item] = 1\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item - bins[used_bins] + 1) / (1 + bins[used_bins] - item)\n return scores",
"objective": 0.03894,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_32.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n used_bins = bins < max_capacity\n\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n \n return scores",
"objective": 0.03421,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (3 * item + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n used_bins = bins < max_capacity\n\n scores[used_bins] = (3 * item + 7) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 4) / (item + 2)\n \n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n diff = bins - item\n \n # calculate scores for each bin\n scores[used_bins] = (2 * item - np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[item == bins] = item\n\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n\n scores = np.zeros_like(bins)\n scores[diff > 0] = diff[diff > 0] / (item + 0.001)\n scores[(item == bins) | (bins == max_capacity)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n \n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, item - np.abs(bins - item) + 1)\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n scores[used_bins] = (item**2 * np.exp(-np.abs(bins[used_bins] - item))) / (np.log(item + 1) + 1)\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff < item] = item / (diff[diff < item] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n mask = bins != max_capacity\n scores[mask] = item / (diff[mask] + 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins < max_capacity, 2 * item - bins + 1, 0)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = bins != max_capacity\n\n scores[mask] = (item + 1) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2*item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1) / (bins[used_bins] + 0.001)\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = item * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item)\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item + 1) * np.exp(-np.abs(bins[used_bins] - item)) + np.log(item + 1)\n\n return scores",
"objective": 0.03843,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_33.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n used_bins = bins < max_capacity\n\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n \n return scores",
"objective": 0.03421,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = 0\n else:\n diff = bin_capacity - item\n score = (3 * item + 7) * np.exp(-np.abs(diff - item)) + np.log(item + 2) / (diff + 0.001)\n if diff == item:\n scores[i] = item * (diff + 4) / (item + 2)\n else:\n scores[i] = score\n \n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (3 * item + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n used_bins = bins < max_capacity\n\n scores[used_bins] = (3 * item + 7) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 4) / (item + 2)\n \n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (3 * item + 7) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 4) / (item + 2)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n diff = bins - item\n \n # calculate scores for each bin\n scores[used_bins] = (2 * item - np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = bins < max_capacity\n diff = bins - item\n\n scores[used_bins] = 2 * item * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = bins < max_capacity\n diff = bins - item\n\n scores[used_bins] = (2 * item * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)) * (item != diff[used_bins])\n\n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[item == bins] = item\n\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n used_bins = bins < max_capacity\n \n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n \n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n \n scores = np.zeros_like(bins)\n \n mask = (diff > 0) & (bins != max_capacity)\n \n scores[mask] = diff[mask] / (item + 0.001)\n scores[item == bins] = item\n\n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, item - np.abs(bins - item) + 1)\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n scores[used_bins] = (item**2 * np.exp(-np.abs(bins[used_bins] - item))) / (np.log(item + 1) + 1)\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff < item] = item / (diff[diff < item] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n mask = bins != max_capacity\n scores[mask] = item / (diff[mask] + 1)\n scores[diff == item] = item\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins < max_capacity, 2 * item - bins + 1, 0)\n return scores",
"objective": 0.03803,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_34.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n diff = bins - item\n scores[mask] = (item * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = (10 * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n used_bins = bins < max_capacity\n\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n \n return scores",
"objective": 0.03421,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n\n return scores",
"objective": 0.03441,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = 0\n else:\n diff = bin_capacity - item\n score = (3 * item + 7) * np.exp(-np.abs(diff - item)) + np.log(item + 2) / (diff + 0.001)\n if diff == item:\n scores[i] = item * (diff + 4) / (item + 2)\n else:\n scores[i] = score\n \n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (3 * item + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n used_bins = bins < max_capacity\n scores[used_bins] = (3 * item + 7) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 4) / (item + 2)\n\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[diff == item] = item\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n diff = bins - item\n\n scores[used_bins] = (2 * item - np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n diff = bins - item\n\n scores[mask] = item * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n\n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = bins < max_capacity\n diff = bins - item\n\n scores[used_bins] = (2 * item * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)) * (item != diff[used_bins])\n\n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[item == bins] = item\n\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1e-10) / (item + 1e-10)\n scores[item == bins] = item\n\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n used_bins = bins < max_capacity\n\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n \n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n scores[diff == item] = item\n scores[item == bins] = item\n \n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = np.log(item) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, -1, item - np.abs(bins - item) + 1)\n return scores",
"objective": 0.03763,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_35.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n diff = bins - item\n scores[mask] = (item * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = (10 * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = diff >= 0\n \n scores[mask] = item * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n\n return scores",
"objective": 0.03421,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n\n return scores",
"objective": 0.03441,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = 0\n else:\n diff = bin_capacity - item\n score = (3 * item + 7) * np.exp(-np.abs(diff - item)) + np.log(item + 2) / (diff + 0.001)\n scores[i] = item * (diff + 4) / (item + 2) if diff == item else score\n \n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (3 * item + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = (item + 1) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[diff == item] = item\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n diff = bins - item\n\n scores[used_bins] = (2 * item - np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n diff = bins - item\n\n scores[mask] = item * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n\n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = bins < max_capacity\n diff = bins - item\n\n scores[used_bins] = (2 * item * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)) * (item != diff[used_bins])\n\n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[item == bins] = item\n\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1e-10) / (item + 1e-10)\n scores[item == bins] = item\n\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n scores[diff == item] = item\n scores[item == bins] = item\n \n return scores",
"objective": 0.03713,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03743,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_36.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = bins < max_capacity\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = (10 * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (3 * item - np.abs(diff[used_bins] - item) + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (2 * item - np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.0336,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = diff >= 0\n \n scores[mask] = item * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n\n return scores",
"objective": 0.03421,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n\n return scores",
"objective": 0.03441,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n used_bins = bins < max_capacity\n scores[used_bins] = (item * 2 + 3) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 4) / (item + 1)\n\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (3 * item + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n diff = bins - item\n \n scores[mask] = (item + 1) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[diff == item] = item\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item - np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n diff = bins - item\n\n scores[mask] = item * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n\n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n \n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n \n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (bins[used_bins] - item + 1) / (item + 0.001)\n scores[bins == item] = item\n\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1e-10) / (item + 1e-10)\n scores[item == bins] = item\n\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (2 * item + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = rest_capacity[rest_capacity > 0] / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[item == bins] = item\n\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n diff = bins - item\n\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 3) / (item + 1)\n scores[(item == bins) | (np.max(bins) == bins)] = 0\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n\n return scores",
"objective": 0.03612,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_37.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = bins < max_capacity\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n mask = bins < max_capacity\n\n scores[mask] = (10 * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (3 * item - np.abs(diff[used_bins] - item) + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n # Calculate scores for bins\n diff = bins - item\n used_bins = diff < max_capacity\n scores[used_bins] = (4 * item - np.abs(diff[used_bins] - item) + 3) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n scores[used_bins] = (item - np.abs(diff[used_bins] - item) + 3) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.0336,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n # Calculate the difference between the bins' capacities and item size\n diff = bins - item\n\n # Calculate the scores for each bin using the modified formula\n scores = item * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n \n # Set the scores of bins with maximum capacity to 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03381,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = diff >= 0\n \n scores[mask] = item * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (5 * item + 4) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.where(bins == max_capacity, 0, (3 * item + 2) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001))\n\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = bins < max_capacity\n \n scores[mask] = (2 * item + 1) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03421,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n scores[used_bins] = (4 * item - np.abs(diff - item) + 3) * np.exp(-np.abs(diff - item)) + np.log(item + 2) / (diff + 0.001)\n\n return scores",
"objective": 0.03441,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n mask = bins < max_capacity\n scores[mask] = (item * 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 2) / (diff[mask] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 4) / (item + 1)\n\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (3 * item + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n scores[used_bins] = (3 * item - np.abs(diff - item) + 2) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (diff[used_bins] + 1) / (item + 0.001)\n scores[diff == item] = item\n scores[diff < item] = item / (diff[diff < item]**2 + 0.001)\n\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n used_bins = bins != max_capacity\n \n diff = bins[used_bins] - item\n scores[used_bins] = (2 * item - np.abs(diff - item) + 1) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n diff = bins - item\n\n scores[mask] = item * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n\n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n \n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n scores[used_bins] = (item + 1) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n \n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (bins[used_bins] - item + 1) / (item + 0.001)\n scores[bins == item] = item\n\n return scores",
"objective": 0.03532,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_38.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = bins < max_capacity\n\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 15) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n mask = bins < max_capacity\n\n scores[mask] = (10 * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n used_bins = bins < max_capacity\n \n scores[used_bins] = (item ** 2 + np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (3 * item - np.abs(diff[used_bins] - item) + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = diff < max_capacity\n scores[used_bins] = (2 * item + np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (2 * item - np.abs(diff[used_bins] - item) + 4) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.0335,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff + 3) * np.exp(-abs_diff) + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.0336,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n\n scores[used_bins] = (5 * item - np.abs(diff - item) + 2) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n\n return scores",
"objective": 0.03371,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n # Calculate the difference between the bins' capacities and item size\n diff = bins - item\n\n # Calculate the scores for each bin using a modified formula\n scores = item * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n \n # Set the scores of bins with maximum capacity to 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03381,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = diff >= 0\n \n scores[mask] = item * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (5 * item + 4) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.where(bins == max_capacity, 0, (3 * item + 2) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001))\n\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = bins < max_capacity\n \n scores[mask] = (2 * item + 1) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03421,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n scores[used_bins] = (4 * item - np.abs(diff - item) + 3) * np.exp(-np.abs(diff - item)) + np.log(item + 2) / (diff + 0.001)\n\n return scores",
"objective": 0.03441,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n mask = bins < max_capacity\n scores[mask] = (item * 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 2) / (diff[mask] + 0.001)\n scores[diff == item] = item * (diff[diff == item] + 4) / (item + 1)\n\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n scores[used_bins] = (3 * item + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n scores[used_bins] = (3 * item - np.abs(diff - item) + 2) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n\n return scores",
"objective": 0.03471,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_39.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n scores = np.zeros_like(bins)\n \n used_bins = np.nonzero(bins < total_capacity)[0]\n unused_bins = np.nonzero(bins == total_capacity)[0]\n diff = bins - item\n \n scores[used_bins] = (item ** 2 + np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n scores[unused_bins] = (item - np.abs(diff[unused_bins])) * np.exp(-np.abs(diff[unused_bins] - item)) + np.log(item + 1) / (diff[unused_bins] + 0.001)\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 15) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n mask = bins < max_capacity\n\n scores[mask] = (10 * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n unused_bins = np.nonzero(bins == max_capacity)[0]\n scores[unused_bins] = 0\n\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 2 + np.abs(diff[mask] - item) + 1) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (4 * item - np.abs(diff[used_bins] - item) + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 3) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.0331,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (3 * item - np.abs(diff[used_bins] - item) + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n\n scores[used_bins] = (10 * item - np.abs(diff - item) + 5) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.01)\n\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (2 * item - np.abs(diff[used_bins] - item) + 4) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.0335,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff + 3) * np.exp(-abs_diff) + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.0336,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n\n scores[used_bins] = (5 * item - np.abs(diff - item) + 2) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n\n return scores",
"objective": 0.03371,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n # Calculate the difference between the bins' capacities and item size\n diff = bins - item\n\n # Calculate the scores for each bin using a modified formula\n scores = item * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.001)\n \n # Set the scores of bins with maximum capacity to 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03381,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n diff = bins - item\n mask = diff >= 0\n \n scores[mask] = item * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n \n return scores",
"objective": 0.03391,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_4.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n idx = bins != max_cap\n scores[idx] = np.minimum(1, item / bins[idx])\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = (bins / (bins - item)).clip(0, 1)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n \n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = -np.inf\n elif bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = (item - min_cap) / (item - bins[i])\n \n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.where(bins == max_cap, -np.inf, np.where(bins > item, item / bins, 0))\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins > item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n \n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n\n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = 0\n elif bins[i] == min_cap:\n scores[i] = 1\n else:\n scores[i] = 1 - ((item - bins[i])/(item - min_cap))\n\n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (bins[mask] - item)\n \n return scores",
"objective": 0.05051,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, -1, item / bins)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n full_bins = (bins == max_capacity)\n rest_capacity = bins - item\n \n scores = np.where(full_bins, 0, rest_capacity / np.maximum(rest_capacity, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n \n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = 0\n \n mask = (bins > min_capacity) & (bins < max_capacity)\n scores[mask] = (bins[mask] - item) / (bins[mask] - min_capacity)\n \n return scores",
"objective": 0.05574,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n \n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = -np.inf\n elif bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = np.exp((item - min_cap) / (item - bins[i]))\n \n return scores",
"objective": 0.05644,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin_capacity = np.max(bins)\n capacities = np.where(bins == max_bin_capacity, 0, bins - item)\n scores = np.where(capacities < item, 0, capacities)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n scores = np.zeros(num_bins)\n \n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n \n for i in range(num_bins):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (max_capacity - bins[i]) / (bins[i] - item)\n \n return scores",
"objective": 0.06681,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n min_cap = bins.min()\n scores = np.zeros_like(bins)\n \n mask = bins != max_cap\n scores[mask] = (bins[mask] - item) / (bins[mask] - min_cap)\n \n return scores",
"objective": 0.06791,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_40.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (item ** 2 + np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n unused_bins = bins == max_capacity\n scores[unused_bins] -= 1\n\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = (item ** 2 + 10) * np.exp(-np.abs(diff - item)) + np.log(item + 7) / (diff + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 15) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 15) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 20) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 3 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n mask = bins < max_capacity\n\n scores[mask] = (10 * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n \n unused_bins = np.nonzero(bins == max_capacity)[0]\n scores[unused_bins] = 0\n\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 2 + np.abs(diff[mask] - item) + 1) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (4 * item - np.abs(diff[used_bins] - item) + 5) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 3) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.0331,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (3 * item - np.abs(diff[used_bins] - item) + 2) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n unused_bins = np.nonzero(bins == max_capacity)[0]\n scores[unused_bins] = 0\n\n return scores",
"objective": 0.0333,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n used_bins = bins < max_capacity\n diff = bins[used_bins] - item\n\n scores[used_bins] = (10 * item - np.abs(diff - item) + 5) * np.exp(-np.abs(diff - item)) + np.log(item + 1) / (diff + 0.01)\n\n return scores",
"objective": 0.0334,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_41.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (item ** 2 + np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n \n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n mask = diff >= 0\n scores[mask] = ((np.exp(-np.abs(diff[mask] - item)) * item ** 2 + 3) + np.log(item + 5) / (diff[mask] + 0.001))\n scores[diff == item] = item\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = (item ** 2 + 10) * np.exp(-np.abs(diff - item)) + np.log(item + 7) / (diff + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 15) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 15) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 20) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 3 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n unused_bins = np.nonzero(bins == max_capacity)[0]\n scores[unused_bins] = 0\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 3 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 8) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n unused_bins = np.nonzero(bins == max_capacity)[0]\n scores[unused_bins] = 0\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = np.power((item + 10), 2) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 20) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 3 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n\n mask = bins < max_capacity\n\n scores[mask] = (10 * item + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 2 + np.abs(diff[mask] - item) + 1) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 1) / (diff[mask] + 0.001)\n\n return scores",
"objective": 0.033,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_42.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (5 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n scores[used_bins] = (item ** 2 + np.abs(diff[used_bins] - item) + 1) * np.exp(-np.abs(diff[used_bins] - item)) + np.log(item + 1) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n mask = diff >= 0\n scores[mask] = ((np.exp(-np.abs(diff[mask] - item)) * item ** 2 + 3) + np.log(item + 5) / (diff[mask] + 0.001))\n scores[diff == item] = item\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n scores = (item ** 2 + 10) * np.exp(-np.abs(diff - item)) + np.log(item + 7) / (diff + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 3 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item ** 2\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 15) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 20) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 3 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n unused_bins = np.nonzero(bins == max_capacity)[0]\n scores[unused_bins] = 0\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n remaining_capacity = diff[diff >= 0]\n \n scores[diff >= 0] = (item ** 3 + 5) * np.exp(-np.abs(remaining_capacity - item)) + np.log(item + 2) / (remaining_capacity + 0.001)\n scores[diff == item] = item\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 3 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 8) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n unused_bins = np.nonzero(bins == max_capacity)[0]\n scores[unused_bins] = 0\n\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = np.power((item + 10), 2) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 20) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.0326,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_43.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 2) * np.log(item + 2)\n\n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (10 * item ** 2) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (5 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 8) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 6) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 2) / (diff[mask] + 0.001)\n scores[diff == item] = item + 1\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n \n # Calculate the scores based on the size of the item and the difference from the bin capacity\n scores = (3 * item ** 2 + 5) * np.exp(-np.abs(diff - item)) + np.log(item + 3) / (diff + 0.001)\n \n # Set the scores for bins with the same capacity as the item to be twice the item size\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n mask = diff >= 0\n scores[mask] = ((np.exp(-np.abs(diff[mask] - item)) * item ** 2 + 3) + np.log(item + 5) / (diff[mask] + 0.001))\n scores[diff == item] = item\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n \n scores = (item ** 2 + 10) * np.exp(-np.abs(diff - item)) + np.log(item + 7) / (diff + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 3 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item ** 2\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 15) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 20) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03169,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_44.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 2) * np.log(item + 2)\n\n return scores",
"objective": 0.02837,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 2) * np.log(item + 2)\n\n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n # Calculating scores using a modified formula\n scores[mask] = (5 * item ** 2 + 6) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 3) * np.log(item + 3)\n\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (10 * item ** 2) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (5 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 8) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 6) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 2) / (diff[mask] + 0.001)\n scores[diff == item] = item + 1\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n \n scores = np.where(diff == item, item * 2, (3 * item ** 2 + 5) * np.exp(-np.abs(diff - item)) + np.log(item + 3) / (diff + 0.001))\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n diff = bins - item\n mask = diff >= 0\n scores[mask] = ((np.exp(-np.abs(diff[mask] - item)) * item ** 2 + 3) + np.log(item + 5) / (diff[mask] + 0.001))\n scores[diff == item] = item\n return scores",
"objective": 0.03089,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n \n scores = (item ** 2 + 10) * np.exp(-np.abs(diff - item)) + np.log(item + 7) / (diff + 0.001)\n scores[diff == item] = item\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (item ** 3 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03119,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_45.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 2) * np.log(item + 2)\n\n return scores",
"objective": 0.02837,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 2) * np.log(item + 2)\n\n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 8) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 5\n\n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n # Calculating scores using a modified formula\n scores[mask] = (5 * item ** 2 + 6) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 3) * np.log(item + 3)\n\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (6 * item ** 2 + 11) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02878,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (10 * item ** 2) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (5 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 8) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 6) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 2) / (diff[mask] + 0.001)\n scores[diff == item] = item + 1\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n \n scores = np.where(diff == item, item * 2, (3 * item ** 2 + 5) * np.exp(-np.abs(diff - item)) + np.log(item + 3) / (diff + 0.001))\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the difference between the bins and the item size\n diff = bins - item\n \n # Calculate the scores for each bin based on the new formula\n scores = (np.exp(-np.abs(diff - item)) * item ** 2) + (3 * np.heaviside(diff, 0)) + np.log(item + 5) / (diff + 0.001)\n \n # Set the scores of bins with the same capacity as item to item\n scores[diff == item] = item\n \n return scores",
"objective": 0.03079,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_46.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 2) * np.log(item + 2)\n\n return scores",
"objective": 0.02837,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 2) * np.log(item + 2)\n\n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 8) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 5\n\n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02878,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (10 * item ** 2) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 8) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (2 * item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 6) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 2) / (diff[mask] + 0.001)\n scores[diff == item] = item + 1\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n \n scores = np.where(diff == item, item * 2, (3 * item ** 2 + 5) * np.exp(-np.abs(diff - item)) + np.log(item + 3) / (diff + 0.001))\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03069,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_47.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 5) / (diff[used_bins] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 8) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02837,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = (item + 2) * np.log(item + 2)\n\n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 8) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 5\n\n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02878,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (10 * item ** 2) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (2 * item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 6) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 2) / (diff[mask] + 0.001)\n scores[diff == item] = item + 1\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n \n scores = np.where(diff == item, item * 2, (3 * item ** 2 + 5) * np.exp(-np.abs(diff - item)) + np.log(item + 3) / (diff + 0.001))\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (item ** 2 + 3) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item\n\n return scores",
"objective": 0.03059,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_48.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 5) / (diff[used_bins] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + item) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n \n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n # Modify the scoring formula here\n scores[mask] = (5 * item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.power(item, 2) + np.cos(item)\n\n return scores",
"objective": 0.02827,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 8) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02837,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (5 * item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item) + np.cos(item)\n scores[diff == item] = item + 4\n\n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 8) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 5\n\n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02878,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (10 * item ** 2) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (2 * item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 6) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 2) / (diff[mask] + 0.001)\n scores[diff == item] = item + 1\n\n return scores",
"objective": 0.02968,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (6 * item ** 2 + 12) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001) + np.power(item, 3) + np.sin(item)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02978,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_49.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n num_bins = len(bins)\n scores = np.zeros_like(bins)\n\n remaining_capacity = bins - item\n\n # Assign maximum score to bins with remaining capacity equal to the maximum capacity\n scores[remaining_capacity == max_capacity] = item + 5\n\n # Assign scores to bins with remaining capacity greater than zero\n mask = remaining_capacity > 0\n diff = remaining_capacity[mask] - item\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff - item)) + np.log(item + 8) / (diff + 0.001) + np.sqrt(item)\n\n # Assign scores to bins with remaining capacity less than the item size\n mask = remaining_capacity < item\n scores[mask] = item / (remaining_capacity[mask]**2 + 0.001)\n\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 5) / (diff[used_bins] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (5 * item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001) + np.sqrt(item) + (diff[mask] / (item + 0.001))\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (5 * item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001) + np.sqrt(item) + (diff[mask] / (item + 0.001))\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n\n diff = bins - item\n mask = diff >= 0\n\n scores = np.zeros_like(bins)\n scores[mask] = (7 * item ** 2 + 14) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001) + np.sqrt(item) + (diff[mask] / (item + 0.001))\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + item) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n \n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n # Modify the scoring formula here\n scores[mask] = (5 * item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.power(item, 2) + np.cos(item)\n\n return scores",
"objective": 0.02827,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 8) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02837,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (5 * item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item) + np.cos(item)\n scores[diff == item] = item + 4\n\n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 8) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 5\n\n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02878,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (2 * item ** 2 + 4) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n diff = bins - item\n mask = diff >= 0\n\n scores = np.zeros_like(bins)\n\n scores[mask] = (10 * item ** 2) / np.exp(np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (3 * item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 3) / (diff[mask] + 0.001)\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.02928,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_5.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n non_zero_capacity = bins[bins != 0]\n \n if item >= max_capacity:\n scores[np.argmax(bins)] = 0\n else:\n scores[bins == max_capacity] = 0\n scores[bins != max_capacity] = 1 / np.maximum((bins[bins != max_capacity] - item), 1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n idx = bins != max_cap\n scores[idx] = np.minimum(1, item / bins[idx])\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = (bins / (bins - item)).clip(0, 1)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(len(bins))\n \n for i, bin_size in enumerate(bins):\n if bin_size == max_cap:\n scores[i] = -np.inf\n elif bin_size == min_cap:\n scores[i] = 0\n else:\n scores[i] = (item - min_cap) / (item - bin_size)\n \n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == max_cap] = 0.0 # Added line to exclude bins with maximum capacity\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.where(bins == max_cap, -np.inf, np.where(bins > item, item / bins, 0))\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins > item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n \n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n\n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = 0\n elif bins[i] == min_cap:\n scores[i] = 1\n else:\n scores[i] = 1 - ((item - bins[i])/(item - min_cap))\n\n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (bins[mask] - item)\n \n return scores",
"objective": 0.05051,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, -1, item / bins)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n full_bins = (bins == max_capacity)\n rest_capacity = bins - item\n \n scores = np.where(full_bins, 0, rest_capacity / np.maximum(rest_capacity, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n min_capacity = np.min(bins)\n \n scores[bins == max_capacity] = 0\n \n mask = (bins > min_capacity) & (bins < max_capacity)\n scores[mask] = (bins[mask] - item) / (bins[mask] - min_capacity)\n \n return scores",
"objective": 0.05574,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n\n for i in range(num_bins):\n if bins[i] == max_cap:\n scores[i] = -np.inf\n elif bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = np.exp((item - min_cap) / (item - bins[i]))\n\n return scores",
"objective": 0.05644,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin_capacity = np.max(bins)\n capacities = np.where(bins == max_bin_capacity, 0, bins - item)\n scores = np.where(capacities < item, 0, capacities)\n return scores",
"objective": 0.05795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_50.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.power(item, 2) / (diff[used_bins] + 0.001) + np.sqrt(item) + (diff[used_bins] / (item + 0.001))\n\n return scores",
"objective": 0.01248,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n remaining_capacity = bins - item\n\n # Assign maximum score to bins with remaining capacity equal to the maximum capacity\n scores[remaining_capacity == max_capacity] = item + 5\n\n # Assign scores to bins with remaining capacity greater than zero\n mask = remaining_capacity > 0\n diff = remaining_capacity[mask] - item\n scores[mask] = 2 * (item ** 2 + 5) * np.exp(-np.abs(diff - item)) + np.log(item + 7) / (diff + 0.001) + np.sqrt(item) + (diff / (item + 0.001))\n\n # Assign scores to bins with remaining capacity less than the item size\n mask = remaining_capacity < item\n scores[mask] = item / (remaining_capacity[mask]**2 + 0.001)\n\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n remaining_capacity = bins - item\n\n scores[remaining_capacity == max_capacity] = item + 5\n\n mask = remaining_capacity > 0\n diff = remaining_capacity[mask] - item\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff - item)) + np.log(item + 8) / (diff + 0.001) + np.sqrt(item)\n\n mask = remaining_capacity < item\n scores[mask] = item / (remaining_capacity[mask]**2 + 0.001)\n\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n diff = bins - item\n \n scores[diff == item] = item + 2\n scores[(diff > item) & (diff < max_capacity)] = np.power(item, 2) + np.log(item + 5) / (diff[(diff > item) & (diff < max_capacity)] + 0.001) + np.sqrt(item)\n scores[diff < item] = item / (diff[diff < item] ** 2 + 0.001)\n \n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 10) / (diff[used_bins] + 0.001) + np.sqrt(item) * np.cos(item)\n\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = 2 * (item ** 2 + 5) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001) + np.sqrt(item) + (diff[mask] / (item + 0.001))\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 2) / (diff[used_bins] + 0.001)\n\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 5) / (diff[used_bins] + 0.001) + np.sqrt(item)\n\n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n used_bins = diff < max_capacity\n\n abs_diff = np.abs(diff[used_bins] - item)\n scores[used_bins] = (item - abs_diff)**2 + np.log(item + 5) / (diff[used_bins] + 0.001) + np.power(item, 2) + np.cos(item)\n\n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (5 * item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001) + np.sqrt(item) + (diff[mask] / (item + 0.001))\n scores[diff == item] = item * 2\n\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (5 * item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 7) / (diff[mask] + 0.001) + np.sqrt(item) + (diff[mask] / (item + 0.001))\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n\n diff = bins - item\n mask = diff >= 0\n\n scores = np.zeros_like(bins)\n scores[mask] = (7 * item ** 2 + 14) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 10) / (diff[mask] + 0.001) + np.sqrt(item) + (diff[mask] / (item + 0.001))\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + item) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n \n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores = np.zeros_like(bins)\n scores[mask] = np.floor((7 * item ** 2 + 14) * np.exp(-np.abs(diff[mask] - item))) + np.log(item + 10) // (diff[mask] + 0.001) + np.sqrt(item) + (diff[mask] / (item + 0.001))\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n scores[remaining_capacity > 0] = (remaining_capacity[remaining_capacity > 0] + 1) / (item + 0.001)\n scores[remaining_capacity == item] = item\n scores[remaining_capacity < item] = item / (remaining_capacity[remaining_capacity < item]**2 + 0.001)\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 7) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 5) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n # Modify the scoring formula here\n scores[mask] = (5 * item ** 2 + 10) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.power(item, 2) + np.cos(item)\n\n return scores",
"objective": 0.02827,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (4 * item ** 2 + 8) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 6) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 2\n\n return scores",
"objective": 0.02837,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n diff = bins - item\n mask = diff >= 0\n\n scores[mask] = (3 * item ** 2 + 12) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 4) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 3\n\n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n diff = bins - item\n scores = np.zeros_like(bins)\n\n mask = diff >= 0\n scores[mask] = (4 * item ** 2 + 9) * np.exp(-np.abs(diff[mask] - item)) + np.log(item + 8) / (diff[mask] + 0.001) + np.sqrt(item)\n scores[diff == item] = item + 5\n\n return scores",
"objective": 0.02857,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_6.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n min_capacity = np.min(bins)\n \n feasible_bins = np.where(bins > item)[0]\n if len(feasible_bins) > 0:\n scores[feasible_bins] = 1 - (item / min_capacity) * bins[feasible_bins]\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n if item >= max_capacity:\n scores[np.argmax(bins)] = 0\n else:\n scores[bins == max_capacity] = 0\n scores[bins != max_capacity] = 1 / np.maximum((bins[bins != max_capacity] - item), 1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n idx = bins != max_cap\n scores[idx] = np.minimum(1, item / bins[idx])\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(len(bins))\n \n for i, bin_size in enumerate(bins):\n if bin_size == max_cap:\n scores[i] = -np.inf\n elif bin_size == min_cap:\n scores[i] = 0\n else:\n scores[i] = (item - min_cap) / (item - bin_size)\n \n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n max_cap_bins = np.where(bins == max_cap)[0]\n\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[max_cap_bins] = 0.0\n\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.04729,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.where(bins == max_cap, -np.inf, np.where(bins > item, item / bins, 0))\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins > item)[0]\n min_capacity = np.min(bins[feasible_bins])\n \n if len(feasible_bins) > 0:\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n \n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n\n for i in range(num_bins):\n if bins[i] == max_cap or bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = 1 - ((item - bins[i])/(item - min_cap))\n\n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (bins[mask] - item)\n \n return scores",
"objective": 0.05051,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, -1, item / bins)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n full_bins = (bins == max_capacity)\n rest_capacity = bins - item\n \n scores = np.where(full_bins, 0, rest_capacity / np.maximum(rest_capacity, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros_like(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_cap or bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = max_cap - bins[i] + (bins[i] == max_cap) * item\n\n return scores",
"objective": 0.05433,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_7.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n full_bins = (bins == max_capacity)\n rest_capacity = bins - item\n \n scores = np.zeros_like(bins)\n scores[~full_bins] = item / np.maximum(rest_capacity[~full_bins], 1)\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n if item >= max_capacity:\n scores[np.argmax(bins)] = 0\n else:\n scores[bins != max_capacity] = 1 / np.maximum((bins[bins != max_capacity] - item), 1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = item / rest_capacity[rest_capacity > 0]\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04719,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n \n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.04729,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n scores[(bins - item) <= 0] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins > item)[0]\n min_capacity = np.min(bins[feasible_bins])\n \n if len(feasible_bins) > 0:\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n \n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n\n for i in range(num_bins):\n if bins[i] == max_cap or bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = 1 - ((item - bins[i])/(item - min_cap))\n\n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (bins[mask] - item)\n\n return scores",
"objective": 0.05051,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, -1, item / bins)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n full_bins = (bins == max_capacity)\n rest_capacity = bins - item\n \n scores = np.where(full_bins, 0, rest_capacity / np.maximum(rest_capacity, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_8.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n full_bins = (bins == max_capacity)\n rest_capacity = bins - item\n \n scores = np.zeros_like(bins)\n scores[~full_bins] = item / np.maximum(rest_capacity[~full_bins], 1)\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins != max_capacity] = 1 / np.maximum((bins[bins != max_capacity] - item), 1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n \n scores = np.where(bins == max_capacity, 0, item / np.maximum(rest_capacity, 1))\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n rest_capacity = bins - item\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = item / rest_capacity[rest_capacity > 0]\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.04719,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = (max_cap - bins[mask] + 1) / (bins[mask] - item + 1)\n \n scores[bins == max_cap] = 0\n \n return scores",
"objective": 0.04729,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n scores[bins <= item] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins > item)[0]\n min_capacity = np.min(bins[feasible_bins])\n \n if len(feasible_bins) > 0:\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n\n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.zeros(num_bins)\n\n for i in range(num_bins):\n if bins[i] == max_cap or bins[i] == min_cap:\n scores[i] = 0\n else:\n scores[i] = 1 - ((item - bins[i])/(item - min_cap))\n\n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (bins[mask] - item)\n\n return scores",
"objective": 0.05051,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, -1, item / bins)\n return scores",
"objective": 0.05071,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run2/population_generation_9.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n full_bins = (bins == max_capacity)\n rest_capacity = bins - item\n \n scores = np.zeros_like(bins)\n scores[~full_bins] = item / np.maximum(rest_capacity[~full_bins], 1)\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n \n scores[bins != max_capacity] = 1 / np.maximum((bins[bins != max_capacity] - item), 1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n\n scores = np.where(bins == max_capacity, 0, item / np.maximum(rest_capacity, 1))\n\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\ndef score(item, bins):\n scores = np.maximum(0, item - bins) / bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = bins[mask] / np.maximum(1, bins[mask] - item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_cap\n scores[mask] = np.minimum(1, item / (bins[mask] - item))\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = 1 / (bins[mask] - item)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n scores = np.where(bins == max_cap, -np.inf, scores)\n scores = np.where(bins == min_cap, 0, scores)\n scores = np.where((bins > min_cap) & (bins < max_cap), (item - min_cap) / (item - bins), scores)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == max_cap] = 0\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = item / (bins[mask] - item)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.04719,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = bins.max()\n scores = np.zeros_like(bins)\n \n mask = bins > item\n scores[mask] = (max_cap - bins[mask] + 1) / (bins[mask] - item + 1)\n \n scores[bins == max_cap] = 0\n \n return scores",
"objective": 0.04729,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, item / bins)\n scores[bins <= item] = 0\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins > item)[0]\n min_capacity = np.min(bins[feasible_bins])\n \n if len(feasible_bins) > 0:\n scores[feasible_bins] = (bins[feasible_bins] - item) / bins[feasible_bins]\n scores[bins == min_capacity] = -1\n\n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_cap = np.max(bins)\n min_cap = np.min(bins)\n\n scores = np.zeros(num_bins)\n mask = (bins != max_cap) & (bins != min_cap)\n scores[mask] = 1 - ((item - bins[mask]) / (item - min_cap))\n\n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (bins[mask] - item)\n\n return scores",
"objective": 0.05051,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_1.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_bin = bins.max()\n scores[bins < max_bin] = bins[bins < max_bin] / (bins[bins < max_bin] - item + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -bins/item + (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n valid_bins = np.where(bins != max_capacity)[0]\n valid_bin_capacities = bins[valid_bins]\n\n scores[valid_bins] = valid_bin_capacities / np.maximum((valid_bin_capacities - item), 1)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n scores[bins == item] = -1\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_capacity = np.max(bins)\n weight = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / max_capacity)\n scores = (normalized_capacity * weight) + (bins == max_capacity) * item\n return scores",
"objective": 0.07637,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item - np.arange(len(bins))\n return scores",
"objective": 0.10102,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n bin_indices = np.arange(num_bins)\n bin_capacities = bins / np.max(bins)\n scores = bin_capacities * (bin_indices + 1)\n scores = np.where(bins == np.max(bins), 0, scores)\n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = bins + item - max_capacity\n scores[bins == max_capacity] = -1\n return scores",
"objective": 0.32971,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_10.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins >= item] = (item / bins[bins >= item]) - (max_score == bins)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy() # create a copy of bins\n capacities[capacities == capacities.max()] = 0 # Ignore bins with maximum capacity\n\n scores = np.zeros_like(bins) \n scores[capacities >= item] = -capacities[capacities >= item]/item + 1\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n indices = np.where(bins >= item)\n scores[indices] = -bins[indices]/item + (bins[indices] == bins[indices].max())\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = bins[mask] / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / item\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item - 2 * np.arange(len(bins))).astype(float)\n scores[bins == max_capacity] = -2 * np.arange(len(bins))[bins == max_capacity]\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - item) / (max_capacity - bins[mask])\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = (bins > item) & (bins != bins.max())\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask1 = bins < max_capacity\n mask2 = bins >= item\n \n scores[mask1] = bins[mask1] / (bins[mask1] - item + 1)\n scores[bins == item] = -1\n scores[bins == max_capacity] = -2\n scores[~(mask1 | mask2)] = -3\n \n return scores",
"objective": 0.04689,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_11.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins >= item] = (item / bins[bins >= item]) - (max_score == bins)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy() # create a copy of bins\n capacities[capacities == capacities.max()] = 0 # Ignore bins with maximum capacity\n\n scores = np.zeros_like(bins) \n scores[capacities >= item] = -capacities[capacities >= item]/item + 1\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n indices = np.where(bins >= item)\n scores[indices] = -bins[indices]/item + (bins[indices] == bins[indices].max())\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = bins[mask] / np.maximum((bins[mask] - item), 1)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / item\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(1, np.maximum(bins - item, 1), where=bins != bins.max()) * (bins != bins.max())\n return scores",
"objective": 0.04347,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item - 2 * np.arange(len(bins))).astype(float)\n scores[bins == max_capacity] = -2 * np.arange(len(bins))[bins == max_capacity]\n return scores",
"objective": 0.04507,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_12.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = np.array(bins, copy=True)\n capacities[capacities == capacities.max()] = 0\n\n scores = np.zeros_like(bins)\n valid_bins = capacities >= item\n scores[valid_bins] = -capacities[valid_bins]/item + 1\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins >= item\n scores[mask] = -bins[mask] / item + (bins[mask] == np.max(bins[mask]))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = bins[mask] / np.maximum((bins[mask] - item), 1)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / item\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(1, np.maximum(bins - item, 1), where=bins != bins.max()) * (bins != bins.max())\n return scores",
"objective": 0.04347,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_13.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = np.array(bins, copy=True)\n capacities[capacities == capacities.max()] = 0\n\n scores = np.zeros_like(bins)\n valid_bins = capacities >= item\n scores[valid_bins] = -capacities[valid_bins]/item + 1\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = -(bins - item) / item + (bins == max_capacity)\n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins >= item\n scores[mask] = -bins[mask] / item + (bins[mask] == np.max(bins[mask]))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = bins[mask] / np.maximum((bins[mask] - item), 1)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / item\n return scores",
"objective": 0.04286,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_14.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = np.array(bins, copy=True)\n capacities[capacities == capacities.max()] = 0\n\n scores = np.zeros_like(bins)\n valid_bins = capacities >= item\n scores[valid_bins] = -capacities[valid_bins]/item + 1\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = -(bins - item) / item + (bins == max_capacity)\n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = (bins[mask] - item) / item\n scores[~mask] = (max_capacity - bins[~mask] + item) / item\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins >= item\n scores[mask] = -bins[mask] / item + (bins[mask] == np.max(bins[mask]))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_15.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n valid_bins = bins >= item\n scores[valid_bins] = (item - bins[valid_bins]) / item + 1\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] / item\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n \n mask = bins < max_capacity\n scores[mask] = 1 - bins[mask] / (item + 1)\n \n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = -(bins - item) / item + (bins == max_capacity)\n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = (bins[mask] - item) / item\n scores[~mask] = (max_capacity - bins[~mask] + item) / item\n return scores",
"objective": 0.04196,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_16.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, np.exp(-bins/item))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n valid_bins = bins >= item\n scores[valid_bins] = (item - bins[valid_bins]) / item + 1\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n \n mask = bins < max_capacity\n scores[mask] = 1 - bins[mask] / (item + 1)\n \n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = -(bins - item) / item + (bins == max_capacity)\n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = (bins[mask] - item) / item\n scores[~mask] = (max_capacity - bins[~mask] + item) / item\n return scores",
"objective": 0.04196,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_17.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = -(bins[bins != max_capacity] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n \n mask = bins < max_capacity\n scores[mask] = 1 - bins[mask] / (item + 1)\n \n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = -(bins - item) / item + (bins == max_capacity)\n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = (bins[mask] - item) / item\n scores[~mask] = (max_capacity - bins[~mask] + item) / item\n return scores",
"objective": 0.04196,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_18.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = -(bins[bins != max_capacity] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n \n mask = bins < max_capacity\n scores[mask] = 1 - bins[mask] / (item + 1)\n \n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = -(bins - item) / item + (bins == max_capacity)\n return scores",
"objective": 0.04175,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_19.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = -(bins[bins != max_capacity] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n \n mask = bins < max_capacity\n scores[mask] = 1 - bins[mask] / (item + 1)\n \n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = -(bins - item) / item + (bins == max_capacity)\n return scores",
"objective": 0.04175,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_2.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_bin\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -bins/item + (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n valid_bins = np.where(bins != max_capacity)[0]\n valid_bin_capacities = bins[valid_bins]\n\n scores[valid_bins] = valid_bin_capacities / np.maximum((valid_bin_capacities - item), 1)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n scores[bins == item] = -1\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n \n scores[rest_capacity == 0] = -99999999\n scores[rest_capacity != 0] = rest_capacity[rest_capacity != 0] / max_capacity\n \n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n max_capacity = np.max(bins)\n weight = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / max_capacity)\n scores = (normalized_capacity * weight) + (bins == max_capacity) * item\n return scores",
"objective": 0.07637,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item - np.arange(len(bins))\n return scores",
"objective": 0.10102,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n bin_indices = np.arange(num_bins)\n bin_capacities = bins / np.max(bins)\n scores = bin_capacities * (bin_indices + 1)\n scores = np.where(bins == np.max(bins), 0, scores)\n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 - item / bins\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_20.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = -(bins[bins != max_capacity] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] + 1)\n \n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = -(bins - item) / item + (bins == max_capacity)\n return scores",
"objective": 0.04175,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_21.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n mask = bins == np.max(bins)\n scores = np.where(mask, 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = -(bins[bins != max_capacity] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] /item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] + 1)\n \n return scores",
"objective": 0.04145,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_22.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n mask = bins == np.max(bins)\n scores = np.where(mask, 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = -(bins[bins != max_capacity] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_23.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n mask = bins == np.max(bins)\n scores = np.where(mask, 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = -(bins[bins != max_capacity] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_24.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item / (bins[bins == max_capacity] + 1)\n scores[bins < max_capacity] = 1 - bins[bins < max_capacity] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n mask = bins == np.max(bins)\n scores = np.where(mask, 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = max_capacity // (bins[~mask] - item + 1)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n idx = (bins != max_capacity)\n scores[idx] = -(bins[idx] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_25.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n mask = bins == np.max(bins)\n scores = np.where(mask, 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = max_capacity // (bins[~mask] - item + 1)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = -(bins[mask] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_26.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n mask = bins == np.max(bins)\n scores = np.where(mask, 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = -(bins[mask] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_27.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = (bins == max_capacity)\n scores = np.where(mask, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = -(bins[mask] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (item - bins[mask]) / item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04135,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_28.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = (bins == max_capacity)\n scores = np.where(mask, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n \n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = ((max_capacity - bins[mask]) ** 2) / (item ** 2)\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = -(bins[mask] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (item - bins[mask]) / item\n return scores",
"objective": 0.04125,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_29.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n # Calculate the scores for bins using a modified formula\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + (bins[mask] - item)**2)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + bins[mask] - item)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 2) / (item ** 2)\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = -(bins[mask] - item) / item + 1\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_3.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_bin\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -bins/item + (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.empty_like(bins)\n scores[mask] = 0\n scores[~mask] = bins[~mask] / np.maximum(bins[~mask] - item, 1)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -2 * i\n else:\n scores[i] = bins[i] - item - 2 * i\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = bins[~mask] / (bins[~mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n scores[bins == item] = -1\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores[mask] = 0\n scores[~mask] = (bins[~mask] - item) / np.maximum(bins[~mask] - item, 1)\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores[mask] = 0\n scores[~mask] = item / (bins[~mask] - item) - (2 * np.arange(len(bins)))[~mask]\n return scores",
"objective": 0.05242,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n else:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n bin_indices = np.arange(num_bins)\n normalized_bin_capacities = 1 - bins / np.max(bins)\n scores = normalized_bin_capacities * (bin_indices + 1) + item\n scores = np.where(bins == np.max(bins), 0, scores)\n return scores",
"objective": 0.05826,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n \n scores[bins == np.max(bins)] = 0 # assign 0 score to bin with maximum capacity\n \n return scores",
"objective": 0.06429,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_30.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n # Calculate the scores for bins using a modified formula\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + (bins[mask] - item)**2)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (3 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 2)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (2 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 2) / (item ** 2)\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_31.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the scores for bins\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + (bins[mask] - item)**2)\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n # Calculate the scores for bins using a modified formula\n scores[mask] = (2 * (max_capacity - bins[mask]) * (bins[mask] >= item)) / (1 + (bins[mask] - item)**2)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (3 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 2)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (2 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 2) / (item ** 2)\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / (bins[mask] - item + 1)\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_32.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the scores for bins\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + (bins[mask] - item)**2)\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (max_capacity - bins[mask]) * (bins[mask] >= item) / (1 + (bins[mask] - item) ** 2)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (3 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 2)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (2 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 2) / (item ** 2)\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n # Calculate the score based on the modified formula\n scores[mask] = ((max_capacity - bins[mask]) ** 3) / (item ** 3)\n \n return scores",
"objective": 0.04075,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_33.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n # Calculate the scores for bins\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + (bins[mask] - item)**2)\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (max_capacity - bins[mask]) * (bins[mask] >= item) / (1 + (bins[mask] - item) ** 2)\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (3 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 2)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (2 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 2) / (item ** 2)\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = ((max_capacity - bins[mask]) ** 3) / (item ** 3)\n \n return scores",
"objective": 0.04075,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_34.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (max_capacity - bins[mask]) * (bins[mask] >= item) / (1 + (bins[mask] - item) ** 2)\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n \n scores[mask] = (3 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 2)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (2 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 1)\n\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 2) / (item ** 2)\n return scores",
"objective": 0.04065,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_35.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (max_capacity - bins[mask]) * (bins[mask] >= item) / (1 + (bins[mask] - item) ** 2)\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask] + 1) * (bins[mask] >= item)) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask])) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (4 * (max_capacity - bins[mask])) / item\n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_36.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (max_capacity - bins[mask]) * (bins[mask] >= item) / (1 + (bins[mask] - item) ** 2)\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = ((max_capacity - bins[mask]) * (bins[mask] >= item)) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) * (bins[mask] >= item) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins) / item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.where(mask, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = 2 * (max_capacity - bins[mask]) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_37.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (max_capacity - bins[mask]) * (bins[mask] >= item) / (1 + (bins[mask] - item) ** 2)\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = ((max_capacity - bins[mask]) * (bins[mask] >= item)) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) * (bins[mask] >= item) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = 2 * (max_capacity - bins[mask]) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_38.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) * (bins[mask] >= item) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (np.sqrt(max_capacity - bins[mask]) / (1 + (bins[mask] - item) ** 2))\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_39.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) * (bins[mask] >= item) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = (np.sqrt(max_capacity - bins[mask]) / (1 + (bins[mask] - item) ** 2))\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_4.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_bin\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -bins/item + (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins >= item] = (item / bins[bins >= item]) - (max_score == bins)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins >= item] = -bins[bins >= item] / item + (bins[bins >= item] == max_capacity)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.empty_like(bins)\n scores[mask] = 0\n scores[~mask] = bins[~mask] / np.maximum(bins[~mask] - item, 1)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item - 2 * np.arange(len(bins))).astype(float)\n scores[bins == max_capacity] = -2 * np.arange(len(bins))[bins == max_capacity]\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n \n scores[~mask] = (max_capacity - item) / (max_capacity - bins[~mask])\n scores[bins == max_capacity] = -1\n \n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = bins[~mask] / (bins[~mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n scores[bins == item] = -1\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == np.max(bins), 0, (bins - item) / np.maximum(bins - item, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores[~mask] = item / (bins[~mask] - item) - (2 * np.arange(len(bins)))[~mask]\n return scores",
"objective": 0.05242,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum((bins - item) / np.maximum(bins - item, 1), 0)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n bin_indices = np.arange(num_bins)\n normalized_bin_capacities = 1 - bins / np.max(bins)\n scores = normalized_bin_capacities * (bin_indices + 1) + item\n scores = np.where(bins == np.max(bins), 0, scores)\n return scores",
"objective": 0.05826,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_40.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = np.exp(-(bins[mask] - item) ** 2) * (max_capacity - bins[mask])\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_41.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = np.exp(-(bins[mask] - item) ** 2) * (max_capacity - bins[mask])\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, max_capacity - bins + 1)\n return scores",
"objective": 0.04025,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_42.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = np.exp(-(bins[mask] - item) ** 2) * (max_capacity - bins[mask])\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_43.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = np.exp(-(bins[mask] - item) ** 2) * (max_capacity - bins[mask])\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_44.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = np.exp(-(bins[mask] - item) ** 2) * (max_capacity - bins[mask])\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_45.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item)) + np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / np.exp(bins[mask] - item)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = np.exp(-(bins[mask] - item) ** 2) * (max_capacity - bins[mask])\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = ((max_capacity - bins[mask]) ** 4) / (item ** 4)\n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_46.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item)) + np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = max_capacity / np.power(bins[mask] - item + 1, 2)\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / np.exp(bins[mask] - item)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / (bins[mask] + 1)\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = np.exp(-(bins[mask] - item)**2) * (max_capacity - bins[mask])\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_47.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item)) + np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = max_capacity / np.power(bins[mask] - item + 1, 2)\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / np.exp(bins[mask] - item)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (3 * (max_capacity - bins[mask]) - item + 1) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / bins[mask]\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = np.exp(-(bins[mask] - item)**2) * (max_capacity - bins[mask])\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_48.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item)) + np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = max_capacity / np.power(bins[mask] - item + 1, 2)\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / np.exp(bins[mask] - item)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.square(bins[mask] - item))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) + item) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / bins[mask]\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n\n scores[mask] = np.exp(-(bins[mask] - item)**2) * (max_capacity - bins[mask])\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_49.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item)) + np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = max_capacity / ((bins[mask] - item + 1)**2)\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / np.exp(bins[mask] - item)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item) ** 2 + 1)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = ((2 * max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)) * (bins[mask] - item < max_capacity)\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * (max_capacity - bins[mask]) + item) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / bins[mask]\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = np.exp(-(bins[mask] - item)**2) * (max_capacity - bins[mask])\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (np.abs(bins[mask] - item) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_5.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = 0\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_bin\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -bins/item + (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins >= item] = (item / bins[bins >= item]) - (max_score == bins)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins >= item] = -bins[bins >= item] / item + (bins[bins >= item] == max_capacity)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = (bins[~mask] / np.maximum(bins[~mask] - item, 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item - 2 * np.arange(len(bins))).astype(float)\n scores[bins == max_capacity] = -2 * np.arange(len(bins))[bins == max_capacity]\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins == max_capacity] = -1\n scores[bins != max_capacity] = (max_capacity - item) / (max_capacity - bins[bins != max_capacity])\n \n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n \n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n scores[bins == item] = -1\n \n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = bins[~mask] / (bins[~mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n scores[bins == item] = -1\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == np.max(bins), 0, (bins - item) / np.maximum(bins - item, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores[~mask] = item / (bins[~mask] - item) - (2 * np.arange(len(bins)))[~mask]\n return scores",
"objective": 0.05242,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum((bins - item) / np.maximum(bins - item, 1), 0)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_50.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item)) + np.maximum(bins[mask] - item, 1)\n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / (1 + np.exp(bins[mask] - item))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = max_capacity / ((bins[mask] - item + 1)**2)\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, -(bins - item) / item + 1)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / np.exp(bins[mask] - item)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item) ** 2 + 1)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (2 * max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_capacity\n scores[mask] = (max_capacity - bins[mask]) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = (max_capacity - bins[mask] + 1) / ((bins[mask] - item + 1) ** 2 + 1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item / (bins + 1), (max_capacity - bins + 1) / item)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, item, (max_capacity - bins + 1) * 2)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (2 * (max_capacity - bins[mask]) + item) / (10 * (bins[mask] - item + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[mask] = item / bins[mask]\n scores[~mask] = 1 - bins[~mask] / item\n scores[bins == item] = 1.5\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins // (bins - item + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins != max_capacity\n scores[mask] = np.exp(-(bins[mask] - item)**2) * (max_capacity - bins[mask])\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (2 * max_capacity - bins[mask]) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.where(bins == max_capacity, 0, max_capacity // (bins - item + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins != max_capacity\n scores = np.where(mask, (3 * (max_capacity - bins) - item + 1) / (10 * (bins - item + 1)), 0)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n scores = np.zeros_like(bins)\n scores[mask] = (max_capacity - item + 1) / (bins[mask] - item + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_6.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins < max_bin\n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -bins/item + (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins >= item] = (item / bins[bins >= item]) - (max_score == bins)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n indices = np.where(bins >= item)\n scores[indices] = -bins[indices]/item + (bins[indices] == bins[indices].max())\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = (bins[~mask] / np.maximum(bins[~mask] - item, 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item - 2 * np.arange(len(bins))).astype(float)\n scores[bins == max_capacity] = -2 * np.arange(len(bins))[bins == max_capacity]\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (max_capacity - item) / (max_capacity - bins[mask])\n\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n \n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n scores[bins == item] = -1\n \n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = bins[~mask] / (bins[~mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n scores[bins == item] = -1\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == np.max(bins), 0, (bins - item) / np.maximum(bins - item, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores[~mask] = item / (bins[~mask] - item) - (2 * np.arange(len(bins)))[~mask]\n return scores",
"objective": 0.05242,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum((bins - item) / np.maximum(bins - item, 1), 0)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_7.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -bins/item + (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins >= item] = (item / bins[bins >= item]) - (max_score == bins)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n indices = np.where(bins >= item)\n scores[indices] = -bins[indices]/item + (bins[indices] == bins[indices].max())\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = (bins[~mask] / np.maximum(bins[~mask] - item, 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n for i in range(len(bins)):\n rest_capacity = bins[i]\n \n if rest_capacity == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (max_capacity - rest_capacity) / item\n \n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item - 2 * np.arange(len(bins))).astype(float)\n scores[bins == max_capacity] = -2 * np.arange(len(bins))[bins == max_capacity]\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (max_capacity - item) / (max_capacity - bins[mask])\n\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins < max_capacity\n \n scores[mask] = bins[mask] / (bins[mask] - item + 1)\n scores[bins == item] = -1\n \n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = bins[~mask] / (bins[~mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, -1, item / bins)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == np.max(bins), 0, (bins - item) / np.maximum(bins - item, 1))\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores[~mask] = item / (bins[~mask] - item) - (2 * np.arange(len(bins)))[~mask]\n return scores",
"objective": 0.05242,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum((bins - item) / np.maximum(bins - item, 1), 0)\n return scores",
"objective": 0.05383,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_8.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item\n scores[bins != max_capacity] = max_capacity - bins[bins != max_capacity] + 1\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -bins/item + (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins >= item] = (item / bins[bins >= item]) - (max_score == bins)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy() # create a copy of bins\n capacities[capacities == capacities.max()] = 0 # Ignore bins with maximum capacity\n\n scores = np.zeros_like(bins) \n scores[capacities >= item] = -capacities[capacities >= item]/item + 1\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n indices = np.where(bins >= item)\n scores[indices] = -bins[indices]/item + (bins[indices] == bins[indices].max())\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = (bins[~mask] / np.maximum(bins[~mask] - item, 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[~mask] = (max_capacity - bins[~mask]) / item\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item - 2 * np.arange(len(bins))).astype(float)\n scores[bins == max_capacity] = -2 * np.arange(len(bins))[bins == max_capacity]\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (max_capacity - item) / (max_capacity - bins[mask])\n\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = (bins > item) & (bins < max_capacity)\n scores = np.zeros_like(bins)\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask1 = bins < max_capacity\n mask2 = bins >= item\n \n scores[mask1] = bins[mask1] / (bins[mask1] - item + 1)\n scores[bins == item] = -1\n scores[bins == max_capacity] = -2\n scores[~(mask1 | mask2)] = -3\n \n return scores",
"objective": 0.04689,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores\n scores = np.zeros_like(bins)\n mask = bins > item\n scores[mask] = bins[mask] / (bins[mask] - item)\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04709,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/C2C/Run3/population_generation_9.json
================================================
[
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins // (bins - item + 1)\n max_capacity = np.max(bins)\n np.putmask(scores, bins == max_capacity, 0)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == bins.max(), 0, bins / (bins - item + 1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = 1 / np.maximum((bins[mask] - item), 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = item\n scores[bins != max_capacity] = max_capacity - bins[bins != max_capacity] + 1\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins == bins.max()).astype(int) - bins/item\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.maximum((bins - item), 1)) * (bins != bins.max())\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins)\n scores = np.zeros_like(bins)\n \n scores[bins >= item] = (item / bins[bins >= item]) - (max_score == bins)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy() # create a copy of bins\n capacities[capacities == capacities.max()] = 0 # Ignore bins with maximum capacity\n\n scores = np.zeros_like(bins) \n scores[capacities >= item] = -capacities[capacities >= item]/item + 1\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n indices = np.where(bins >= item)\n scores[indices] = -bins[indices]/item + (bins[indices] == bins[indices].max())\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins = bins - item\n mask = bins == np.max(bins)\n scores[mask] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[~mask] = (2 * (max_capacity - bins[~mask])) / item\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = bins == max_capacity\n scores = np.zeros_like(bins)\n scores[~mask] = (bins[~mask] / np.maximum(bins[~mask] - item, 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins == max_capacity\n scores[~mask] = (max_capacity - bins[~mask]) / item\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item - 2 * np.arange(len(bins))).astype(float)\n scores[bins == max_capacity] = -2 * np.arange(len(bins))[bins == max_capacity]\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n mask = bins < max_capacity\n scores[mask] = (max_capacity - item) / (max_capacity - bins[mask])\n\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n mask = (bins > item) & (bins < max_capacity)\n scores = np.zeros_like(bins)\n scores[mask] = item / (bins[mask] - item + 1)\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": null,
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n mask1 = bins < max_capacity\n mask2 = bins >= item\n \n scores[mask1] = bins[mask1] / (bins[mask1] - item + 1)\n scores[bins == item] = -1\n scores[bins == max_capacity] = -2\n scores[~(mask1 | mask2)] = -3\n \n return scores",
"objective": 0.04689,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_1.json
================================================
[
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio of item size to the remaining capacity and the reciprocal of the bin number, excluding bins with maximum capacity, and returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item/bins) * (1/(np.arange(len(bins))+1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the bin's remaining capacity to the inverse of the item size plus the square root of the bin number, and return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (1 / item + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "Define a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins by considering the remaining capacity of bins and giving higher scores to bins with more space available.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins_with_capacity = np.nonzero(bins > item)[0]\n scores[bins_with_capacity] = bins[bins_with_capacity] / (bins[bins_with_capacity] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n scores[bins == item] = -float('inf')\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] != item:\n scores[i] = (bins[i] - item) / bins[i]\n else:\n scores[i] = -1\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on their remaining capacity and their proximity to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the bin's remaining capacity to the item size, and set the score to a higher value if the bin's remaining capacity is close to the item size, aiming to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the bin's remaining capacity to the item size\n ratio = bins / item\n \n # Calculate the score based on the ratio and the proximity to the item size\n scores = ratio * (1 + (1 - np.abs(ratio - 1)))\n \n return scores",
"objective": 0.09035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on a combination of the rest capacity, the index of the bin, and a random factor, which results in a unique scoring function for bin assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Calculate the scores based on rest capacity, index of bin, and random factor\n scores = rest_capacity + np.arange(len(rest_capacity)) + np.random.rand(len(rest_capacity))\n \n return scores",
"objective": 0.10534,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = np.array(bins)\n scores = np.zeros_like(capacities)\n \n min_cap = np.min(capacities)\n \n if min_cap == item:\n scores[np.where(capacities == min_cap)] = 0\n else:\n scores[np.where(capacities >= item)] = capacities[np.where(capacities >= item)] - item\n \n return scores",
"objective": 0.51544,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_10.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the inverse of the remaining capacity of each bin divided by the square root of the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins.astype(float) - item)) / np.sqrt(np.arange(1, len(bins) + 1)) + 1\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * (1 / bins) + np.sqrt( np.arange(len(bins)) )\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by modifying the ratio and logarithm operators used in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n scores = (np.log(ratios + 1)) / (1 + np.log(ratios))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the remaining capacity of each bin divided by the factorial of the bin number, excluding bins with maximum capacity, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.empty(len(bins), dtype=float)\n max_capacity = np.amax(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -float('inf')\n else:\n scores[i] = (item * (max_capacity - bins[i])) / math.factorial(i)\n\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the remaining capacity to the cube root of the product of the bin's index and the item size, excluding bins with maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins) + 1) * item)) * (bins != np.max(bins))\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the logarithm of the item size and the cube root of the remaining capacity of bins, multiplied by the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(item) - np.cbrt(bins)) * np.sqrt(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the item size minus the remaining capacity of each bin multiplied by the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (item - bins)) * np.log(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_11.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the inverse of the remaining capacity of each bin divided by the square root of the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins.astype(float) - item)) / np.sqrt(np.arange(1, len(bins) + 1)) + 1\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * (1 / bins) + np.sqrt( np.arange(len(bins)) )\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by modifying the ratio and logarithm operators used in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n scores = (np.log(ratios + 1)) / (1 + np.log(ratios))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the remaining capacity of each bin divided by the factorial of the bin number, excluding bins with maximum capacity, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.empty(len(bins), dtype=float)\n max_capacity = np.amax(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -float('inf')\n else:\n scores[i] = (item * (max_capacity - bins[i])) / math.factorial(i)\n\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the remaining capacity to the cube root of the product of the bin's index and the item size, excluding bins with maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins) + 1) * item)) * (bins != np.max(bins))\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the logarithm of the item size and the cube root of the remaining capacity of bins, multiplied by the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(item) - np.cbrt(bins)) * np.sqrt(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the item size minus the remaining capacity of each bin multiplied by the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (item - bins)) * np.log(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_12.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the inverse of the remaining capacity of each bin divided by the square root of the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins.astype(float) - item)) / np.sqrt(np.arange(1, len(bins) + 1)) + 1\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * (1 / bins) + np.sqrt( np.arange(len(bins)) )\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by modifying the ratio and logarithm operators used in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n scores = (np.log(ratios + 1)) / (1 + np.log(ratios))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the remaining capacity of each bin divided by the factorial of the bin number, excluding bins with maximum capacity, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.empty(len(bins), dtype=float)\n max_capacity = np.amax(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -float('inf')\n else:\n scores[i] = (item * (max_capacity - bins[i])) / math.factorial(i)\n\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the remaining capacity to the cube root of the product of the bin's index and the item size, excluding bins with maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins) + 1) * item)) * (bins != np.max(bins))\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the logarithm of the item size and the cube root of the remaining capacity of bins, multiplied by the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(item) - np.cbrt(bins)) * np.sqrt(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins == bins.max())\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_13.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the inverse of the remaining capacity of each bin divided by the square root of the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins.astype(float) - item)) / np.sqrt(np.arange(1, len(bins) + 1)) + 1\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * (1 / bins) + np.sqrt( np.arange(len(bins)) )\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by modifying the ratio and logarithm operators used in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n scores = (np.log(ratios + 1)) / (1 + np.log(ratios))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the remaining capacity of each bin divided by the factorial of the bin number, excluding bins with maximum capacity, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.empty(len(bins), dtype=float)\n max_capacity = np.amax(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -float('inf')\n else:\n scores[i] = (item * (max_capacity - bins[i])) / math.factorial(i)\n\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the remaining capacity to the cube root of the product of the bin's index and the item size, excluding bins with maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins) + 1) * item)) * (bins != np.max(bins))\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the logarithm of the item size and the cube root of the remaining capacity of bins, multiplied by the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(item) - np.cbrt(bins)) * np.sqrt(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04085,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_14.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the inverse of the remaining capacity of each bin divided by the square root of the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins.astype(float) - item)) / np.sqrt(np.arange(1, len(bins) + 1)) + 1\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (bins - item) - np.arange(1, len(bins)+1)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * (1 / bins) + np.sqrt( np.arange(len(bins)) )\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by modifying the ratio and logarithm operators used in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n scores = (np.log(ratios + 1)) / (1 + np.log(ratios))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the remaining capacity of each bin divided by the factorial of the bin number, excluding bins with maximum capacity, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.empty(len(bins), dtype=float)\n max_capacity = np.amax(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -float('inf')\n else:\n scores[i] = (item * (max_capacity - bins[i])) / math.factorial(i)\n\n return scores",
"objective": 0.04065,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_15.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the inverse of the remaining capacity of each bin divided by the square root of the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins.astype(float) - item)) / np.sqrt(np.arange(1, len(bins) + 1)) + 1\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * (1 / bins) + np.sqrt( np.arange(len(bins)) )\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by modifying the ratio and logarithm operators used in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n scores = (np.log(ratios + 1)) / (1 + np.log(ratios))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the square of the item size and the remaining capacity of each bin plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2 - bins + 1)**2\n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_16.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the inverse of the remaining capacity of each bin divided by the square root of the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins.astype(float) - item)) / np.sqrt(np.arange(1, len(bins) + 1)) + 1\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the sum of each bin's remaining capacity and the bin number multiplied by a constant factor, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the square of the item size and the remaining capacity of each bin plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2 - bins + 1)**2\n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_17.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the minimum remaining capacity of each bin divided by the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then multiplies the scores by the square root of the bin number and returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(np.arange(1, len(bins)+1)) * (item - bins)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the sum of each bin's remaining capacity and the bin number multiplied by a constant factor, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the square of the item size and the remaining capacity of each bin plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2 - bins + 1)**2\n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_18.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and higher index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins/item\n scores[bins == item] = np.nan\n scores[np.isnan(scores)] = -np.inf\n scores *= (bins != item)\n scores += np.arange(len(bins))\n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the minimum remaining capacity of each bin divided by the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then multiplies the scores by the square root of the bin number and returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(np.arange(1, len(bins)+1)) * (item - bins)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the sum of each bin's remaining capacity and the bin number multiplied by a constant factor, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_19.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and higher index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins/item\n scores[bins == item] = np.nan\n scores[np.isnan(scores)] = -np.inf\n scores *= (bins != item)\n scores += np.arange(len(bins))\n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the minimum remaining capacity of each bin divided by the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then multiplies the scores by the square root of the bin number and returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(np.arange(1, len(bins)+1)) * (item - bins)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the sum of each bin's remaining capacity and the bin number multiplied by a constant factor, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_2.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of the square of the item size to the remaining capacity of each bin, then subtract the index of the bin from the maximum capacity to prioritize bins with higher remaining capacity while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n # Calculate the scores based on the formula\n scores = (item**2) / remaining_capacity\n \n # Subtract the index of the bin from the maximum capacity\n scores -= (bins.max() - np.arange(len(bins)))\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate scores for each bin based on some combination of the bin's remaining capacity and its proximity to the item size.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the inverse of the square of the bin's remaining capacity and the product of the bin's index and the item size to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / np.square(remaining_capacity)) * (np.arange(len(bins)) * item)\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the logarithm of the bin's remaining capacity plus the absolute difference between the bin's index and the item size to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.abs(np.arange(len(bins)) - item)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "scores = item / (np.sum(bins) + np.sqrt(np.arange(1,len(bins)+1)))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (np.sum(bins) + np.sqrt(np.arange(1,len(bins)+1)))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio of item size to the remaining capacity and the reciprocal of the bin number, excluding bins with maximum capacity, and returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item/bins) * (1/(np.arange(len(bins))+1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.int32)\n max_capacity = np.amax(bins)\n \n if item == max_capacity:\n return scores\n \n scores = (max_capacity - bins) - (max_capacity - bins) % item\n \n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the bin's remaining capacity to the inverse of the item size plus the square root of the bin number, and return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (1 / item + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "The score function will assign scores to each bin based on the inverse ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and excluding bins with rest capacity equal to the maximum capacity or the item size, returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where((bins != bins.max()) & (bins != item), bins / (bins - item), 0)\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": "Define a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins by considering the remaining capacity of bins and giving higher scores to bins with more space available.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bins_with_capacity = np.nonzero(bins > item)[0]\n scores[bins_with_capacity] = bins[bins_with_capacity] / (bins[bins_with_capacity] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n scores[bins == item] = -float('inf')\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] != item:\n scores[i] = (bins[i] - item) / bins[i]\n else:\n scores[i] = -1\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate scores for each bin based on some combination of the bin's remaining capacity and its proximity to the item size.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the logarithmic function of the bin's remaining capacity and the exponential function of the product of the bin's index and the item size, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_item = np.arange(1, len(bins)+1)\n scores = np.log(bins) * np.exp(index_item * item)\n return scores",
"objective": 0.05463,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the remaining capacity of each bin divided by the square of the bin number plus the square root of the item, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.square(np.arange(len(bins))) + np.sqrt(item))\n return scores",
"objective": 0.05504,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_20.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and higher index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins/item\n scores[bins == item] = np.nan\n scores[np.isnan(scores)] = -np.inf\n scores *= (bins != item)\n scores += np.arange(len(bins))\n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the minimum remaining capacity of each bin divided by the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then multiplies the scores by the square root of the bin number and returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(np.arange(1, len(bins)+1)) * (item - bins)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the sum of each bin's remaining capacity and the bin number multiplied by a constant factor, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_21.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and higher index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins/item\n scores[bins == item] = np.nan\n scores[np.isnan(scores)] = -np.inf\n scores *= (bins != item)\n scores += np.arange(len(bins))\n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the minimum remaining capacity of each bin divided by the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then multiplies the scores by the square root of the bin number and returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(np.arange(1, len(bins)+1)) * (item - bins)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the sum of each bin's remaining capacity and the bin number multiplied by a constant factor, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_22.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and higher index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins/item\n scores[bins == item] = np.nan\n scores[np.isnan(scores)] = -np.inf\n scores *= (bins != item)\n scores += np.arange(len(bins))\n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the minimum remaining capacity of each bin divided by the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then multiplies the scores by the square root of the bin number and returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(np.arange(1, len(bins)+1)) * (item - bins)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the sum of each bin's remaining capacity and the bin number multiplied by a constant factor, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_23.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and higher index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins/item\n scores[bins == item] = np.nan\n scores[np.isnan(scores)] = -np.inf\n scores *= (bins != item)\n scores += np.arange(len(bins))\n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "F",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the minimum remaining capacity of each bin divided by the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then multiplies the scores by the square root of the bin number and returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(np.arange(1, len(bins)+1)) * (item - bins)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the sum of each bin's remaining capacity and the bin number multiplied by a constant factor, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_24.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and higher index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins/item\n scores[bins == item] = np.nan\n scores[np.isnan(scores)] = -np.inf\n scores *= (bins != item)\n scores += np.arange(len(bins))\n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "F",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the minimum remaining capacity of each bin divided by the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The modified algorithm will calculate the scores by dividing the maximum bin capacity by the remaining capacity of each bin after assigning the item, and then subtracting the index of each bin multiplied by the logarithm of the remaining capacity, with the intention of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity < 0] = 0\n scores = (max_capacity / remaining_capacity) - (np.arange(len(bins)) * np.log(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then multiplies the scores by the square root of the bin number and returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(np.arange(1, len(bins)+1)) * (item - bins)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_25.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and higher index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins/item\n scores[bins == item] = np.nan\n scores[np.isnan(scores)] = -np.inf\n scores *= (bins != item)\n scores += np.arange(len(bins))\n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "F",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the minimum remaining capacity of each bin divided by the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The modified algorithm will calculate the scores by dividing the maximum bin capacity by the remaining capacity of each bin after assigning the item, and then subtracting the index of each bin multiplied by the logarithm of the remaining capacity, with the intention of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity < 0] = 0\n scores = (max_capacity / remaining_capacity) - (np.arange(len(bins)) * np.log(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the square of the item size to the remaining capacity of each bin minus the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item**2) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the product of the logarithm of the ratio of the item size to the remaining capacity of each bin and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1,len(bins)+1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then multiplies the scores by the square root of the bin number and returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(np.arange(1, len(bins)+1)) * (item - bins)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the combination of the logarithm of the ratio of the item size to the remaining capacity of each bin and a modified power function of the bin index, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(item / bins) * (np.power(range(len(bins)), 0.5) + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number multiplied by a weight factor, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.log(np.arange(1, len(bins)+1)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the square root of the remaining capacity of each bin, multiplied by the square root of the bin number minus the item, then returns the scores for the bins as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / np.sqrt(bins)) * (np.sqrt(range(1, len(bins)+1)) - item)).astype(int)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the difference between the item size and the remaining capacity of each bin, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_3.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the square of the bin's remaining capacity divided by the product of the bin's index and the difference between the item size and the maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins)) + 1\n difference = bins - item\n scores = (bins ** 2) / (indices * difference)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of the square of the item size to the remaining capacity of each bin, then subtract the index of the bin from the maximum capacity to prioritize bins with higher remaining capacity while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n # Calculate the scores based on the formula\n scores = (item**2) / remaining_capacity\n \n # Subtract the index of the bin from the maximum capacity\n scores -= (bins.max() - np.arange(len(bins)))\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate scores for each bin based on some combination of the bin's remaining capacity and its proximity to the item size.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the inverse of the square of the bin's remaining capacity and the product of the bin's index and the item size to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / np.square(remaining_capacity)) * (np.arange(len(bins)) * item)\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the logarithm of the bin's remaining capacity plus the absolute difference between the bin's index and the item size to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.abs(np.arange(len(bins)) - item)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item)[::-1]\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio of item size to the remaining capacity and the reciprocal of the bin number, excluding bins with maximum capacity, and returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item/bins) * (1/(np.arange(len(bins))+1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the square of the bin's remaining capacity divided by the product of the bin's index and the sum of the item size and the maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(1, len(bins) + 1)\n max_capacity = max(bins)\n remaining_capacity = max_capacity - bins\n \n scores = (remaining_capacity**2) / (index * (item + max_capacity))\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.int32)\n max_capacity = np.amax(bins)\n \n if item == max_capacity:\n return scores\n \n scores = (max_capacity - bins) - (max_capacity - bins) % item\n \n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Common backbone idea in the provided algorithms: Scoring bins based on a combination of remaining capacity and proximity to the item size.}\n\n{New algorithm: The score function will calculate scores for each bin based on the bin's remaining capacity normalized by the item size divided by the bin number, aiming to prioritize bins with higher capacity and lower index for assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n scores = (bins / item) / (indices + 1)\n return scores",
"objective": 0.04407,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_4.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the square of the bin's remaining capacity divided by the product of the bin's index and the difference between the item size and the maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins)) + 1\n difference = bins - item\n scores = (bins ** 2) / (indices * difference)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of the square of the item size to the remaining capacity of each bin, then subtract the index of the bin from the maximum capacity to prioritize bins with higher remaining capacity while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n # Calculate the scores based on the formula\n scores = (item**2) / remaining_capacity\n \n # Subtract the index of the bin from the maximum capacity\n scores -= (bins.max() - np.arange(len(bins)))\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of their remaining capacity, the item size, and a penalty for bins with maximum capacity, in order to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n penalty = np.where(bins == max_capacity, -np.inf, 0)\n scores = bins / max_capacity + item / bins + penalty\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the floor division of the item size by the remaining capacity of each bin plus the reciprocal of the square root of the bin number, excluding bins with maximum capacity, and return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.floor_divide(item, bins[:-1]) + 1 / np.sqrt(np.arange(1, len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the logarithm of the bin's remaining capacity plus the absolute difference between the bin's index and the item size to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.abs(np.arange(len(bins)) - item)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item)[::-1]\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's remaining capacity divided by the item size and multiplied by the inverse of the bin's index plus one, ensuring bins with lower indices and higher remaining capacities are prioritized, leading to efficient bin assignment and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate scores for each bin\n scores = bins / item * (1 / (np.arange(len(bins)) + 1))\n \n # Set scores of bins with maximum capacity to 0\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio of item size to the remaining capacity and the reciprocal of the bin number, excluding bins with maximum capacity, and returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item/bins) * (1/(np.arange(len(bins))+1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin based on the logarithm of the sum of the bin's remaining capacity and the item size, dividing it by the square root of the bin index, aiming to balance bin usage and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (np.log(remaining_capacity + item) / np.sqrt(np.arange(1, len(bins)+1))).tolist()\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the square of the bin's remaining capacity divided by the product of the bin's index and the sum of the item size and the maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(1, len(bins) + 1)\n max_capacity = max(bins)\n remaining_capacity = max_capacity - bins\n \n scores = (remaining_capacity**2) / (index * (item + max_capacity))\n \n return scores",
"objective": 0.04276,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_5.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the square of the bin's remaining capacity divided by the product of the bin's index and the difference between the item size and the maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins)) + 1\n difference = bins - item\n scores = (bins ** 2) / (indices * difference)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of the square of the item size to the remaining capacity of each bin, then subtract the index of the bin from the maximum capacity to prioritize bins with higher remaining capacity while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n # Calculate the scores based on the formula\n scores = (item**2) / remaining_capacity\n \n # Subtract the index of the bin from the maximum capacity\n scores -= (bins.max() - np.arange(len(bins)))\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of their remaining capacity, the item size, and a penalty for bins with maximum capacity, in order to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n penalty = np.where(bins == max_capacity, -np.inf, 0)\n scores = bins / max_capacity + item / bins + penalty\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the floor division of the item size by the remaining capacity of each bin plus the reciprocal of the square root of the bin number, excluding bins with maximum capacity, and return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.floor_divide(item, bins[:-1]) + 1 / np.sqrt(np.arange(1, len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array. In addition, it penalizes bins that have a remaining capacity of zero by subtracting a constant factor from their scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n constant_factor = 0.5 # Adjust this value as needed\n \n # Calculate the scores for each bin\n scores = 1 / (bins + 1) + np.sqrt(np.arange(len(bins)) + 1)\n \n # Penalize bins with zero remaining capacity\n scores[bins == 0] -= constant_factor\n \n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the logarithm of the bin's remaining capacity plus the absolute difference between the bin's index and the item size to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.abs(np.arange(len(bins)) - item)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item)[::-1]\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's remaining capacity divided by the item size and multiplied by the inverse of the bin's index plus one, ensuring bins with lower indices and higher remaining capacities are prioritized, leading to efficient bin assignment and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate scores for each bin\n scores = bins / item * (1 / (np.arange(len(bins)) + 1))\n \n # Set scores of bins with maximum capacity to 0\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio of item size to the remaining capacity and the reciprocal of the bin number, excluding bins with maximum capacity, and returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item/bins) * (1/(np.arange(len(bins))+1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin based on the logarithm of the sum of the bin's remaining capacity and the item size, dividing it by the square root of the bin index, aiming to balance bin usage and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (np.log(remaining_capacity + item) / np.sqrt(np.arange(1, len(bins)+1))).tolist()\n return scores",
"objective": 0.04266,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_6.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the square of the bin's remaining capacity divided by the product of the bin's index and the difference between the item size and the maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins)) + 1\n difference = bins - item\n scores = (bins ** 2) / (indices * difference)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of the square of the item size to the remaining capacity of each bin, then subtract the index of the bin from the maximum capacity to prioritize bins with higher remaining capacity while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n # Calculate the scores based on the formula\n scores = (item**2) / remaining_capacity\n \n # Subtract the index of the bin from the maximum capacity\n scores -= (bins.max() - np.arange(len(bins)))\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of their remaining capacity, the item size, and a penalty for bins with maximum capacity, in order to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n penalty = np.where(bins == max_capacity, -np.inf, 0)\n scores = bins / max_capacity + item / bins + penalty\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the remaining capacity of the bin divided by the square root of the product of the bin's index and the maximum capacity, in order to consider the prioritization of bins based on remaining capacity, while also considering their index and maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n max_capacity = np.max(bins)\n scores = bins / (index * max_capacity) ** 0.5\n scores[bins == max_capacity] = -np.inf\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the floor division of the item size by the remaining capacity of each bin plus the reciprocal of the square root of the bin number, excluding bins with maximum capacity, and return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.floor_divide(item, bins[:-1]) + 1 / np.sqrt(np.arange(1, len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array. In addition, it penalizes bins that have a remaining capacity of zero by subtracting a constant factor from their scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n constant_factor = 0.5 # Adjust this value as needed\n \n # Calculate the scores for each bin\n scores = 1 / (bins + 1) + np.sqrt(np.arange(len(bins)) + 1)\n \n # Penalize bins with zero remaining capacity\n scores[bins == 0] -= constant_factor\n \n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the logarithm of the bin's remaining capacity plus the absolute difference between the bin's index and the item size to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.abs(np.arange(len(bins)) - item)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item)[::-1]\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's remaining capacity divided by the item size and multiplied by the inverse of the bin's index plus one, ensuring bins with lower indices and higher remaining capacities are prioritized, leading to efficient bin assignment and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate scores for each bin\n scores = bins / item * (1 / (np.arange(len(bins)) + 1))\n \n # Set scores of bins with maximum capacity to 0\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio of item size to the remaining capacity and the reciprocal of the bin number, excluding bins with maximum capacity, and returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item/bins) * (1/(np.arange(len(bins))+1))\n return scores",
"objective": 0.04256,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_7.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the square of the bin's remaining capacity divided by the product of the bin's index and the difference between the item size and the maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins)) + 1\n difference = bins - item\n scores = (bins ** 2) / (indices * difference)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of the square of the item size to the remaining capacity of each bin, then subtract the index of the bin from the maximum capacity to prioritize bins with higher remaining capacity while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n # Calculate the scores based on the formula\n scores = (item**2) / remaining_capacity\n \n # Subtract the index of the bin from the maximum capacity\n scores -= (bins.max() - np.arange(len(bins)))\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of their remaining capacity, the item size, and a penalty for bins with maximum capacity, in order to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n penalty = np.where(bins == max_capacity, -np.inf, 0)\n scores = bins / max_capacity + item / bins + penalty\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the floor division of the item size by the remaining capacity of each bin plus the reciprocal of the square root of the bin number, excluding bins with maximum capacity, and return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.floor_divide(item, bins[:-1]) + 1 / np.sqrt(np.arange(1, len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square root of the bin's index, and the square of the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = max(bins)\n scores = ((max_capacity / bins) + np.sqrt(np.arange(len(bins))) + (item**2 / max_capacity**2)) ** -1\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array. In addition, it penalizes bins that have a remaining capacity of zero by subtracting a constant factor from their scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n constant_factor = 0.5 # Adjust this value as needed\n \n # Calculate the scores for each bin\n scores = 1 / (bins + 1) + np.sqrt(np.arange(len(bins)) + 1)\n \n # Penalize bins with zero remaining capacity\n scores[bins == 0] -= constant_factor\n \n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / item + np.arange(len(bins)) + np.log(np.max(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the logarithm of the bin's remaining capacity plus the absolute difference between the bin's index and the item size to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.abs(np.arange(len(bins)) - item)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the remaining capacity to the item size, prioritizing bins with higher ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item)[::-1]\n return scores",
"objective": 0.04226,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_8.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the inverse of the remaining capacity of each bin divided by the square root of the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins.astype(float) - item)) / np.sqrt(np.arange(1, len(bins) + 1)) + 1\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of the square of the item size to the remaining capacity of each bin, then subtract the index of the bin from the maximum capacity to prioritize bins with higher remaining capacity while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n \n # Calculate the scores based on the formula\n scores = (item**2) / remaining_capacity\n \n # Subtract the index of the bin from the maximum capacity\n scores -= (bins.max() - np.arange(len(bins)))\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of their remaining capacity, the item size, and a penalty for bins with maximum capacity, in order to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n penalty = np.where(bins == max_capacity, -np.inf, 0)\n scores = bins / max_capacity + item / bins + penalty\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the remaining capacity to the cube root of the product of the bin's index and the item size, excluding bins with maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins) + 1) * item)) * (bins != np.max(bins))\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the floor division of the item size by the remaining capacity of each bin plus the reciprocal of the square root of the bin number, excluding bins with maximum capacity, and return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.floor_divide(item, bins[:-1]) + 1 / np.sqrt(np.arange(1, len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "scores = item + 1 / (bins - item) + np.abs(np.arange(len(bins)) - np.max(bins) / item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item + 1 / (bins - item) + np.abs(np.arange(len(bins)) - np.max(bins) / item)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square root of the bin's index, and the square of the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = max(bins)\n scores = ((max_capacity / bins) + np.sqrt(np.arange(len(bins))) + (item**2 / max_capacity**2)) ** -1\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array. In addition, it penalizes bins that have a remaining capacity of zero by subtracting a constant factor from their scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n constant_factor = 0.5 # Adjust this value as needed\n \n # Calculate the scores for each bin\n scores = 1 / (bins + 1) + np.sqrt(np.arange(len(bins)) + 1)\n \n # Penalize bins with zero remaining capacity\n scores[bins == 0] -= constant_factor\n \n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n sorted_indices = np.argsort(bins)\n \n max_capacity = np.max(bins)\n if max_capacity == item:\n return scores\n \n for i in range(len(sorted_indices)):\n bin_index = sorted_indices[i]\n bin_capacity = bins[bin_index]\n \n if bin_capacity == max_capacity:\n break\n \n if bin_capacity >= item:\n scores[bin_index] = bin_capacity - item\n break\n \n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run1/population_generation_9.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = 1 / remaining_capacity + np.sqrt(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the bin index divided by the item size, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n # If the rest capacity equals the maximum capacity,\n # assign a very low score to this bin to avoid using it\n scores[i] = -np.inf\n else:\n scores[i] = (1 / (bins[i] - item)) + (i / item) + (item / max_capacity)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, prioritizing bins with lower ratios and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = item / (bins - item)\n indices = np.arange(len(bins))\n scores = ratios + indices\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the item size to the product of the bin's index and its remaining capacity, excluding bins with maximum capacity, in order to prioritize bins with lower remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n scores = item / (indices + 1) / remaining_capacities\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores by taking the sum of the bin capacities divided by the remaining capacity of each bin after assigning the item, and then adding the index of each bin multiplied by the logarithm of the maximum bin capacity, with the aim of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (bins / remaining_capacities) + (np.arange(len(bins)) * np.log(np.max(bins)))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the inverse of the remaining capacity of each bin divided by the square root of the bin number plus a constant, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins.astype(float) - item)) / np.sqrt(np.arange(1, len(bins) + 1)) + 1\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin's remaining capacity, the square of the bin's index, and the item size divided by the maximum capacity, to optimize bin usage while assigning the item to bins with higher score and minimum number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n \n # Calculate scores for each bin\n scores = (1 / remaining_capacity) * (np.square(np.arange(len(bins))) * (item / max_capacity))\n \n # Set score of bins with maximum capacity as 0\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on a combination of the ratio of the logarithm of the item size to the cube root of the remaining capacity of each bin and the square root of the bin number minus the square root of the item, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.cbrt(bins) + np.sqrt(np.arange(1, len(bins)+1)) - np.sqrt(item)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to each bin based on the ratio of item size to the square of each bin's rest capacity, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins**2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the remaining capacity of each bin plus the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins + np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the inverse of the remaining capacity of each bin plus the square root of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * (1 / bins) + np.sqrt( np.arange(len(bins)) )\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on their remaining capacity relative to the item size.}\n\n{New algorithm: Assign scores to bins based on the ratio of the item size to the sum of each bin's remaining capacity and the logarithm of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.log(np.arange(1, len(bins) + 1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the logarithm of the item size to the remaining capacity of each bin plus the square root of the bin number, then return the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / np.log(bins) + np.sqrt(np.arange(bins.size))\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by modifying the ratio and logarithm operators used in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n scores = (np.log(ratios + 1)) / (1 + np.log(ratios))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The common idea in the provided algorithms is to assign scores to bins based on some combination of the bin's remaining capacity and its relationship to the item size.}\n\n{New algorithm: Assign scores to each bin based on the logarithm of the bin's remaining capacity divided by the product of the square of the difference between the item size and the maximum capacity of the bins plus the bin's index, to prioritize bins with higher remaining capacity while considering the item size and the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((item - bins)**2 + np.arange(len(bins)))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the remaining capacity of each bin divided by the factorial of the bin number, excluding bins with maximum capacity, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.empty(len(bins), dtype=float)\n max_capacity = np.amax(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -float('inf')\n else:\n scores[i] = (item * (max_capacity - bins[i])) / math.factorial(i)\n\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio of the remaining capacity to the cube root of the product of the bin's index and the item size, excluding bins with maximum capacity, in order to prioritize bins with higher remaining capacity while considering the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins) + 1) * item)) * (bins != np.max(bins))\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse of the item size minus the remaining capacity of each bin multiplied by the logarithm of the bin number, then returns the scores for the bins for assignment as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (item - bins)) * np.log(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "scores = item + 1 / (bins - item) + np.abs(np.arange(len(bins)) - np.max(bins) / item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item + 1 / (bins - item) + np.abs(np.arange(len(bins)) - np.max(bins) / item)\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_1.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the product of the item size and the inverse of the square of the rest capacity, minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (1 / (bins ** 2)))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns scores to the bins by dividing the inverse of the rest capacity by the difference between the item size and the rest capacity, taking into account the proximity to the item size and the inverse bin number, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n used_bins = np.count_nonzero(bins != max_capacity)\n\n if used_bins == len(bins):\n return scores\n\n for i in range(len(bins)):\n if bins[i] != max_capacity:\n score = (1 / (max_capacity - bins[i])) / (item - bins[i])\n scores[i] = score + (1 / (i + 1))\n\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on its rest capacity and/or the ratio of item size to capacity, and then assign the item to the bin with the maximum score.}\n\n{New algorithm:}\n\n{1. Calculate the score for each bin based on the logarithm of the rest capacity and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.arange(len(bins))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the reciprocal of its rest capacity and the square of the item size, using a weighted average.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.reciprocal(bins) * item**2\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "My new algorithm will calculate the score for each bin based on the ratio of the item size to the remaining capacity, taking into account the inverse of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins, but additionally considers the number of items already assigned to each bin to adjust the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = bin_capacity - item - np.sum(bins[:i])\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size, prioritizing bins with higher ratios and lower indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the bin's rest capacity, squared, and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) ** 2 * np.arange(len(bins))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * np.log(bins) / (bins - item)\n scores[bins == item] = -np.inf\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, taking into account a weighted average using the reciprocal of the bin number, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] != item:\n ratio = item / (bins[i] - item)\n scores[i] = ratio / (i+1)\n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculating the scores based on the rest capacity of the bins and considering factors such as item size, proximity to item size, and inverse bin number.}\n\n{New algorithm description: The new algorithm assigns scores to the bins based on the product of the item size and the inverse of the rest capacity, considering the proximity to the item size and the inverse bin number, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n inverse_bin_number = 1 / np.arange(1, len(bins) + 1)\n proximity_to_item_size = np.abs(bins - item)\n\n scores = item * inverse_bin_number * proximity_to_item_size / bins\n scores[bins == np.max(bins)] = 0 # Setting score to 0 for bins with maximum capacity\n\n return scores",
"objective": 0.06057,
"other_inf": null
},
{
"algorithm": "Calculate the ratio of item size to each bin's rest capacity, and calculate the score for each bin based on the ratio and the condition of the rest capacity. If the ratio is greater than a threshold, assign a very low score to the bin. If the rest capacity of the bin is equal to the maximum capacity, assign a very low score to the bin. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = max(bins)\n threshold = 0.5\n scores = np.zeros_like(bins, dtype=np.float64)\n \n for i in range(len(bins)):\n ratio = item / bins[i]\n if ratio > threshold or bins[i] == max_capacity:\n scores[i] = -1e9 # Assign a very low score\n else:\n scores[i] = ratio\n \n return scores",
"objective": 0.06399,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_10.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Using the remaining capacity and considering penalties for bins at maximum capacity, the new algorithm calculates the scores as the ratio between the item size and the remaining capacity, giving higher weights to bins with lower indices and aiming for an even distribution of items across bins to minimize their usage.",
"code": "import numpy as np\ndef score(item, bins):\n remaining_cap = bins - item\n max_cap = np.max(bins)\n penalty = (remaining_cap == max_cap).astype(np.float32)\n idx = np.arange(len(bins))\n weights = (1 - penalty) / (1 + idx)\n scores = item / remaining_cap * weights\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the difference between the item and the rest capacity, using a weighted average with the reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n scores = (item - bins) * weights\n scores[bins == np.max(bins)] = -np.inf\n scores[bins == np.max(bins) - item] -= np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with lower indices, aiming to prioritize bins with higher indices and reduce the usage of low-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n n = bins.shape[0]\n scores = np.zeros(n)\n max_capacity = np.max(bins)\n \n for i in range(n):\n capacity_ratio = item / (bins[i] - item) if bins[i] != max_capacity else 0\n index_penalty = 1 / (i + 1)\n scores[i] = capacity_ratio + index_penalty\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity divided by the product of the bin capacity and the bin load ratio, with the aim of maximizing the usage of bins and minimizing the imbalance in distribution of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_load_ratio = bins / np.max(bins) # Calculate bin load ratio\n scores = (item - bins) / (bins * bin_load_ratio) # Calculate scores\n scores[bins == np.max(bins)] = -np.inf # Set score to -inf for bins with maximum capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio between item size and remaining capacity, penalties for bins at maximum capacity, and a weighted average considering the reciprocal of the bin number and the square of the item size, aiming for an even distribution of items and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(remaining_capacity)\n \n # Calculate ratio between item size and remaining capacity\n ratio = item / remaining_capacity\n \n # Calculate penalties for bins at maximum capacity\n penalties = np.where(remaining_capacity == max_capacity, -np.inf, 0)\n \n # Calculate weighted average\n bin_number_weights = 1 / np.arange(1, len(bins)+1)\n item_size_weights = item**2\n \n weighted_average = (bin_number_weights + item_size_weights) / 2\n \n # Calculate scores for bins\n scores = ratio + penalties + weighted_average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's normalized load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment, with the added modification of penalizing bins that are at maximum capacity by setting their scores to -np.inf.",
"code": "import numpy as np\n\ndef score(item, bins):\n load_ratios = (bins - item) / bins\n load_ratios[load_ratios == 1] = -np.inf\n scores = (bins - item) / (bins * load_ratios)\n scores[scores == -np.inf] = np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the ratio between the item size and the remaining capacity of each bin, weighted by factors such as the difference between the bin capacity and item size or the bin load ratio.}\n\n{New algorithm: The score function assigns scores to each bin by considering the maximum factor between the ratio of the item size to the remaining capacity and the ratio of the bin load to the bin capacity, aiming to balance the distribution of items while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = np.maximum(item / bins, bins / np.max(bins))\n scores = np.where(bins == np.max(bins), 0, ratios)\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the inverse of the bin number and a decreasing term, aiming to distribute items evenly across all bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = len(bins)\n bin_range = np.arange(1, bin_num + 1)\n remaining_capacity = bins - item\n ratios = item / remaining_capacity\n weights = 1 / (bin_range**2)\n decreasing_terms = np.exp(-bin_range)\n scores = ratios * weights * decreasing_terms\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.04025,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_11.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Using the remaining capacity and considering penalties for bins at maximum capacity, the new algorithm calculates the scores as the ratio between the item size and the remaining capacity, giving higher weights to bins with lower indices and aiming for an even distribution of items across bins to minimize their usage.",
"code": "import numpy as np\ndef score(item, bins):\n remaining_cap = bins - item\n max_cap = np.max(bins)\n penalty = (remaining_cap == max_cap).astype(np.float32)\n idx = np.arange(len(bins))\n weights = (1 - penalty) / (1 + idx)\n scores = item / remaining_cap * weights\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the difference between the item and the rest capacity, using a weighted average with the reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n scores = (item - bins) * weights\n scores[bins == np.max(bins)] = -np.inf\n scores[bins == np.max(bins) - item] -= np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with lower indices, aiming to prioritize bins with higher indices and reduce the usage of low-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n n = bins.shape[0]\n scores = np.zeros(n)\n max_capacity = np.max(bins)\n \n for i in range(n):\n capacity_ratio = item / (bins[i] - item) if bins[i] != max_capacity else 0\n index_penalty = 1 / (i + 1)\n scores[i] = capacity_ratio + index_penalty\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity divided by the product of the bin capacity and the bin load ratio, with the aim of maximizing the usage of bins and minimizing the imbalance in distribution of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_load_ratio = bins / np.max(bins) # Calculate bin load ratio\n scores = (item - bins) / (bins * bin_load_ratio) # Calculate scores\n scores[bins == np.max(bins)] = -np.inf # Set score to -inf for bins with maximum capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio between item size and remaining capacity, penalties for bins at maximum capacity, and a weighted average considering the reciprocal of the bin number and the square of the item size, aiming for an even distribution of items and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(remaining_capacity)\n \n # Calculate ratio between item size and remaining capacity\n ratio = item / remaining_capacity\n \n # Calculate penalties for bins at maximum capacity\n penalties = np.where(remaining_capacity == max_capacity, -np.inf, 0)\n \n # Calculate weighted average\n bin_number_weights = 1 / np.arange(1, len(bins)+1)\n item_size_weights = item**2\n \n weighted_average = (bin_number_weights + item_size_weights) / 2\n \n # Calculate scores for bins\n scores = ratio + penalties + weighted_average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(bins-item) + np.cbrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the ratio between the item size and the remaining capacity of each bin, weighted by factors such as the difference between the bin capacity and item size or the bin load ratio.}\n\n{New algorithm: The score function assigns scores to each bin by considering the maximum factor between the ratio of the item size to the remaining capacity and the ratio of the bin load to the bin capacity, aiming to balance the distribution of items while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = np.maximum(item / bins, bins / np.max(bins))\n scores = np.where(bins == np.max(bins), 0, ratios)\n return scores",
"objective": 0.04004,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_12.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin based on the quotient of the item size and the bin's excess capacity, multiplied by a constant factor derived from the bin's load ratio, aiming to optimize the distribution of items and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the difference between the item and the rest capacity, using a weighted average with the reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n scores = (item - bins) * weights\n scores[bins == np.max(bins)] = -np.inf\n scores[bins == np.max(bins) - item] -= np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with lower indices, aiming to prioritize bins with higher indices and reduce the usage of low-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n n = bins.shape[0]\n scores = np.zeros(n)\n max_capacity = np.max(bins)\n \n for i in range(n):\n capacity_ratio = item / (bins[i] - item) if bins[i] != max_capacity else 0\n index_penalty = 1 / (i + 1)\n scores[i] = capacity_ratio + index_penalty\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity divided by the product of the bin capacity and the bin load ratio, with the aim of maximizing the usage of bins and minimizing the imbalance in distribution of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_load_ratio = bins / np.max(bins) # Calculate bin load ratio\n scores = (item - bins) / (bins * bin_load_ratio) # Calculate scores\n scores[bins == np.max(bins)] = -np.inf # Set score to -inf for bins with maximum capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(bins-item) + np.cbrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on a combination of the item's size and the bin's remaining capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by dividing the item's size by the sum of the bin's remaining capacity and the square root of the bin number, aiming to prioritize bins with larger remaining capacities while considering the bin's position in the order.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins) + 1)))\n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_13.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin based on the quotient of the item size and the bin's excess capacity, multiplied by a constant factor derived from the bin's load ratio, aiming to optimize the distribution of items and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the difference between the item and the rest capacity, using a weighted average with the reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n scores = (item - bins) * weights\n scores[bins == np.max(bins)] = -np.inf\n scores[bins == np.max(bins) - item] -= np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with lower indices, aiming to prioritize bins with higher indices and reduce the usage of low-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n n = bins.shape[0]\n scores = np.zeros(n)\n max_capacity = np.max(bins)\n \n for i in range(n):\n capacity_ratio = item / (bins[i] - item) if bins[i] != max_capacity else 0\n index_penalty = 1 / (i + 1)\n scores[i] = capacity_ratio + index_penalty\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity divided by the product of the bin capacity and the bin load ratio, with the aim of maximizing the usage of bins and minimizing the imbalance in distribution of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_load_ratio = bins / np.max(bins) # Calculate bin load ratio\n scores = (item - bins) / (bins * bin_load_ratio) # Calculate scores\n scores[bins == np.max(bins)] = -np.inf # Set score to -inf for bins with maximum capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(bins-item) + np.cbrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on a combination of the item's size and the bin's remaining capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by dividing the item's size by the sum of the bin's remaining capacity and the square root of the bin number, aiming to prioritize bins with larger remaining capacities while considering the bin's position in the order.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins) + 1)))\n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_14.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin based on the quotient of the item size and the bin's excess capacity, multiplied by a constant factor derived from the bin's load ratio, aiming to optimize the distribution of items and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the difference between the item and the rest capacity, using a weighted average with the reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n scores = (item - bins) * weights\n scores[bins == np.max(bins)] = -np.inf\n scores[bins == np.max(bins) - item] -= np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity divided by the product of the bin capacity and the bin load ratio, with the aim of maximizing the usage of bins and minimizing the imbalance in distribution of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_load_ratio = bins / np.max(bins) # Calculate bin load ratio\n scores = (item - bins) / (bins * bin_load_ratio) # Calculate scores\n scores[bins == np.max(bins)] = -np.inf # Set score to -inf for bins with maximum capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(bins-item) + np.cbrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on a combination of the item's size and the bin's remaining capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by dividing the item's size by the sum of the bin's remaining capacity and the square root of the bin number, aiming to prioritize bins with larger remaining capacities while considering the bin's position in the order.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins) + 1)))\n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_15.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin based on the quotient of the item size and the bin's excess capacity, multiplied by a constant factor derived from the bin's load ratio, aiming to optimize the distribution of items and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the difference between the item and the rest capacity, using a weighted average with the reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n scores = (item - bins) * weights\n scores[bins == np.max(bins)] = -np.inf\n scores[bins == np.max(bins) - item] -= np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity divided by the product of the bin capacity and the bin load ratio, with the aim of maximizing the usage of bins and minimizing the imbalance in distribution of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_load_ratio = bins / np.max(bins) # Calculate bin load ratio\n scores = (item - bins) / (bins * bin_load_ratio) # Calculate scores\n scores[bins == np.max(bins)] = -np.inf # Set score to -inf for bins with maximum capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(bins-item) + np.cbrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_16.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average, and consider a penalty term for bins that have reached their maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n \n inverse_rest_capacity = 1 / rest_capacity\n bin_numbers = np.arange(len(bins))\n \n scores = (inverse_rest_capacity + bin_numbers / item) / 2\n \n penalty = max_capacity - bins\n scores[penalty == 0] = -np.inf\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin based on the quotient of the item size and the bin's excess capacity, multiplied by a constant factor derived from the bin's load ratio, aiming to optimize the distribution of items and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the difference between the item and the rest capacity, using a weighted average with the reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n scores = (item - bins) * weights\n scores[bins == np.max(bins)] = -np.inf\n scores[bins == np.max(bins) - item] -= np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity divided by the product of the bin capacity and the bin load ratio, with the aim of maximizing the usage of bins and minimizing the imbalance in distribution of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_load_ratio = bins / np.max(bins) # Calculate bin load ratio\n scores = (item - bins) / (bins * bin_load_ratio) # Calculate scores\n scores[bins == np.max(bins)] = -np.inf # Set score to -inf for bins with maximum capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(bins-item) + np.cbrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_17.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average, and consider a penalty term for bins that have reached their maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n \n inverse_rest_capacity = 1 / rest_capacity\n bin_numbers = np.arange(len(bins))\n \n scores = (inverse_rest_capacity + bin_numbers / item) / 2\n \n penalty = max_capacity - bins\n scores[penalty == 0] = -np.inf\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin based on the quotient of the item size and the bin's excess capacity, multiplied by a constant factor derived from the bin's load ratio, aiming to optimize the distribution of items and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin based on the difference between the item and the rest capacity, using the negative reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1 / np.arange(1, len(bins) + 1)) * (bins - item)\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity divided by the product of the bin capacity and the bin load ratio, with the aim of maximizing the usage of bins and minimizing the imbalance in distribution of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_load_ratio = bins / np.max(bins) # Calculate bin load ratio\n scores = (item - bins) / (bins * bin_load_ratio) # Calculate scores\n scores[bins == np.max(bins)] = -np.inf # Set score to -inf for bins with maximum capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(bins-item) + np.cbrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_18.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average, and consider a penalty term for bins that have reached their maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n \n inverse_rest_capacity = 1 / rest_capacity\n bin_numbers = np.arange(len(bins))\n \n scores = (inverse_rest_capacity + bin_numbers / item) / 2\n \n penalty = max_capacity - bins\n scores[penalty == 0] = -np.inf\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin based on the quotient of the item size and the bin's excess capacity, multiplied by a constant factor derived from the bin's load ratio, aiming to optimize the distribution of items and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin based on the difference between the item and the rest capacity, using the negative reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1 / np.arange(1, len(bins) + 1)) * (bins - item)\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity divided by the product of the bin capacity and the bin load ratio, with the aim of maximizing the usage of bins and minimizing the imbalance in distribution of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_load_ratio = bins / np.max(bins) # Calculate bin load ratio\n scores = (item - bins) / (bins * bin_load_ratio) # Calculate scores\n scores[bins == np.max(bins)] = -np.inf # Set score to -inf for bins with maximum capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(bins-item) + np.cbrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_19.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average, and consider a penalty term for bins that have reached their maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n \n inverse_rest_capacity = 1 / rest_capacity\n bin_numbers = np.arange(len(bins))\n \n scores = (inverse_rest_capacity + bin_numbers / item) / 2\n \n penalty = max_capacity - bins\n scores[penalty == 0] = -np.inf\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin based on the quotient of the item size and the bin's excess capacity, multiplied by a constant factor derived from the bin's load ratio, aiming to optimize the distribution of items and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin based on the difference between the item and the rest capacity, using the negative reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1 / np.arange(1, len(bins) + 1)) * (bins - item)\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin, while introducing a penalty term based on the square of the square root of the bin number, aiming to prioritize bins with smaller numbers and larger remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins)+1)\n bin_capacities = bins - item\n num_items_in_bin = np.zeros(len(bins))\n \n scores = (item / bin_capacities) * np.sqrt(bin_nums) - np.sqrt(bin_nums)**2\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(bins-item) + np.cbrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_2.json
================================================
[
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the inverse of the bin number and a decreasing term, aiming to distribute items evenly across all bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = len(bins)\n bin_range = np.arange(1, bin_num + 1)\n remaining_capacity = bins - item\n ratios = item / remaining_capacity\n weights = 1 / (bin_range**2)\n decreasing_terms = np.exp(-bin_range)\n scores = ratios * weights * decreasing_terms\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "C",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (max_capacity - bins[i]) / (max_capacity - item)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Combining the scoring methods used in the existing algorithms, the new algorithm will calculate the scores for each bin based on the ratio between the item size and the remaining capacity, taking into account a weighted average using the reciprocal of the bin number and the square of the item size, as well as considering the number of items already assigned to each bin and aiming for an even distribution across all bins, ultimately minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.reciprocal(np.arange(1, len(bins)+1))\n item_size_sq = np.square(item)\n remaining_capacity = bins - item\n \n scores = (item_size_sq / remaining_capacity) * weights\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on its rest capacity and/or the ratio of item size to capacity, and then assign the item to the bin with the maximum score.}\n\n{New algorithm:}\n\n{1. Calculate the score for each bin based on the logarithm of the rest capacity and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.arange(len(bins))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the reciprocal of its rest capacity and the square of the item size, using a weighted average.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.reciprocal(bins) * item**2\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "My new algorithm will calculate the score for each bin based on the ratio of the item size to the remaining capacity, taking into account the inverse of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins, but additionally considers the number of items already assigned to each bin to adjust the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = bin_capacity - item - np.sum(bins[:i])\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins based on the product of the item size, the inverse of the bin capacity, and a logarithmic function of the bin number, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) \n max_capacity = np.amax(bins)\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = item * (1 / bins[i]) * np.log(i+1)\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size, prioritizing bins with higher ratios and lower indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the sum of the bin's rest capacity and the item size squared, using the inverse of the bin number squared as the weight.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.square(np.arange(1, len(bins)+1))\n scores = bins + np.square(item) * weights\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the bin's rest capacity, squared, and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) ** 2 * np.arange(len(bins))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * np.log(bins) / (bins - item)\n scores[bins == item] = -np.inf\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, taking into account a weighted average using the reciprocal of the bin number, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] != item:\n ratio = item / (bins[i] - item)\n scores[i] = ratio / (i+1)\n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the remaining capacity of the bin, using a weighted average determined by the inverse of the bin number squared, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == item:\n scores[i] = -np.inf # bin already full, assign lowest score\n else:\n scores[i] = item / (bin_capacity - item)\n \n weights = 1 / np.arange(1, len(bins) + 1)**2\n scores = np.multiply(scores, weights)\n \n return scores",
"objective": 0.05192,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity, with a penalty for bins with maximum capacity, and the amount of unused space in the remaining bins, to further minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n \n # Calculate the scores based on remaining capacity and unused space\n scores = remaining_capacity + (max_capacity - bins) * (remaining_capacity > 0)\n \n return scores",
"objective": 0.05383,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_20.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average, and consider a penalty term for bins that have reached their maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n \n inverse_rest_capacity = 1 / rest_capacity\n bin_numbers = np.arange(len(bins))\n \n scores = (inverse_rest_capacity + bin_numbers / item) / 2\n \n penalty = max_capacity - bins\n scores[penalty == 0] = -np.inf\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function assigns scores to each bin by dividing the item size by the difference between the bin's capacity and the item's size, with a penalty factor based on the position of the bin, aiming to prioritize bins with larger remaining capacities and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin based on the quotient of the item size and the bin's excess capacity, multiplied by a constant factor derived from the bin's load ratio, aiming to optimize the distribution of items and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin based on the difference between the item and the rest capacity, using the negative reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1 / np.arange(1, len(bins) + 1)) * (bins - item)\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin, while introducing a penalty term based on the square of the square root of the bin number, aiming to prioritize bins with smaller numbers and larger remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins)+1)\n bin_capacities = bins - item\n num_items_in_bin = np.zeros(len(bins))\n \n scores = (item / bin_capacities) * np.sqrt(bin_nums) - np.sqrt(bin_nums)**2\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_21.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of the item size and the cube of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and cube of bin number\n scores = item / capacities + bin_nums**3\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n\n bin_nums = np.arange(1, len(bins) + 1)\n capacities = bins - item\n\n scores = item / capacities + bin_nums**3\n\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average, and consider a penalty term for bins that have reached their maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n \n inverse_rest_capacity = 1 / rest_capacity\n bin_numbers = np.arange(len(bins))\n \n scores = (inverse_rest_capacity + bin_numbers / item) / 2\n \n penalty = max_capacity - bins\n scores[penalty == 0] = -np.inf\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function assigns scores to each bin by dividing the item size by the difference between the bin's capacity and the item's size, with a penalty factor based on the position of the bin, aiming to prioritize bins with larger remaining capacities and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. Calculate the score for each bin based on the inverse of the rest capacity divided by the item and a constant factor multiplied by the bin number, using a weighted average.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item)) + (0.1 * np.arange(len(bins)))\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin based on the difference between the item and the rest capacity, using the negative reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1 / np.arange(1, len(bins) + 1)) * (bins - item)\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of remaining capacity to item size, adjusted by a factor that considers the bin number and load ratio, aiming to distribute items effectively among bins and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = bins / item\n factor = np.arange(1, len(bins) + 1) / len(bins) * (1 - ratio)\n scores = ratio * factor\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to prioritize the bins with larger capacity and lower load ratio for item assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n load_ratio = bins / np.max(bins)\n scores = (item - bins) / (bins * load_ratio)\n scores[np.where(bins == np.max(bins))] = -np.inf\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_22.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of the item size and the cube of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and cube of bin number\n scores = item / capacities + bin_nums**3\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n\n bin_nums = np.arange(1, len(bins) + 1)\n capacities = bins - item\n\n scores = item / capacities + bin_nums**3\n\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.\n2. Sort the scores in descending order.\n3. Assign the item to the bin with the highest score if its rest capacity is not equal to the maximum capacity.\n4. If all bins have rest capacity equal to the maximum capacity, assign the item to the first bin.\n5. Repeat steps 1-4 for all items until all items are assigned.\n6. Count the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (1 / (bins - item)) + (np.arange(len(bins)) / item)\n scores[bins == max_capacity] = -np.inf\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function assigns scores to each bin by dividing the item size by the difference between the bin's capacity and the item's size, with a penalty factor based on the position of the bin, aiming to prioritize bins with larger remaining capacities and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score is calculated by dividing the item size by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, np.sum(bins)) * np.multiply(np.subtract(item, bins), np.arange(len(bins), 0, -1))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. Calculate the score for each bin based on the inverse of the rest capacity divided by the item and a constant factor multiplied by the bin number, using a weighted average.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item)) + (0.1 * np.arange(len(bins)))\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin based on the difference between the item and the rest capacity, using the negative reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1 / np.arange(1, len(bins) + 1)) * (bins - item)\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of remaining capacity to item size, adjusted by a factor that considers the bin number and load ratio, aiming to distribute items effectively among bins and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = bins / item\n factor = np.arange(1, len(bins) + 1) / len(bins) * (1 - ratio)\n scores = ratio * factor\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to prioritize the bins with larger capacity and lower load ratio for item assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n load_ratio = bins / np.max(bins)\n scores = (item - bins) / (bins * load_ratio)\n scores[np.where(bins == np.max(bins))] = -np.inf\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_23.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of the item size and the cube of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and cube of bin number\n scores = item / capacities + bin_nums**3\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n\n bin_nums = np.arange(1, len(bins) + 1)\n capacities = bins - item\n\n scores = item / capacities + bin_nums**3\n\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.\n2. Sort the scores in descending order.\n3. Assign the item to the bin with the highest score if its rest capacity is not equal to the maximum capacity.\n4. If all bins have rest capacity equal to the maximum capacity, assign the item to the first bin.\n5. Repeat steps 1-4 for all items until all items are assigned.\n6. Count the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (1 / (bins - item)) + (np.arange(len(bins)) / item)\n scores[bins == max_capacity] = -np.inf\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function assigns scores to each bin by dividing the item size by the difference between the bin's capacity and the item's size, with a penalty factor based on the position of the bin, aiming to prioritize bins with larger remaining capacities and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the item size divided by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index; the main steps involve calculating the new scores using modified parameter settings and then assigning the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / np.sum(bins)) * (item - bins) * np.arange(len(bins), 0, -1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. Calculate the score for each bin based on the inverse of the rest capacity divided by the item and a constant factor multiplied by the bin number, using a weighted average.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item)) + (0.1 * np.arange(len(bins)))\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin based on the difference between the item and the rest capacity, using the negative reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1 / np.arange(1, len(bins) + 1)) * (bins - item)\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of remaining capacity to item size, adjusted by a factor that considers the bin number and load ratio, aiming to distribute items effectively among bins and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = bins / item\n factor = np.arange(1, len(bins) + 1) / len(bins) * (1 - ratio)\n scores = ratio * factor\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to prioritize the bins with larger capacity and lower load ratio for item assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n load_ratio = bins / np.max(bins)\n scores = (item - bins) / (bins * load_ratio)\n scores[np.where(bins == np.max(bins))] = -np.inf\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_24.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of the item size and the cube of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and cube of bin number\n scores = item / capacities + bin_nums**3\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n\n bin_nums = np.arange(1, len(bins) + 1)\n capacities = bins - item\n\n scores = item / capacities + bin_nums**3\n\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.\n2. Sort the scores in descending order.\n3. Assign the item to the bin with the highest score if its rest capacity is not equal to the maximum capacity.\n4. If all bins have rest capacity equal to the maximum capacity, assign the item to the first bin.\n5. Repeat steps 1-4 for all items until all items are assigned.\n6. Count the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (1 / (bins - item)) + (np.arange(len(bins)) / item)\n scores[bins == max_capacity] = -np.inf\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function assigns scores to each bin by dividing the item size by the difference between the bin's capacity and the item's size, with a penalty factor based on the position of the bin, aiming to prioritize bins with larger remaining capacities and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the item size divided by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index; the main steps involve calculating the new scores using modified parameter settings and then assigning the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / np.sum(bins)) * (item - bins) * np.arange(len(bins), 0, -1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. Calculate the score for each bin based on the inverse of the rest capacity divided by the item and a constant factor multiplied by the bin number, using a weighted average.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item)) + (0.1 * np.arange(len(bins)))\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin based on the difference between the item and the rest capacity, using the negative reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1 / np.arange(1, len(bins) + 1)) * (bins - item)\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of remaining capacity to item size, adjusted by a factor that considers the bin number and load ratio, aiming to distribute items effectively among bins and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = bins / item\n factor = np.arange(1, len(bins) + 1) / len(bins) * (1 - ratio)\n scores = ratio * factor\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to prioritize the bins with larger capacity and lower load ratio for item assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n load_ratio = bins / np.max(bins)\n scores = (item - bins) / (bins * load_ratio)\n scores[np.where(bins == np.max(bins))] = -np.inf\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number, using a weighted average with different weights for each factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.array([1 / (i + 1) for i in range(len(bins))]) # Weights for each bin number\n \n rest_capacity = bins - item\n rest_capacity[rest_capacity == max(bins)] = 0 # If rest capacity equals maximum capacity, set it to 0\n \n inverse_rest_capacity = 1 / rest_capacity\n scores = np.average([inverse_rest_capacity, weights], axis=0, weights=[0.7, 0.3]) # Weighted average\n \n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_25.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the ratio between the item size and the bin's remaining capacity, while considering a penalty for bins with lower indices and a bonus for bins with larger remaining capacities, aiming to balance capacity utilization and prioritize bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n\n # Calculate the score based on the ratio between item size and remaining capacity\n scores = item / remaining_capacities\n\n # Apply a penalty for bins with lower indices\n scores -= indices\n\n # Apply a bonus for bins with larger remaining capacities\n scores += remaining_capacities\n\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a weighted combination of the item size and the cube of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and cube of bin number\n scores = item / capacities + bin_nums**3\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n\n bin_nums = np.arange(1, len(bins) + 1)\n capacities = bins - item\n\n scores = item / capacities + bin_nums**3\n\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "New algorithm:\n1. Calculate the score for each bin based on the inverse of the rest capacity and the cube root of the bin number, using a weighted average.\n2. Return the scores for the bins for assignment.}\n\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n cube_root_bin_number = np.cbrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, cube_root_bin_number)), axis=1)\n \n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n cube_root_bin_number = np.cbrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, cube_root_bin_number)), axis=1)\n \n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.\n2. Sort the scores in descending order.\n3. Assign the item to the bin with the highest score if its rest capacity is not equal to the maximum capacity.\n4. If all bins have rest capacity equal to the maximum capacity, assign the item to the first bin.\n5. Repeat steps 1-4 for all items until all items are assigned.\n6. Count the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (1 / (bins - item)) + (np.arange(len(bins)) / item)\n scores[bins == max_capacity] = -np.inf\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average, and subtract the natural logarithm of the bin index multiplied by the remaining capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n scores = (1 / remaining_capacity) * np.sqrt(bin_indices) - np.log(bin_indices) * (remaining_capacity / max_capacity)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function assigns scores to each bin by dividing the item size by the difference between the bin's capacity and the item's size, with a penalty factor based on the position of the bin, aiming to prioritize bins with larger remaining capacities and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the item size divided by the sum of the rest capacities, multiplied by the difference between the item size and the rest capacity, multiplied by a decreasing index; the main steps involve calculating the new scores using modified parameter settings and then assigning the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / np.sum(bins)) * (item - bins) * np.arange(len(bins), 0, -1)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. Calculate the score for each bin based on the inverse of the rest capacity divided by the item and a constant factor multiplied by the bin number, using a weighted average.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item)) + (0.1 * np.arange(len(bins)))\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin based on the difference between the item and the rest capacity, using the negative reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1 / np.arange(1, len(bins) + 1)) * (bins - item)\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of remaining capacity to item size, adjusted by a factor that considers the bin number and load ratio, aiming to distribute items effectively among bins and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = bins / item\n factor = np.arange(1, len(bins) + 1) / len(bins) * (1 - ratio)\n scores = ratio * factor\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity, dividing it by the product of the bin capacity and the bin's square root of the load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * np.sqrt(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final score will also consider a penalty factor for bins with higher indices to encourage the utilization of lower-indexed bins, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the load ratios for each bin\n load_ratios = 1 - bins / np.max(bins)\n \n # Calculate the scores for each bin\n scores = (bins - item) / (item * load_ratios)\n \n # Set scores of bins with rest capacity equal to maximum capacity to -inf\n scores[bins == np.max(bins)] = -np.inf\n \n # Add penalty factor for higher-indexed bins\n penalty_factor = np.arange(len(bins))\n scores -= penalty_factor\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to prioritize the bins with larger capacity and lower load ratio for item assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n load_ratio = bins / np.max(bins)\n scores = (item - bins) / (bins * load_ratio)\n scores[np.where(bins == np.max(bins))] = -np.inf\n return scores",
"objective": 0.03944,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_3.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the inverse of the bin number and a decreasing term, aiming to distribute items evenly across all bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = len(bins)\n bin_range = np.arange(1, bin_num + 1)\n remaining_capacity = bins - item\n ratios = item / remaining_capacity\n weights = 1 / (bin_range**2)\n decreasing_terms = np.exp(-bin_range)\n scores = ratios * weights * decreasing_terms\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "I",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n # Calculate scores for each bin\n for i, capacity in enumerate(bins):\n if capacity == item:\n scores[i] = -1\n elif capacity > item:\n scores[i] = item - capacity\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Combining the scoring methods used in the existing algorithms, the new algorithm will calculate the scores for each bin based on the ratio between the item size and the remaining capacity, taking into account a weighted average using the reciprocal of the bin number and the square of the item size, as well as considering the number of items already assigned to each bin and aiming for an even distribution across all bins, ultimately minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.reciprocal(np.arange(1, len(bins)+1))\n item_size_sq = np.square(item)\n remaining_capacity = bins - item\n \n scores = (item_size_sq / remaining_capacity) * weights\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on its rest capacity and/or the ratio of item size to capacity, and then assign the item to the bin with the maximum score.}\n\n{New algorithm:}\n\n{1. Calculate the score for each bin based on the logarithm of the rest capacity and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.arange(len(bins))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the product of its rest capacity and the logarithm of the item size, using a weighted average.\n2. Sort the bins in descending order of their scores.\n3. Assign the item to the first bin in the sorted list that has a rest capacity smaller than the maximum capacity and update its rest capacity accordingly.\n4. Repeat steps 2 and 3 until all items have been assigned to bins.\n5. Calculate the number of used bins as the total number of bins minus the number of bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.log(item)).mean()\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the remaining capacity to the item's value, with higher weights assigned to bins with lower indices, and assigns the item to the bin with the maximum score, minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n capacity_ratio = bins / item\n indices = np.arange(num_bins)\n weights = 1 / (indices + 1) # Higher weights assigned to bins with lower indices\n\n scores = capacity_ratio * weights\n scores[bins == np.max(bins)] = 0 # Exclude bins with maximum capacity from being used\n\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "My new algorithm will calculate the score for each bin based on the ratio of the item size to the remaining capacity, taking into account the inverse of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "New algorithm:\n1. Calculate the score for each bin based on the sum of the bin's rest capacity and the item size cubed, using the inverse of the square root of the bin number as the weight.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.sqrt(np.arange(1, len(bins)+1))\n rest_capacity = bins - item\n scores = rest_capacity + item**3 * weights\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins, but additionally considers the number of items already assigned to each bin to adjust the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = bin_capacity - item - np.sum(bins[:i])\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins based on the product of the item size, the inverse of the bin capacity, and a logarithmic function of the bin number, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) \n max_capacity = np.amax(bins)\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = item * (1 / bins[i]) * np.log(i+1)\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "\nThe common backbone idea in the provided algorithms is to calculate scores for each bin based on some ratio or difference involving the remaining capacity and the item size, and then assign the item to the bin with the maximum score. }\n\n{My new algorithm assigns scores to the bins based on the ratio between the remaining capacity and the item size, prioritizing bins with lower indices, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) * (1 / np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the sum of the bin's rest capacity and the item size squared, using the inverse of the bin number squared as the weight.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.square(np.arange(1, len(bins)+1))\n scores = bins + np.square(item) * weights\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the square root of the rest capacity and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) + np.arange(len(bins))\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) + np.arange(len(bins))\n return scores",
"objective": 0.04528,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_4.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the inverse of the bin number and a decreasing term, aiming to distribute items evenly across all bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = len(bins)\n bin_range = np.arange(1, bin_num + 1)\n remaining_capacity = bins - item\n ratios = item / remaining_capacity\n weights = 1 / (bin_range**2)\n decreasing_terms = np.exp(-bin_range)\n scores = ratios * weights * decreasing_terms\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "I",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n # Calculate scores for each bin\n for i, capacity in enumerate(bins):\n if capacity == item:\n scores[i] = -1\n elif capacity > item:\n scores[i] = item - capacity\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Combining the scoring methods used in the existing algorithms, the new algorithm will calculate the scores for each bin based on the ratio between the item size and the remaining capacity, taking into account a weighted average using the reciprocal of the bin number and the square of the item size, as well as considering the number of items already assigned to each bin and aiming for an even distribution across all bins, ultimately minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.reciprocal(np.arange(1, len(bins)+1))\n item_size_sq = np.square(item)\n remaining_capacity = bins - item\n \n scores = (item_size_sq / remaining_capacity) * weights\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the bin number divided by the remaining capacity of the bin, aiming to assign items to bins with more remaining capacity first.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (item * np.arange(1, len(bins) + 1))).astype(int)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on its rest capacity and/or the ratio of item size to capacity, and then assign the item to the bin with the maximum score.}\n\n{New algorithm:}\n\n{1. Calculate the score for each bin based on the logarithm of the rest capacity and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.arange(len(bins))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the product of its rest capacity and the logarithm of the item size, using a weighted average.\n2. Sort the bins in descending order of their scores.\n3. Assign the item to the first bin in the sorted list that has a rest capacity smaller than the maximum capacity and update its rest capacity accordingly.\n4. Repeat steps 2 and 3 until all items have been assigned to bins.\n5. Calculate the number of used bins as the total number of bins minus the number of bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.log(item)).mean()\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the remaining capacity to the item's value, with higher weights assigned to bins with lower indices, and assigns the item to the bin with the maximum score, minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n capacity_ratio = bins / item\n indices = np.arange(num_bins)\n weights = 1 / (indices + 1) # Higher weights assigned to bins with lower indices\n\n scores = capacity_ratio * weights\n scores[bins == np.max(bins)] = 0 # Exclude bins with maximum capacity from being used\n\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "My new algorithm will calculate the score for each bin based on the ratio of the item size to the remaining capacity, taking into account the inverse of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "New algorithm:\n1. Calculate the score for each bin based on the sum of the bin's rest capacity and the item size cubed, using the inverse of the square root of the bin number as the weight.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.sqrt(np.arange(1, len(bins)+1))\n rest_capacity = bins - item\n scores = rest_capacity + item**3 * weights\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins, but additionally considers the number of items already assigned to each bin to adjust the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = bin_capacity - item - np.sum(bins[:i])\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins based on the product of the item size, the inverse of the bin capacity, and a logarithmic function of the bin number, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) \n max_capacity = np.amax(bins)\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = item * (1 / bins[i]) * np.log(i+1)\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "\nThe common backbone idea in the provided algorithms is to calculate scores for each bin based on some ratio or difference involving the remaining capacity and the item size, and then assign the item to the bin with the maximum score. }\n\n{My new algorithm assigns scores to the bins based on the ratio between the remaining capacity and the item size, prioritizing bins with lower indices, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) * (1 / np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the sum of the bin's rest capacity and the item size squared, using the inverse of the bin number squared as the weight.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.square(np.arange(1, len(bins)+1))\n scores = bins + np.square(item) * weights\n return scores",
"objective": 0.04507,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_5.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Using the remaining capacity and considering penalties for bins at maximum capacity, the new algorithm calculates the scores as the ratio between the item size and the remaining capacity, giving higher weights to bins with lower indices and aiming for an even distribution of items across bins to minimize their usage.",
"code": "import numpy as np\ndef score(item, bins):\n remaining_cap = bins - item\n max_cap = np.max(bins)\n penalty = (remaining_cap == max_cap).astype(np.float32)\n idx = np.arange(len(bins))\n weights = (1 - penalty) / (1 + idx)\n scores = item / remaining_cap * weights\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the inverse of the bin number and a decreasing term, aiming to distribute items evenly across all bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = len(bins)\n bin_range = np.arange(1, bin_num + 1)\n remaining_capacity = bins - item\n ratios = item / remaining_capacity\n weights = 1 / (bin_range**2)\n decreasing_terms = np.exp(-bin_range)\n scores = ratios * weights * decreasing_terms\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "I",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n # Calculate scores for each bin\n for i, capacity in enumerate(bins):\n if capacity == item:\n scores[i] = -1\n elif capacity > item:\n scores[i] = item - capacity\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Combining the scoring methods used in the existing algorithms, the new algorithm will calculate the scores for each bin based on the ratio between the item size and the remaining capacity, taking into account a weighted average using the reciprocal of the bin number and the square of the item size, as well as considering the number of items already assigned to each bin and aiming for an even distribution across all bins, ultimately minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.reciprocal(np.arange(1, len(bins)+1))\n item_size_sq = np.square(item)\n remaining_capacity = bins - item\n \n scores = (item_size_sq / remaining_capacity) * weights\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the bin number divided by the remaining capacity of the bin, aiming to assign items to bins with more remaining capacity first.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (item * np.arange(1, len(bins) + 1))).astype(int)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on its rest capacity and/or the ratio of item size to capacity, and then assign the item to the bin with the maximum score.}\n\n{New algorithm:}\n\n{1. Calculate the score for each bin based on the logarithm of the rest capacity and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.arange(len(bins))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the product of its rest capacity and the logarithm of the item size, using a weighted average.\n2. Sort the bins in descending order of their scores.\n3. Assign the item to the first bin in the sorted list that has a rest capacity smaller than the maximum capacity and update its rest capacity accordingly.\n4. Repeat steps 2 and 3 until all items have been assigned to bins.\n5. Calculate the number of used bins as the total number of bins minus the number of bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.log(item)).mean()\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the remaining capacity to the item's value, with higher weights assigned to bins with lower indices, and assigns the item to the bin with the maximum score, minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n capacity_ratio = bins / item\n indices = np.arange(num_bins)\n weights = 1 / (indices + 1) # Higher weights assigned to bins with lower indices\n\n scores = capacity_ratio * weights\n scores[bins == np.max(bins)] = 0 # Exclude bins with maximum capacity from being used\n\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "My new algorithm will calculate the score for each bin based on the ratio of the item size to the remaining capacity, taking into account the inverse of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "New algorithm:\n1. Calculate the score for each bin based on the sum of the bin's rest capacity and the item size cubed, using the inverse of the square root of the bin number as the weight.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.sqrt(np.arange(1, len(bins)+1))\n rest_capacity = bins - item\n scores = rest_capacity + item**3 * weights\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins, but additionally considers the number of items already assigned to each bin to adjust the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = bin_capacity - item - np.sum(bins[:i])\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, taking into account the number of items already assigned to each bin, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n num_bins = len(bins)\n used_bins = np.zeros(num_bins, dtype=bool)\n \n for i in range(num_bins):\n if bins[i] == max_capacity:\n continue\n \n remaining_capacity = max_capacity - bins[i]\n num_items = np.sum(used_bins)\n \n score = (remaining_capacity/item) + num_items\n scores[i] = score\n \n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins based on the product of the item size, the inverse of the bin capacity, and a logarithmic function of the bin number, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) \n max_capacity = np.amax(bins)\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = item * (1 / bins[i]) * np.log(i+1)\n return scores",
"objective": 0.04367,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_6.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to the bins based on the ratio of the item size to the remaining capacity, weighted by a polynomial function of the bin number, aiming to balance the distribution of items across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = float(\"-inf\")\n else:\n scores[i] = (float(item) / remaining_capacity[i]) * (i+1)**2\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Using the remaining capacity and considering penalties for bins at maximum capacity, the new algorithm calculates the scores as the ratio between the item size and the remaining capacity, giving higher weights to bins with lower indices and aiming for an even distribution of items across bins to minimize their usage.",
"code": "import numpy as np\ndef score(item, bins):\n remaining_cap = bins - item\n max_cap = np.max(bins)\n penalty = (remaining_cap == max_cap).astype(np.float32)\n idx = np.arange(len(bins))\n weights = (1 - penalty) / (1 + idx)\n scores = item / remaining_cap * weights\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the inverse of the bin number and a decreasing term, aiming to distribute items evenly across all bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = len(bins)\n bin_range = np.arange(1, bin_num + 1)\n remaining_capacity = bins - item\n ratios = item / remaining_capacity\n weights = 1 / (bin_range**2)\n decreasing_terms = np.exp(-bin_range)\n scores = ratios * weights * decreasing_terms\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "I",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n # Calculate scores for each bin\n for i, capacity in enumerate(bins):\n if capacity == item:\n scores[i] = -1\n elif capacity > item:\n scores[i] = item - capacity\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the difference between the bin capacity and the item size, aiming to prioritize bins with higher remaining capacity and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n ratio = item / remaining_capacities\n weights = bins - item\n \n scores = ratio * weights\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Combining the scoring methods used in the existing algorithms, the new algorithm will calculate the scores for each bin based on the ratio between the item size and the remaining capacity, taking into account a weighted average using the reciprocal of the bin number and the square of the item size, as well as considering the number of items already assigned to each bin and aiming for an even distribution across all bins, ultimately minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.reciprocal(np.arange(1, len(bins)+1))\n item_size_sq = np.square(item)\n remaining_capacity = bins - item\n \n scores = (item_size_sq / remaining_capacity) * weights\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the bin number divided by the remaining capacity of the bin, aiming to assign items to bins with more remaining capacity first.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (item * np.arange(1, len(bins) + 1))).astype(int)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on its rest capacity and/or the ratio of item size to capacity, and then assign the item to the bin with the maximum score.}\n\n{New algorithm:}\n\n{1. Calculate the score for each bin based on the logarithm of the rest capacity and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.arange(len(bins))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the product of its rest capacity and the logarithm of the item size, using a weighted average.\n2. Sort the bins in descending order of their scores.\n3. Assign the item to the first bin in the sorted list that has a rest capacity smaller than the maximum capacity and update its rest capacity accordingly.\n4. Repeat steps 2 and 3 until all items have been assigned to bins.\n5. Calculate the number of used bins as the total number of bins minus the number of bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.log(item)).mean()\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the remaining capacity to the item's value, with higher weights assigned to bins with lower indices, and assigns the item to the bin with the maximum score, minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n capacity_ratio = bins / item\n indices = np.arange(num_bins)\n weights = 1 / (indices + 1) # Higher weights assigned to bins with lower indices\n\n scores = capacity_ratio * weights\n scores[bins == np.max(bins)] = 0 # Exclude bins with maximum capacity from being used\n\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "My new algorithm will calculate the score for each bin based on the ratio of the item size to the remaining capacity, taking into account the inverse of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "New algorithm:\n1. Calculate the score for each bin based on the sum of the bin's rest capacity and the item size cubed, using the inverse of the square root of the bin number as the weight.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.sqrt(np.arange(1, len(bins)+1))\n rest_capacity = bins - item\n scores = rest_capacity + item**3 * weights\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins, but additionally considers the number of items already assigned to each bin to adjust the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = bin_capacity - item - np.sum(bins[:i])\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, taking into account the number of items already assigned to each bin, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n num_bins = len(bins)\n used_bins = np.zeros(num_bins, dtype=bool)\n \n for i in range(num_bins):\n if bins[i] == max_capacity:\n continue\n \n remaining_capacity = max_capacity - bins[i]\n num_items = np.sum(used_bins)\n \n score = (remaining_capacity/item) + num_items\n scores[i] = score\n \n return scores",
"objective": 0.04286,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_7.json
================================================
[
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "The new algorithm modifies the existing algorithm by penalizing bins at maximum capacity with a higher penalty, and then calculates the scores as the ratio between the item size and the remaining capacity multiplied by the modified penalty and weights, aiming to reduce the usage of bins and evenly distribute items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n modified_penalty = np.where(bins == max_capacity, 2, 1)\n remaining_capacity = bins - item\n scores = (item / remaining_capacity) * modified_penalty\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Using the remaining capacity and considering penalties for bins at maximum capacity, the new algorithm calculates the scores as the ratio between the item size and the remaining capacity, giving higher weights to bins with lower indices and aiming for an even distribution of items across bins to minimize their usage.",
"code": "import numpy as np\ndef score(item, bins):\n remaining_cap = bins - item\n max_cap = np.max(bins)\n penalty = (remaining_cap == max_cap).astype(np.float32)\n idx = np.arange(len(bins))\n weights = (1 - penalty) / (1 + idx)\n scores = item / remaining_cap * weights\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio between item size and remaining capacity, penalties for bins at maximum capacity, and a weighted average considering the reciprocal of the bin number and the square of the item size, aiming for an even distribution of items and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(remaining_capacity)\n \n # Calculate ratio between item size and remaining capacity\n ratio = item / remaining_capacity\n \n # Calculate penalties for bins at maximum capacity\n penalties = np.where(remaining_capacity == max_capacity, -np.inf, 0)\n \n # Calculate weighted average\n bin_number_weights = 1 / np.arange(1, len(bins)+1)\n item_size_weights = item**2\n \n weighted_average = (bin_number_weights + item_size_weights) / 2\n \n # Calculate scores for bins\n scores = ratio + penalties + weighted_average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the inverse of the bin number and a decreasing term, aiming to distribute items evenly across all bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = len(bins)\n bin_range = np.arange(1, bin_num + 1)\n remaining_capacity = bins - item\n ratios = item / remaining_capacity\n weights = 1 / (bin_range**2)\n decreasing_terms = np.exp(-bin_range)\n scores = ratios * weights * decreasing_terms\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "I",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n # Calculate scores for each bin\n for i, capacity in enumerate(bins):\n if capacity == item:\n scores[i] = -1\n elif capacity > item:\n scores[i] = item - capacity\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the difference between the bin capacity and the item size, aiming to prioritize bins with higher remaining capacity and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n ratio = item / remaining_capacities\n weights = bins - item\n \n scores = ratio * weights\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n scores = np.zeros(num_bins)\n capacity_ratio = item / bins\n scores = capacity_ratio - np.arange(num_bins) * 0.1\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the bin number squared plus the item size divided by the square root of the bin number, aiming to prioritize bins with higher remaining capacity and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.arange(1, len(bins)+1)**2) + (item / np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the bin number divided by the remaining capacity of the bin, aiming to assign items to bins with more remaining capacity first.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (item * np.arange(1, len(bins) + 1))).astype(int)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score for each bin based on its rest capacity and/or the ratio of item size to capacity, and then assign the item to the bin with the maximum score.}\n\n{New algorithm:}\n\n{1. Calculate the score for each bin based on the logarithm of the rest capacity and the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) + np.arange(len(bins))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the product of its rest capacity and the logarithm of the item size, using a weighted average.\n2. Sort the bins in descending order of their scores.\n3. Assign the item to the first bin in the sorted list that has a rest capacity smaller than the maximum capacity and update its rest capacity accordingly.\n4. Repeat steps 2 and 3 until all items have been assigned to bins.\n5. Calculate the number of used bins as the total number of bins minus the number of bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.log(item)).mean()\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the bin number plus the square root of the item size, aiming to prioritize bins with higher remaining capacity and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (np.arange(1, len(bins)+1)) + np.sqrt(item))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "My new algorithm will calculate the score for each bin based on the ratio of the item size to the remaining capacity, taking into account the inverse of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_8.json
================================================
[
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Using the remaining capacity and considering penalties for bins at maximum capacity, the new algorithm calculates the scores as the ratio between the item size and the remaining capacity, giving higher weights to bins with lower indices and aiming for an even distribution of items across bins to minimize their usage.",
"code": "import numpy as np\ndef score(item, bins):\n remaining_cap = bins - item\n max_cap = np.max(bins)\n penalty = (remaining_cap == max_cap).astype(np.float32)\n idx = np.arange(len(bins))\n weights = (1 - penalty) / (1 + idx)\n scores = item / remaining_cap * weights\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with lower indices, aiming to prioritize bins with higher indices and reduce the usage of low-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n n = bins.shape[0]\n scores = np.zeros(n)\n max_capacity = np.max(bins)\n \n for i in range(n):\n capacity_ratio = item / (bins[i] - item) if bins[i] != max_capacity else 0\n index_penalty = 1 / (i + 1)\n scores[i] = capacity_ratio + index_penalty\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio between item size and remaining capacity, penalties for bins at maximum capacity, and a weighted average considering the reciprocal of the bin number and the square of the item size, aiming for an even distribution of items and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(remaining_capacity)\n \n # Calculate ratio between item size and remaining capacity\n ratio = item / remaining_capacity\n \n # Calculate penalties for bins at maximum capacity\n penalties = np.where(remaining_capacity == max_capacity, -np.inf, 0)\n \n # Calculate weighted average\n bin_number_weights = 1 / np.arange(1, len(bins)+1)\n item_size_weights = item**2\n \n weighted_average = (bin_number_weights + item_size_weights) / 2\n \n # Calculate scores for bins\n scores = ratio + penalties + weighted_average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's normalized load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment, with the added modification of penalizing bins that are at maximum capacity by setting their scores to -np.inf.",
"code": "import numpy as np\n\ndef score(item, bins):\n load_ratios = (bins - item) / bins\n load_ratios[load_ratios == 1] = -np.inf\n scores = (bins - item) / (bins * load_ratios)\n scores[scores == -np.inf] = np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the inverse of the bin number and a decreasing term, aiming to distribute items evenly across all bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = len(bins)\n bin_range = np.arange(1, bin_num + 1)\n remaining_capacity = bins - item\n ratios = item / remaining_capacity\n weights = 1 / (bin_range**2)\n decreasing_terms = np.exp(-bin_range)\n scores = ratios * weights * decreasing_terms\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "I",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n # Calculate scores for each bin\n for i, capacity in enumerate(bins):\n if capacity == item:\n scores[i] = -1\n elif capacity > item:\n scores[i] = item - capacity\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the difference between the bin capacity and the item size, aiming to prioritize bins with higher remaining capacity and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n ratio = item / remaining_capacities\n weights = bins - item\n \n scores = ratio * weights\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n scores = np.zeros(num_bins)\n capacity_ratio = item / bins\n scores = capacity_ratio - np.arange(num_bins) * 0.1\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the bin number squared plus the item size divided by the square root of the bin number, aiming to prioritize bins with higher remaining capacity and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.arange(1, len(bins)+1)**2) + (item / np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the bin number divided by the remaining capacity of the bin, aiming to assign items to bins with more remaining capacity first.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (item * np.arange(1, len(bins) + 1))).astype(int)\n return scores",
"objective": 0.04206,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run2/population_generation_9.json
================================================
[
{
"algorithm": "New algorithm:}\n\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the square root of the bin number, using a weighted average.}\n\n{2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n sqrt_bin_number = np.sqrt(np.arange(1, non_zero_bin_count + 1))\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, sqrt_bin_number)), axis=1)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate the score for each bin based on a combination of the item's size and the bin's capacity or load ratio.}\n\n{New algorithm: The score function calculates the scores for each bin by taking the difference between the item size and the bin capacity and dividing it by the product of the bin capacity and the bin load ratio, aiming to balance the distribution of items and minimize the usage of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (bins * (1 - item/bins))\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Backbone idea: Assign scores to bins based on the ratio of item size to remaining capacity, taking into account factors such as bin number, bin capacity, and number of items in the bin.}\n\nNew algorithm description: {The new algorithm assigns scores to bins based on a weighted combination of the item size and the square of the bin number, aiming to prioritize larger items and evenly distribute them across bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Bin numbers\n capacities = bins - item # Remaining capacities after assigning the item\n\n # Calculate scores as a weighted combination of item size and square of bin number\n scores = item / capacities + bin_nums**2\n\n # Filter out bins with maximum capacity\n scores[capacities == max(capacities)] = 0\n\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm:}\n{1. Calculate the score for each bin based on the inverse of the rest capacity and the bin number divided by the item, using a weighted average.}\n\n{\nCode:\nimport numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n max_capacity = np.max(bins)\n \n mask = bins != max_capacity\n non_zero_bin_count = np.count_nonzero(mask)\n \n if non_zero_bin_count == 0:\n scores[0] = -np.inf # No feasible bins, assign score as negative infinity\n return scores\n \n inv_rest_capacity = 1 / (bins[mask] - item)\n bin_number = np.arange(1, non_zero_bin_count + 1) / item\n \n scores[mask] = np.average(np.column_stack((inv_rest_capacity, bin_number)), axis=1)\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with higher indices, aiming to prioritize bins with lower indices and reduce the usage of high-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n ratios = item / remaining_capacities\n penalties = indices[::-1]\n \n scores = ratios - penalties\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the remaining capacity divided by the item size and the bin's current load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n load_ratios = 1 - item / bins\n scores = capacities / load_ratios\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Using the remaining capacity and considering penalties for bins at maximum capacity, the new algorithm calculates the scores as the ratio between the item size and the remaining capacity, giving higher weights to bins with lower indices and aiming for an even distribution of items across bins to minimize their usage.",
"code": "import numpy as np\ndef score(item, bins):\n remaining_cap = bins - item\n max_cap = np.max(bins)\n penalty = (remaining_cap == max_cap).astype(np.float32)\n idx = np.arange(len(bins))\n weights = (1 - penalty) / (1 + idx)\n scores = item / remaining_cap * weights\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the difference between the item and the rest capacity, using a weighted average with the reciprocal of the bin number, while penalizing bins at maximum capacity and prioritizing bins with higher indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n scores = (item - bins) * weights\n scores[bins == np.max(bins)] = -np.inf\n scores[bins == np.max(bins) - item] -= np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "1. Calculate the score for each bin based on the item divided by the rest capacity, using a weighted average with the bin number.\n2. If the rest capacity of a bin equals the maximum capacity, assign a score of negative infinity to that bin.\n3. Assign the item to the bin with the maximum score in each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n scores[bins == max_capacity] = float('-inf')\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item)\n \n scores *= np.arange(1, bins.size+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin based on the ratio between the item size and the remaining capacity, with an additional penalty for bins with lower indices, aiming to prioritize bins with higher indices and reduce the usage of low-index bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n n = bins.shape[0]\n scores = np.zeros(n)\n max_capacity = np.max(bins)\n \n for i in range(n):\n capacity_ratio = item / (bins[i] - item) if bins[i] != max_capacity else 0\n index_penalty = 1 / (i + 1)\n scores[i] = capacity_ratio + index_penalty\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item's value to the square of the remaining capacity of the bin, using a weighted average determined by the reciprocal of the bin number, and then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = 1 / np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = item / (remaining_capacity ** 2) * weights\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the ratio between item size and remaining capacity, penalties for bins at maximum capacity, and a weighted average considering the reciprocal of the bin number and the square of the item size, aiming for an even distribution of items and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(remaining_capacity)\n \n # Calculate ratio between item size and remaining capacity\n ratio = item / remaining_capacity\n \n # Calculate penalties for bins at maximum capacity\n penalties = np.where(remaining_capacity == max_capacity, -np.inf, 0)\n \n # Calculate weighted average\n bin_number_weights = 1 / np.arange(1, len(bins)+1)\n item_size_weights = item**2\n \n weighted_average = (bin_number_weights + item_size_weights) / 2\n \n # Calculate scores for bins\n scores = ratio + penalties + weighted_average\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins by multiplying the item size with the inverse of the rest capacity, taking into account the difference between the item size and the rest capacity, and prioritizing bins with lower indices, and returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n N = len(bins)\n \n # Calculate the inverse of rest capacities\n inv_caps = 1 / bins\n \n # Calculate the score for each bin\n scores = item * inv_caps * (item - bins) * np.arange(N, 0, -1)\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity divided by the item size and the bin's normalized load ratio, prioritizing bins with lower load ratios and higher indices, and returning the scores for assignment, with the added modification of penalizing bins that are at maximum capacity by setting their scores to -np.inf.",
"code": "import numpy as np\n\ndef score(item, bins):\n load_ratios = (bins - item) / bins\n load_ratios[load_ratios == 1] = -np.inf\n scores = (bins - item) / (bins * load_ratios)\n scores[scores == -np.inf] = np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on a combination of the item's value and the inverse of the bin number, aiming to distribute items evenly across all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the ratio between the item size and the remaining capacity of each bin, weighted by factors such as the difference between the bin capacity and item size or the bin load ratio.}\n\n{New algorithm: The score function assigns scores to each bin by considering the maximum factor between the ratio of the item size to the remaining capacity and the ratio of the bin load to the bin capacity, aiming to balance the distribution of items while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = np.maximum(item / bins, bins / np.max(bins))\n scores = np.where(bins == np.max(bins), 0, ratios)\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the inverse of the bin number and a decreasing term, aiming to distribute items evenly across all bins while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = len(bins)\n bin_range = np.arange(1, bin_num + 1)\n remaining_capacity = bins - item\n ratios = item / remaining_capacity\n weights = 1 / (bin_range**2)\n decreasing_terms = np.exp(-bin_range)\n scores = ratios * weights * decreasing_terms\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "I",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n # Calculate scores for each bin\n for i, capacity in enumerate(bins):\n if capacity == item:\n scores[i] = -1\n elif capacity > item:\n scores[i] = item - capacity\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the ratio of the item size to the remaining capacity, weighted by the difference between the bin capacity and the item size, aiming to prioritize bins with higher remaining capacity and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n ratio = item / remaining_capacities\n weights = bins - item\n \n scores = ratio * weights\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins * (1 - item/bins) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_1.json
================================================
[
{
"algorithm": "Common backbone idea: Assign a score to each bin based on its capacity and other factors such as ratio, index, proximity to item size, or number of items already assigned.}\n\n{New Algorithm: The score function will assign scores to each bin based on a combination of the bin's remaining capacity, its proximity to the item size, and the ratio of remaining capacity to item size, returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n distances = np.abs(bins - item)\n scores = (bins * ratios) / distances\n \n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on a combination of the ratio between the item size and bin capacity, the proximity to the maximum capacity, and a penalty for bins that have already been used, returning the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / bins\n proximity = (bins.max() - bins) / bins.max()\n penalty = np.where(bins == bins.max(), np.inf, 0)\n scores = ratio + proximity - penalty\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm is a variation of the original algorithm that takes into account the ratio between the item size and the rest capacity of each bin when calculating the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity >= item:\n scores[i] = item / bin_capacity\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the ratio of remaining capacity to item size, prioritizing bins with lower remaining capacity and higher index, and penalizing bins at maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n \n # Assign scores based on the ratio of remaining capacity to item size\n scores = remaining_capacity / item\n \n # Prioritize bins with lower remaining capacity and higher index\n scores += np.arange(len(bins), 0, -1)\n \n # Penalize bins at maximum capacity\n scores[max_capacity == bins] = -np.inf\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the remaining capacity, the number of items already assigned, and a penalty for bins at maximum capacity, then returns the scores for each bin in a numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) + (bins == np.max(bins)) * np.Inf\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin by taking the product of the rest capacity and the inverse of the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(bins, np.reciprocal(np.arange(1, len(bins)+1, dtype=float)))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n\n # Calculate the score for each bin\n for i in range(len(bins)):\n if bins[i] != item:\n scores[i] = 1 / (bins[i] - item)\n \n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n for i, capacity in enumerate(bins):\n # If bin is unused, skip it\n if capacity == item:\n scores[i] = -1\n continue\n # Assign score based on remaining capacity\n scores[i] = 1 / (capacity - item + 1)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "Assign scores based on the ratio of remaining capacity to item size, penalizing bins at maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Create an array of zeros with the same shape as 'bins'\n max_capacity = np.max(bins) # Find the maximum capacity among the bins\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1 # Penalize bins at maximum capacity\n else:\n scores[i] = bins[i] / item # Calculate the score based on the ratio of remaining capacity to item size\n \n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The score function calculates the scores for each bin based on the ratio of its remaining capacity to the number of items already assigned to it, penalizing bins with maximum capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / np.arange(1, len(bins) + 1)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.06359,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the scores for each bin based on the ratio of remaining capacity to item size and the number of items already assigned, prioritizing bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item # calculate remaining capacity of each bin\n num_items_assigned = np.arange(1, len(bins)+1) # calculate number of items already assigned to each bin\n scores = remaining_capacity / item * (1 / num_items_assigned) # calculate scores based on given formula\n scores[bins == np.max(bins)] = -np.inf # set maximum capacity bins to -infinity score\n return scores",
"objective": 0.06439,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "New Algorithm: The score function will assign scores to each bin based on a combination of the bin's remaining capacity, ratio of remaining capacity to item size, proximity to item size, number of items already assigned, and penalize bins with maximum capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n proximity = np.abs(item - remaining_capacity)\n num_assigned = np.arange(1, len(bins)+1)\n penalize = (bins == np.max(bins)).astype(int)\n \n scores = remaining_capacity + ratio + proximity + num_assigned - penalize\n return scores",
"objective": 0.09629,
"other_inf": null
},
{
"algorithm": "The new algorithm will sort the bins in ascending order and assign the item to the bin with the lowest capacity until a bin with maximum capacity is reached, then it will stop assigning and return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n sorted_bins = np.sort(bins)\n used_bins = 0\n scores = np.zeros_like(bins)\n\n for i in range(len(sorted_bins)):\n if sorted_bins[i] == bins.max():\n break\n if sorted_bins[i] >= item:\n scores[i] = sorted_bins[i] - item\n used_bins += 1\n\n return scores",
"objective": 0.0984,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_10.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the inverse of the remaining capacity, subtracting the logarithm of the bin number plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the inverse of the remaining capacity, subtract the logarithm of the bin number plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = item * (1 / remaining_capacities) - np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the square root of the item size to the remaining capacity, multiplied by the inverse of the bin index plus one, and return the scores for assignment. The main steps are to calculate the remaining capacity of each bin, compute the ratio of the square root of the item size to the remaining capacity, multiply it by the inverse of the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item # calculate remaining capacity of each bin\n sqrt_ratio = np.sqrt(item) / remaining_capacity # ratio of square root of item size to remaining capacity\n inverse_bin_index = 1 / (np.arange(len(bins)) + 1) # inverse of bin index plus one\n scores = sqrt_ratio * inverse_bin_index # compute scores for each bin\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the bin index plus one, divided by the remaining capacity raised to the power of two, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (np.arange(len(bins)) + 1)) /\n (bins - item + 1) ** 2).astype(np.float64)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the item size divided by the remaining capacity, multiplied by the index squared, and penalize bins at maximum capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (item / remaining_capacities) * (np.arange(len(bins)) ** 2)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The main algorithm parameter is the item size, bins capacity, and the scoring function which assigns scores to each bin based on the exponential of the sum of the item size and remaining capacity divided by the bin index plus one. \nFor the new algorithm, we will modify the scoring function to assign scores based only on the remaining capacity of the bins, without considering the item size, using an inverse exponential function.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/(item+1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the difference between the item size and the logarithm (base 10) of the bin index plus one, divided by the remaining capacity, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item - np.log10(np.arange(1, len(bins)+1))) / bins).astype(np.float32)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse ratio of the bin index plus one to the remaining capacity raised to the power of three, ensuring a modified scoring system that prioritizes filling smaller capacity bins first, while still considering the uniqueness and distinctness of the scoring system in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n \n # Calculate scores based on the inverse ratio of bin index\n scores = 1.0 / (np.arange(len(bins)) + 1)\n \n # Raise the remaining capacity of each bin to the power of three\n scores *= np.power(bins, 3)\n \n # Disable bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0.0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the quotient of the item size divided by the remaining capacity plus one raised to the power of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + 1)) ** (np.arange(len(bins)) + 1) # Compute scores for bins\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the sum of the remaining capacity and bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the inverse of the ratio of the item size to the remaining capacity, the square of the bin number, and the ratio of the remaining capacity to the item size, ensuring a different scoring system than the existing algorithm while aiming to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.square(np.arange(1, bins.size + 1))) * ((bins - item) / item)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the bin index plus one, without excluding any bins based on maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.04125,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_11.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the inverse of the remaining capacity, subtracting the logarithm of the bin number plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the inverse of the remaining capacity, subtract the logarithm of the bin number plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = item * (1 / remaining_capacities) - np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the square root of the item size to the remaining capacity, multiplied by the inverse of the bin index plus one, and return the scores for assignment. The main steps are to calculate the remaining capacity of each bin, compute the ratio of the square root of the item size to the remaining capacity, multiply it by the inverse of the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item # calculate remaining capacity of each bin\n sqrt_ratio = np.sqrt(item) / remaining_capacity # ratio of square root of item size to remaining capacity\n inverse_bin_index = 1 / (np.arange(len(bins)) + 1) # inverse of bin index plus one\n scores = sqrt_ratio * inverse_bin_index # compute scores for each bin\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the bin index plus one, divided by the remaining capacity raised to the power of two, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (np.arange(len(bins)) + 1)) /\n (bins - item + 1) ** 2).astype(np.float64)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the item size divided by the remaining capacity, multiplied by the index squared, and penalize bins at maximum capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (item / remaining_capacities) * (np.arange(len(bins)) ** 2)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm scores the bins based on the inverse exponential of the remaining capacity only, without considering the item size, using the formula scores = np.exp(-bins).",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins)\n\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the difference between the item size and the logarithm (base 10) of the bin index plus one, divided by the remaining capacity, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item - np.log10(np.arange(1, len(bins)+1))) / bins).astype(np.float32)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse ratio of the bin index plus one to the remaining capacity raised to the power of three, ensuring a modified scoring system that prioritizes filling smaller capacity bins first, while still considering the uniqueness and distinctness of the scoring system in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n \n # Calculate scores based on the inverse ratio of bin index\n scores = 1.0 / (np.arange(len(bins)) + 1)\n \n # Raise the remaining capacity of each bin to the power of three\n scores *= np.power(bins, 3)\n \n # Disable bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0.0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the quotient of the item size divided by the remaining capacity plus one raised to the power of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + 1)) ** (np.arange(len(bins)) + 1) # Compute scores for bins\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the sum of the remaining capacity and bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the inverse of the ratio of the item size to the remaining capacity, the square of the bin number, and the ratio of the remaining capacity to the item size, ensuring a different scoring system than the existing algorithm while aiming to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.square(np.arange(1, bins.size + 1))) * ((bins - item) / item)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the bin index plus one, without excluding any bins based on maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.04125,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_12.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the inverse of the remaining capacity, subtracting the logarithm of the bin number plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the inverse of the remaining capacity, subtract the logarithm of the bin number plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = item * (1 / remaining_capacities) - np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Sum of squared divided by remaining capacity minus index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.square(bins) / (bins - item)) - (np.arange(len(bins)) * item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the square root of the remaining capacity to twice the bin index plus one, ensuring a unique scoring system that prioritizes filling larger capacity bins first while considering the distinctness of the scoring system in the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (2*np.arange(1,len(bins)+1) + 1)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the ratio between the item and the remaining capacity of the bin, and then assigns the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the difference between the item size and the logarithm (base 10) of the bin index plus one, divided by the remaining capacity, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item - np.log10(np.arange(1, len(bins)+1))) / bins).astype(np.float32)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse ratio of the bin index plus one to the remaining capacity raised to the power of three, ensuring a modified scoring system that prioritizes filling smaller capacity bins first, while still considering the uniqueness and distinctness of the scoring system in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n \n # Calculate scores based on the inverse ratio of bin index\n scores = 1.0 / (np.arange(len(bins)) + 1)\n \n # Raise the remaining capacity of each bin to the power of three\n scores *= np.power(bins, 3)\n \n # Disable bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0.0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the quotient of the item size divided by the remaining capacity plus one raised to the power of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + 1)) ** (np.arange(len(bins)) + 1) # Compute scores for bins\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the inverse of the remaining capacity, ensuring a distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (1 / bins)).astype(int)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the inverse of the ratio of the item size to the remaining capacity, the square of the bin number, and the ratio of the remaining capacity to the item size, ensuring a different scoring system than the existing algorithm while aiming to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.square(np.arange(1, bins.size + 1))) * ((bins - item) / item)\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_13.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the inverse of the remaining capacity, subtracting the logarithm of the bin number plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the inverse of the remaining capacity, subtract the logarithm of the bin number plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = item * (1 / remaining_capacities) - np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Sum of squared divided by remaining capacity minus index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.square(bins) / (bins - item)) - (np.arange(len(bins)) * item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the square root of the remaining capacity to twice the bin index plus one, ensuring a unique scoring system that prioritizes filling larger capacity bins first while considering the distinctness of the scoring system in the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (2*np.arange(1,len(bins)+1) + 1)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the ratio between the item and the remaining capacity of the bin, and then assigns the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the difference between the item size and the logarithm (base 10) of the bin index plus one, divided by the remaining capacity, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item - np.log10(np.arange(1, len(bins)+1))) / bins).astype(np.float32)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse ratio of the bin index plus one to the remaining capacity raised to the power of three, ensuring a modified scoring system that prioritizes filling smaller capacity bins first, while still considering the uniqueness and distinctness of the scoring system in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n \n # Calculate scores based on the inverse ratio of bin index\n scores = 1.0 / (np.arange(len(bins)) + 1)\n \n # Raise the remaining capacity of each bin to the power of three\n scores *= np.power(bins, 3)\n \n # Disable bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0.0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the quotient of the item size divided by the remaining capacity plus one raised to the power of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + 1)) ** (np.arange(len(bins)) + 1) # Compute scores for bins\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the item size and the inverse of the remaining capacity, ensuring a distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (1 / bins)).astype(int)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_14.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the inverse of the remaining capacity, subtracting the logarithm of the bin number plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the inverse of the remaining capacity, subtract the logarithm of the bin number plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = item * (1 / remaining_capacities) - np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Sum of squared divided by remaining capacity minus index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.square(bins) / (bins - item)) - (np.arange(len(bins)) * item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the ratio between the item and the remaining capacity of the bin, and then assigns the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the difference between the item size and the logarithm (base 10) of the bin index plus one, divided by the remaining capacity, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item - np.log10(np.arange(1, len(bins)+1))) / bins).astype(np.float32)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the sum of the item size and bin capacity to the cube root of the bin index, excluding bins with rest capacity equal to the maximum capacity, and return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / np.cbrt(range(1, len(bins)+1))\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the remaining capacity to the cube root of the bin index plus one, excluding bins with rest capacity equal to the maximum capacity, and return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.power(np.arange(1, len(bins)+1), 1/3))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the quotient of the item size divided by the remaining capacity plus one raised to the power of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + 1)) ** (np.arange(len(bins)) + 1) # Compute scores for bins\n return scores",
"objective": 0.04085,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_15.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Sum of squared divided by remaining capacity minus index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.square(bins) / (bins - item)) - (np.arange(len(bins)) * item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the ratio between the item and the remaining capacity of the bin, and then assigns the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the difference between the item size and the logarithm (base 10) of the bin index plus one, divided by the remaining capacity, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item - np.log10(np.arange(1, len(bins)+1))) / bins).astype(np.float32)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n used_bins = np.where(bins != max_capacity)[0]\n scores[used_bins] = ((max_capacity - bins[used_bins]) / max_capacity) * item\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the sum of the item size and bin capacity to the cube root of the bin index, excluding bins with rest capacity equal to the maximum capacity, and return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / np.cbrt(range(1, len(bins)+1))\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04065,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_16.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Sum of squared divided by remaining capacity minus index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.square(bins) / (bins - item)) - (np.arange(len(bins)) * item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the ratio between the item and the remaining capacity of the bin, and then assigns the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the inverse of the remaining capacity, the logarithm (base 2) of the item size, and the bin number, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log2(item) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the difference between the item size and the logarithm (base 10) of the bin index plus one, divided by the remaining capacity, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item - np.log10(np.arange(1, len(bins)+1))) / bins).astype(np.float32)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n used_bins = np.where(bins != max_capacity)[0]\n scores[used_bins] = ((max_capacity - bins[used_bins]) / max_capacity) * item\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_17.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy()\n capacities[capacities == item] = -1 # Ignore bins with exact capacity\n scores = (capacities - item) / (capacities // item) # Calculate scores\n scores = np.where(capacities == 0, 0, scores) # Assign 0 score to bins with no capacity\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Sum of squared divided by remaining capacity minus index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.square(bins) / (bins - item)) - (np.arange(len(bins)) * item)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the ratio between the item and the remaining capacity of the bin, and then assigns the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the inverse of the remaining capacity, the logarithm (base 2) of the item size, and the bin number, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log2(item) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for bins based on the remaining capacity of the bin and the item's size.}\n\n{New algorithm description: Assign scores to bins based on the logarithm (base 2) of the item size divided by the square root of the remaining capacity, multiplied by the bin number, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log2(item / np.sqrt(bins))*np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n used_bins = np.where(bins != max_capacity)[0]\n scores[used_bins] = ((max_capacity - bins[used_bins]) / max_capacity) * item\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_18.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size, and extends the scoring by dividing the remaining capacity of each bin by the sum of the sizes of all remaining items, effectively favoring bins with a smaller remaining capacity and larger remaining items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape) # Initialize scores array\n \n # Calculate scores for each bin\n scores[bins != item] = bins[bins != item] % item\n scores[bins == item] = item\n \n # Extend scoring by dividing remaining capacity of each bin by sum of sizes of remaining items\n remaining_items = np.sum(bins[bins > item]) - item\n scores[bins != item] += bins[bins != item] / remaining_items\n \n return scores",
"objective": 0.01801,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: \n- item (the item that needs to be assigned to a bin)\n- bins (the set of bins available for assigning the item)\n\nNew algorithm description: \nThe new algorithm modifies the score function by assigning different scores based on the remaining capacity of each bin compared to the item, with the goal of minimizing the number of used bins.\nThe main steps of the new algorithm are: \n- Clone the bins set as capacities.\n- Set the capacity of bins with exact capacity equal to item as -1 to ignore them.\n- Calculate scores by subtracting the item from each capacity and dividing it by the integer division of capacity by item.\n- Set scores of bins with no capacity to 0.\n- Return the scores. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy()\n capacities[capacities == item] = -1\n scores = (capacities - item) / (capacities // item)\n scores[capacities == 0] = 0\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the exponential (base e) of the inverse of the ratio between the remaining capacity and the item size, divided by the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(1 / (bins - item) / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the ratio of the remaining capacity to the item size, subtracting the product of the bin number and the square root of the remaining capacity, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the inverse of the ratio of the remaining capacity to the item size, subtract the product of the bin number and the square root of the remaining capacity, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n scores = (1 / ratio) - (bin_number * np.sqrt(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins by calculating the logarithm of the ratio between the item and the remaining capacity of the bin, multiplied by the square root of the bin index plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the ratio between the item and the remaining capacity of the bin, and then assigns the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the inverse of the remaining capacity, the logarithm (base 2) of the item size, and the bin number, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log2(item) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for bins based on the remaining capacity of the bin and the item's size.}\n\n{New algorithm description: Assign scores to bins based on the logarithm (base 2) of the item size divided by the square root of the remaining capacity, multiplied by the bin number, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log2(item / np.sqrt(bins))*np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_19.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size, and extends the scoring by dividing the remaining capacity of each bin by the sum of the sizes of all remaining items, effectively favoring bins with a smaller remaining capacity and larger remaining items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape) # Initialize scores array\n \n # Calculate scores for each bin\n scores[bins != item] = bins[bins != item] % item\n scores[bins == item] = item\n \n # Extend scoring by dividing remaining capacity of each bin by sum of sizes of remaining items\n remaining_items = np.sum(bins[bins > item]) - item\n scores[bins != item] += bins[bins != item] / remaining_items\n \n return scores",
"objective": 0.01801,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: \n- item (the item that needs to be assigned to a bin)\n- bins (the set of bins available for assigning the item)\n\nNew algorithm description: \nThe new algorithm modifies the score function by assigning different scores based on the remaining capacity of each bin compared to the item, with the goal of minimizing the number of used bins.\nThe main steps of the new algorithm are: \n- Clone the bins set as capacities.\n- Set the capacity of bins with exact capacity equal to item as -1 to ignore them.\n- Calculate scores by subtracting the item from each capacity and dividing it by the integer division of capacity by item.\n- Set scores of bins with no capacity to 0.\n- Return the scores. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy()\n capacities[capacities == item] = -1\n scores = (capacities - item) / (capacities // item)\n scores[capacities == 0] = 0\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the exponential (base e) of the inverse of the ratio between the remaining capacity and the item size, divided by the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(1 / (bins - item) / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the ratio of the remaining capacity to the item size, subtracting the product of the bin number and the square root of the remaining capacity, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the inverse of the ratio of the remaining capacity to the item size, subtract the product of the bin number and the square root of the remaining capacity, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n scores = (1 / ratio) - (bin_number * np.sqrt(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the sum of the item divided by the remaining capacity of the bin, multiplied by the bin index plus the square of the item's square root.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.arange(len(bins)) + 1) + item**0.5 ** 2\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins by calculating the logarithm of the ratio between the item and the remaining capacity of the bin, multiplied by the square root of the bin index plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the difference between the cube root of the item size divided by the square root of the remaining capacity, subtracted by the product of the bin number and the logarithm (base 10) of the remaining capacity. Main steps: Calculate the remaining capacity of each bin, compute the cube root of the item size divided by the square root of the remaining capacity, multiply the bin number by the logarithm (base 10) of the remaining capacity, and subtract the two values to obtain the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n cube_root = np.cbrt(item) / np.sqrt(remaining_capacity)\n log_value = np.log10(remaining_capacity)\n bin_number = np.arange(len(bins))\n scores = cube_root - (bin_number * log_value)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the ratio between the item and the remaining capacity of the bin, and then assigns the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the inverse of the remaining capacity, the logarithm (base 2) of the item size, and the bin number, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log2(item) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_2.json
================================================
[
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on its capacity and other factors such as ratio, index, proximity to item size, or number of items already assigned.}\n\n{New Algorithm: The score function will assign scores to each bin based on a combination of the bin's remaining capacity, its proximity to the item size, and the ratio of remaining capacity to item size, returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n distances = np.abs(bins - item)\n scores = (bins * ratios) / distances\n \n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the ratio of remaining capacity to the square of the item size, penalizing bins at maximum capacity and prioritizing bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)**2) - (bins == np.max(bins))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the sum of the rest capacity and the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n index = np.arange(len(bins))\n scores = 1 / (rest_capacity + index)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the ratio of remaining capacity to item size, prioritizing bins with lower remaining capacity and higher index, and penalizing bins at maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n \n # Assign scores based on the ratio of remaining capacity to item size\n scores = remaining_capacity / item\n \n # Prioritize bins with lower remaining capacity and higher index\n scores += np.arange(len(bins), 0, -1)\n \n # Penalize bins at maximum capacity\n scores[max_capacity == bins] = -np.inf\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the remaining capacity, the number of items already assigned, and a penalty for bins at maximum capacity, then returns the scores for each bin in a numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) + (bins == np.max(bins)) * np.Inf\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on certain criteria and choose the bin with the highest score for item assignment.}\n\n{New algorithm: Calculate the score for each bin by considering the remaining capacity of the bin divided by the product of the bin index and the item size, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(len(bins)) + 1) / item\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin by taking the product of the rest capacity and the inverse of the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(bins, np.reciprocal(np.arange(1, len(bins)+1, dtype=float)))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by considering the logarithm of the remaining capacity divided by the sum of the bin index and item size, penalizing bins at maximum capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins / (np.arange(len(bins)) + item))\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.05031,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n\n # Calculate the score for each bin\n for i in range(len(bins)):\n if bins[i] != item:\n scores[i] = 1 / (bins[i] - item)\n \n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins, set the score to -1 for bins with rest capacity equal to the maximum capacity, and for the remaining feasible bins, set the score to a value inversely proportional to the remaining capacity, and return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n \n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = -1\n scores[bins != max_capacity] = 1 / remaining_capacity[bins != max_capacity]\n \n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the sum of the rest capacity and the inverse of the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins + 1) / (np.arange(bins.size) + 1)\n scores[bins == item] = 0\n return scores",
"objective": 0.05343,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on both the rest capacity and the inverse of the bin number, using a modified weighting factor, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins/item) + (1/(np.arange(1, len(bins)+1))) * 1000\n scores[bins == item] = 0\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "Assign scores based on the ratio of remaining capacity to item size, penalizing bins at maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Create an array of zeros with the same shape as 'bins'\n max_capacity = np.max(bins) # Find the maximum capacity among the bins\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1 # Penalize bins at maximum capacity\n else:\n scores[i] = bins[i] / item # Calculate the score based on the ratio of remaining capacity to item size\n \n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by considering the square root of the remaining capacity divided by the cube of the sum of the bin index and item size, penalizing bins at maximum capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = 0\n else:\n score = np.sqrt(rest_capacity) / (np.power(i + 1, 3) + np.power(item, 3))\n scores[i] = score\n\n return scores",
"objective": 0.06097,
"other_inf": null
},
{
"algorithm": "The score function calculates the scores for each bin based on the ratio of its remaining capacity to the number of items already assigned to it, penalizing bins with maximum capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / np.arange(1, len(bins) + 1)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.06359,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_20.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size, and extends the scoring by dividing the remaining capacity of each bin by the sum of the sizes of all remaining items, effectively favoring bins with a smaller remaining capacity and larger remaining items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape) # Initialize scores array\n \n # Calculate scores for each bin\n scores[bins != item] = bins[bins != item] % item\n scores[bins == item] = item\n \n # Extend scoring by dividing remaining capacity of each bin by sum of sizes of remaining items\n remaining_items = np.sum(bins[bins > item]) - item\n scores[bins != item] += bins[bins != item] / remaining_items\n \n return scores",
"objective": 0.01801,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: \n- item (the item that needs to be assigned to a bin)\n- bins (the set of bins available for assigning the item)\n\nNew algorithm description: \nThe new algorithm modifies the score function by assigning different scores based on the remaining capacity of each bin compared to the item, with the goal of minimizing the number of used bins.\nThe main steps of the new algorithm are: \n- Clone the bins set as capacities.\n- Set the capacity of bins with exact capacity equal to item as -1 to ignore them.\n- Calculate scores by subtracting the item from each capacity and dividing it by the integer division of capacity by item.\n- Set scores of bins with no capacity to 0.\n- Return the scores. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy()\n capacities[capacities == item] = -1\n scores = (capacities - item) / (capacities // item)\n scores[capacities == 0] = 0\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The modified algorithm calculates the scores by dividing the cube of the item by the remaining capacity multiplied by bin size, then adding the index multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item ** 3) / (bins * (bins - item)) + np.arange(len(bins)) * item\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the square root of the inverse of the remaining capacity, subtracting the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the square root of the inverse of the remaining capacity, subtract the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = item * np.sqrt(1 / remaining_capacity) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the exponential (base e) of the inverse of the ratio between the remaining capacity and the item size, divided by the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(1 / (bins - item) / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the ratio of the remaining capacity to the item size, subtracting the product of the bin number and the square root of the remaining capacity, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the inverse of the ratio of the remaining capacity to the item size, subtract the product of the bin number and the square root of the remaining capacity, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n scores = (1 / ratio) - (bin_number * np.sqrt(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the sum of the item divided by the remaining capacity of the bin, multiplied by the bin index plus the square of the item's square root.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.arange(len(bins)) + 1) + item**0.5 ** 2\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins by calculating the logarithm of the ratio between the item and the remaining capacity of the bin, multiplied by the square root of the bin index plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the difference between the cube root of the item size divided by the square root of the remaining capacity, subtracted by the product of the bin number and the logarithm (base 10) of the remaining capacity. Main steps: Calculate the remaining capacity of each bin, compute the cube root of the item size divided by the square root of the remaining capacity, multiply the bin number by the logarithm (base 10) of the remaining capacity, and subtract the two values to obtain the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n cube_root = np.cbrt(item) / np.sqrt(remaining_capacity)\n log_value = np.log10(remaining_capacity)\n bin_number = np.arange(len(bins))\n scores = cube_root - (bin_number * log_value)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_21.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size, and extends the scoring by dividing the remaining capacity of each bin by the sum of the sizes of all remaining items, effectively favoring bins with a smaller remaining capacity and larger remaining items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape) # Initialize scores array\n \n # Calculate scores for each bin\n scores[bins != item] = bins[bins != item] % item\n scores[bins == item] = item\n \n # Extend scoring by dividing remaining capacity of each bin by sum of sizes of remaining items\n remaining_items = np.sum(bins[bins > item]) - item\n scores[bins != item] += bins[bins != item] / remaining_items\n \n return scores",
"objective": 0.01801,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: \n- item (the item that needs to be assigned to a bin)\n- bins (the set of bins available for assigning the item)\n\nNew algorithm description: \nThe new algorithm modifies the score function by assigning different scores based on the remaining capacity of each bin compared to the item, with the goal of minimizing the number of used bins.\nThe main steps of the new algorithm are: \n- Clone the bins set as capacities.\n- Set the capacity of bins with exact capacity equal to item as -1 to ignore them.\n- Calculate scores by subtracting the item from each capacity and dividing it by the integer division of capacity by item.\n- Set scores of bins with no capacity to 0.\n- Return the scores. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy()\n capacities[capacities == item] = -1\n scores = (capacities - item) / (capacities // item)\n scores[capacities == 0] = 0\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The modified algorithm calculates the scores by dividing the cube of the item by the remaining capacity multiplied by bin size, then adding the index multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item ** 3) / (bins * (bins - item)) + np.arange(len(bins)) * item\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the square root of the inverse of the remaining capacity, subtracting the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the square root of the inverse of the remaining capacity, subtract the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = item * np.sqrt(1 / remaining_capacity) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the exponential (base e) of the inverse of the ratio between the remaining capacity and the item size, divided by the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(1 / (bins - item) / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the ratio of the remaining capacity to the item size, subtracting the product of the bin number and the square root of the remaining capacity, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the inverse of the ratio of the remaining capacity to the item size, subtract the product of the bin number and the square root of the remaining capacity, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n scores = (1 / ratio) - (bin_number * np.sqrt(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the sum of the item divided by the remaining capacity of the bin, multiplied by the bin index plus the square of the item's square root.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.arange(len(bins)) + 1) + item**0.5 ** 2\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins by calculating the logarithm of the ratio between the item and the remaining capacity of the bin, multiplied by the square root of the bin index plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the difference between the cube root of the item size divided by the square root of the remaining capacity, subtracted by the product of the bin number and the logarithm (base 10) of the remaining capacity. Main steps: Calculate the remaining capacity of each bin, compute the cube root of the item size divided by the square root of the remaining capacity, multiply the bin number by the logarithm (base 10) of the remaining capacity, and subtract the two values to obtain the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n cube_root = np.cbrt(item) / np.sqrt(remaining_capacity)\n log_value = np.log10(remaining_capacity)\n bin_number = np.arange(len(bins))\n scores = cube_root - (bin_number * log_value)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity, multiplied by the inverse of the bin index plus three, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (1 / (np.arange(len(bins)) + 1) + 3)\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_22.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size, and extends the scoring by dividing the remaining capacity of each bin by the sum of the sizes of all remaining items, effectively favoring bins with a smaller remaining capacity and larger remaining items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape) # Initialize scores array\n \n # Calculate scores for each bin\n scores[bins != item] = bins[bins != item] % item\n scores[bins == item] = item\n \n # Extend scoring by dividing remaining capacity of each bin by sum of sizes of remaining items\n remaining_items = np.sum(bins[bins > item]) - item\n scores[bins != item] += bins[bins != item] / remaining_items\n \n return scores",
"objective": 0.01801,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the cosine of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin number. Main steps: Calculate the remaining capacity of each bin, compute the cosine of the ratio between the item size and the remaining capacity, take the inverse, and multiply it by the square root of the bin number to obtain the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n cosine_ratio = np.cos(item / remaining_capacity)\n scores = 1 / cosine_ratio * np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.02405,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: \n- item (the item that needs to be assigned to a bin)\n- bins (the set of bins available for assigning the item)\n\nNew algorithm description: \nThe new algorithm modifies the score function by assigning different scores based on the remaining capacity of each bin compared to the item, with the goal of minimizing the number of used bins.\nThe main steps of the new algorithm are: \n- Clone the bins set as capacities.\n- Set the capacity of bins with exact capacity equal to item as -1 to ignore them.\n- Calculate scores by subtracting the item from each capacity and dividing it by the integer division of capacity by item.\n- Set scores of bins with no capacity to 0.\n- Return the scores. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy()\n capacities[capacities == item] = -1\n scores = (capacities - item) / (capacities // item)\n scores[capacities == 0] = 0\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The modified algorithm calculates the scores by dividing the cube of the item by the remaining capacity multiplied by bin size, then adding the index multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item ** 3) / (bins * (bins - item)) + np.arange(len(bins)) * item\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the square root of the inverse of the remaining capacity, subtracting the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the square root of the inverse of the remaining capacity, subtract the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = item * np.sqrt(1 / remaining_capacity) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the exponential (base e) of the inverse of the ratio between the remaining capacity and the item size, divided by the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(1 / (bins - item) / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the ratio of the remaining capacity to the item size, subtracting the product of the bin number and the square root of the remaining capacity, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the inverse of the ratio of the remaining capacity to the item size, subtract the product of the bin number and the square root of the remaining capacity, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n scores = (1 / ratio) - (bin_number * np.sqrt(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the sum of the item divided by the remaining capacity of the bin, multiplied by the bin index plus the square of the item's square root.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.arange(len(bins)) + 1) + item**0.5 ** 2\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins by calculating the logarithm of the ratio between the item and the remaining capacity of the bin, multiplied by the square root of the bin index plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the sum of the cube root of the item size divided by the square of the remaining capacity, subtracted by the logarithm (base 2) of the bin number, ensuring a unique scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(item) / np.square(bins - item)) - np.log2(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_23.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size, and extends the scoring by dividing the remaining capacity of each bin by the sum of the sizes of all remaining items, effectively favoring bins with a smaller remaining capacity and larger remaining items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape) # Initialize scores array\n \n # Calculate scores for each bin\n scores[bins != item] = bins[bins != item] % item\n scores[bins == item] = item\n \n # Extend scoring by dividing remaining capacity of each bin by sum of sizes of remaining items\n remaining_items = np.sum(bins[bins > item]) - item\n scores[bins != item] += bins[bins != item] / remaining_items\n \n return scores",
"objective": 0.01801,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the cosine of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin number. Main steps: Calculate the remaining capacity of each bin, compute the cosine of the ratio between the item size and the remaining capacity, take the inverse, and multiply it by the square root of the bin number to obtain the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n cosine_ratio = np.cos(item / remaining_capacity)\n scores = 1 / cosine_ratio * np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.02405,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: \n- item (the item that needs to be assigned to a bin)\n- bins (the set of bins available for assigning the item)\n\nNew algorithm description: \nThe new algorithm modifies the score function by assigning different scores based on the remaining capacity of each bin compared to the item, with the goal of minimizing the number of used bins.\nThe main steps of the new algorithm are: \n- Clone the bins set as capacities.\n- Set the capacity of bins with exact capacity equal to item as -1 to ignore them.\n- Calculate scores by subtracting the item from each capacity and dividing it by the integer division of capacity by item.\n- Set scores of bins with no capacity to 0.\n- Return the scores. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy()\n capacities[capacities == item] = -1\n scores = (capacities - item) / (capacities // item)\n scores[capacities == 0] = 0\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The modified algorithm calculates the scores by dividing the cube of the item by the remaining capacity multiplied by bin size, then adding the index multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item ** 3) / (bins * (bins - item)) + np.arange(len(bins)) * item\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the square root of the inverse of the remaining capacity, subtracting the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the square root of the inverse of the remaining capacity, subtract the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = item * np.sqrt(1 / remaining_capacity) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the exponential (base e) of the inverse of the ratio between the remaining capacity and the item size, divided by the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(1 / (bins - item) / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the ratio of the remaining capacity to the item size, subtracting the product of the bin number and the square root of the remaining capacity, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the inverse of the ratio of the remaining capacity to the item size, subtract the product of the bin number and the square root of the remaining capacity, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n scores = (1 / ratio) - (bin_number * np.sqrt(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the sum of the item divided by the remaining capacity of the bin, multiplied by the bin index plus the square of the item's square root.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.arange(len(bins)) + 1) + item**0.5 ** 2\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins by calculating the logarithm of the ratio between the item and the remaining capacity of the bin, multiplied by the square root of the bin index plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the sum of the cube root of the item size divided by the square of the remaining capacity, subtracted by the logarithm (base 2) of the bin number, ensuring a unique scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(item) / np.square(bins - item)) - np.log2(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the inverse of the remaining capacity, multiplied by the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the sum of the item size and the inverse of the remaining capacity, multiply it by the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (item + 1 / remaining_capacity) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_24.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size, and extends the scoring by dividing the remaining capacity of each bin by the sum of the sizes of all remaining items, effectively favoring bins with a smaller remaining capacity and larger remaining items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape) # Initialize scores array\n \n # Calculate scores for each bin\n scores[bins != item] = bins[bins != item] % item\n scores[bins == item] = item\n \n # Extend scoring by dividing remaining capacity of each bin by sum of sizes of remaining items\n remaining_items = np.sum(bins[bins > item]) - item\n scores[bins != item] += bins[bins != item] / remaining_items\n \n return scores",
"objective": 0.01801,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the cosine of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin number. Main steps: Calculate the remaining capacity of each bin, compute the cosine of the ratio between the item size and the remaining capacity, take the inverse, and multiply it by the square root of the bin number to obtain the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n cosine_ratio = np.cos(item / remaining_capacity)\n scores = 1 / cosine_ratio * np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.02405,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: \n- item (the item that needs to be assigned to a bin)\n- bins (the set of bins available for assigning the item)\n\nNew algorithm description: \nThe new algorithm modifies the score function by assigning different scores based on the remaining capacity of each bin compared to the item, with the goal of minimizing the number of used bins.\nThe main steps of the new algorithm are: \n- Clone the bins set as capacities.\n- Set the capacity of bins with exact capacity equal to item as -1 to ignore them.\n- Calculate scores by subtracting the item from each capacity and dividing it by the integer division of capacity by item.\n- Set scores of bins with no capacity to 0.\n- Return the scores. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy()\n capacities[capacities == item] = -1\n scores = (capacities - item) / (capacities // item)\n scores[capacities == 0] = 0\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the square of the cosine of the ratio between the item size and remaining capacity, multiplied by the logarithm of the bin number plus one. Main steps: Calculate the remaining capacity of each bin, compute the cosine ratio, take the inverse and square it, then multiply it by the logarithm of the bin number plus one to obtain the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n cosine_ratio = np.cos(item / remaining_capacity)\n inverse_square = np.power(1 / cosine_ratio, 2)\n bin_numbers = np.arange(len(bins)) + 1\n scores = inverse_square * np.log(bin_numbers)\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The modified algorithm calculates the scores by dividing the cube of the item by the remaining capacity multiplied by bin size, then adding the index multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item ** 3) / (bins * (bins - item)) + np.arange(len(bins)) * item\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the square root of the inverse of the remaining capacity, subtracting the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the square root of the inverse of the remaining capacity, subtract the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = item * np.sqrt(1 / remaining_capacity) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the exponential (base e) of the inverse of the ratio between the remaining capacity and the item size, divided by the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(1 / (bins - item) / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the ratio of the remaining capacity to the item size, subtracting the product of the bin number and the square root of the remaining capacity, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the inverse of the ratio of the remaining capacity to the item size, subtract the product of the bin number and the square root of the remaining capacity, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n scores = (1 / ratio) - (bin_number * np.sqrt(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the sum of the item divided by the remaining capacity of the bin, multiplied by the bin index plus the square of the item's square root.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.arange(len(bins)) + 1) + item**0.5 ** 2\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins by calculating the logarithm of the ratio between the item and the remaining capacity of the bin, multiplied by the square root of the bin index plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the sum of the cube root of the item size divided by the square of the remaining capacity, subtracted by the logarithm (base 2) of the bin number, ensuring a unique scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(item) / np.square(bins - item)) - np.log2(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_25.json
================================================
[
{
"algorithm": "scores = (1 / np.log(item / remaining_capacity)) * (np.cbrt(np.arange(len(bins)) + 1)) * (np.exp(item))",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = np.array(bins)\n scores = (1 / np.log(item / remaining_capacity)) * (np.cbrt(np.arange(len(bins)) + 1)) * (np.exp(item))\n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size, and extends the scoring by dividing the remaining capacity of each bin by the sum of the sizes of all remaining items, effectively favoring bins with a smaller remaining capacity and larger remaining items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape) # Initialize scores array\n \n # Calculate scores for each bin\n scores[bins != item] = bins[bins != item] % item\n scores[bins == item] = item\n \n # Extend scoring by dividing remaining capacity of each bin by sum of sizes of remaining items\n remaining_items = np.sum(bins[bins > item]) - item\n scores[bins != item] += bins[bins != item] / remaining_items\n \n return scores",
"objective": 0.01801,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the cosine of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin number. Main steps: Calculate the remaining capacity of each bin, compute the cosine of the ratio between the item size and the remaining capacity, take the inverse, and multiply it by the square root of the bin number to obtain the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n cosine_ratio = np.cos(item / remaining_capacity)\n scores = 1 / cosine_ratio * np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.02405,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: \n- item (the item that needs to be assigned to a bin)\n- bins (the set of bins available for assigning the item)\n\nNew algorithm description: \nThe new algorithm modifies the score function by assigning different scores based on the remaining capacity of each bin compared to the item, with the goal of minimizing the number of used bins.\nThe main steps of the new algorithm are: \n- Clone the bins set as capacities.\n- Set the capacity of bins with exact capacity equal to item as -1 to ignore them.\n- Calculate scores by subtracting the item from each capacity and dividing it by the integer division of capacity by item.\n- Set scores of bins with no capacity to 0.\n- Return the scores. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins.copy()\n capacities[capacities == item] = -1\n scores = (capacities - item) / (capacities // item)\n scores[capacities == 0] = 0\n return scores",
"objective": 0.02807,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the reciprocal of the square root of the remaining capacity multiplied by the cube of the bin index, aiming to optimize bin assignment with a distinct scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n used_bins = np.sum(bins < max_capacity)\n reciprocal_sqrt_rest_capacity = 1 / np.sqrt(bins - item)\n scores = reciprocal_sqrt_rest_capacity * (np.power(bins, 3))\n scores[bins == max_capacity] = 0\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the square of the cosine of the ratio between the item size and remaining capacity, multiplied by the logarithm of the bin number plus one. Main steps: Calculate the remaining capacity of each bin, compute the cosine ratio, take the inverse and square it, then multiply it by the logarithm of the bin number plus one to obtain the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n cosine_ratio = np.cos(item / remaining_capacity)\n inverse_square = np.power(1 / cosine_ratio, 2)\n bin_numbers = np.arange(len(bins)) + 1\n scores = inverse_square * np.log(bin_numbers)\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "The modified algorithm calculates the scores by dividing the cube of the item by the remaining capacity multiplied by bin size, then adding the index multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item ** 3) / (bins * (bins - item)) + np.arange(len(bins)) * item\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores by dividing the square of the item by remaining capacity minus bin size divided by item size, then subtracting index multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins - item) - np.arange(len(bins)) * item\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the remaining capacity, subtracting the square of the bin number, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the ratio of the item size to the remaining capacity, subtract the square of the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n \n ratios = item / remaining_capacities\n \n bin_numbers = np.arange(len(bins)) + 1\n bin_numbers_squared = bin_numbers**2\n \n scores = ratios - bin_numbers_squared\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the square root of the inverse of the remaining capacity, subtracting the bin index plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the square root of the inverse of the remaining capacity, subtract the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = item * np.sqrt(1 / remaining_capacity) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the exponential (base e) of the inverse of the ratio between the remaining capacity and the item size, divided by the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(1 / (bins - item) / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the inverse of the ratio of the remaining capacity to the item size, subtracting the product of the bin number and the square root of the remaining capacity, ensuring a modified scoring system. Main steps: Compute the remaining capacity of each bin, calculate the inverse of the ratio of the remaining capacity to the item size, subtract the product of the bin number and the square root of the remaining capacity, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n scores = (1 / ratio) - (bin_number * np.sqrt(remaining_capacity))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the sum of the item divided by the remaining capacity of the bin, multiplied by the bin index plus the square of the item's square root.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.arange(len(bins)) + 1) + item**0.5 ** 2\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the remaining capacity, multiplied by the bin number, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the logarithm of the item size divided by the remaining capacity, multiply by the bin number, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins by calculating the logarithm of the ratio between the item and the remaining capacity of the bin, multiplied by the square root of the bin index plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the ratio of the inverse of the remaining capacity squared divided by the bin index squared plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins**2 - item**2 + 1)) / (np.arange(len(bins))**2 + 1)\n return scores",
"objective": 0.03944,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_3.json
================================================
[
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on its capacity and other factors such as ratio, index, proximity to item size, or number of items already assigned.}\n\n{New Algorithm: The score function will assign scores to each bin based on a combination of the bin's remaining capacity, its proximity to the item size, and the ratio of remaining capacity to item size, returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n distances = np.abs(bins - item)\n scores = (bins * ratios) / distances\n \n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "\nAlgorithm 6 (Reverse Ratio): The score function assigns scores to each bin based on the inverse of the ratio between the item size and the bin's remaining capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the sum of the rest capacity and the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n index = np.arange(len(bins))\n scores = 1 / (rest_capacity + index)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: item (size of the item to be assigned), bins (a list of bin capacities).\nNew algorithm: The new algorithm assigns scores to bins based on the square root of the item size multiplied by the remaining capacity, the bin number squared, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithm.\nMain steps: Compute the remaining capacity of each bin, calculate the square root of the item size multiplied by the remaining capacity, compute the square of the bin numbers, calculate the inverse of the remaining capacity, sum up the three calculated values, and return the scores for each bin.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n sqrt_item_capacity = np.sqrt(item * remaining_capacity)\n bin_number_squared = np.power(np.arange(len(bins)), 2)\n inverse_remaining_capacity = 1 / remaining_capacity\n scores = sqrt_item_capacity + bin_number_squared + inverse_remaining_capacity\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the item size and the bin number, subtracting the sum of the remaining capacity and the square root of the item size, ensuring a distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.arange(1, len(bins)+1)) - (np.sqrt(item) + bins)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins - item) != np.max(bins)).astype(int)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on certain criteria and choose the bin with the highest score for item assignment.}\n\n{New algorithm: Calculate the score for each bin by considering the remaining capacity of the bin divided by the product of the bin index and the item size, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(len(bins)) + 1) / item\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "M",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[bins != np.max(bins)] = (np.max(bins) - bins[bins != np.max(bins)]) / item\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin by taking the product of the rest capacity and the inverse of the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(bins, np.reciprocal(np.arange(1, len(bins)+1, dtype=float)))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on its capacity and other factors such as ratio, index, proximity to item size, or number of items already assigned.}\n\n{New Algorithm: Assign scores to bins based on the sum of the item size multiplied by the remaining capacity, the bin number squared, and the inverse of the remaining capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of item sizes multiplied by remaining capacity\n sum_sizes = bins * (item + bins)\n \n # Calculate the bin number squared\n bin_numbers = np.arange(1, len(bins) + 1) ** 2\n \n # Calculate the inverse of remaining capacity\n inv_capacities = 1 / bins\n \n # Calculate the scores for each bin\n scores = sum_sizes + bin_numbers + inv_capacities\n \n return scores",
"objective": 0.04467,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by considering the sum of the bin index and item size divided by the remaining capacity of the bin, penalizing bins at maximum capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = (bins[mask] + item) / (bins[mask] - item)\n\n return scores",
"objective": 0.05021,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by considering the logarithm of the remaining capacity divided by the sum of the bin index and item size, penalizing bins at maximum capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins / (np.arange(len(bins)) + item))\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.05031,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n\n # Calculate the score for each bin\n for i in range(len(bins)):\n if bins[i] != item:\n scores[i] = 1 / (bins[i] - item)\n \n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins, set the score to -1 for bins with rest capacity equal to the maximum capacity, and for the remaining feasible bins, set the score to a value inversely proportional to the remaining capacity, and return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n \n scores = np.zeros_like(bins)\n scores[bins == max_capacity] = -1\n scores[bins != max_capacity] = 1 / remaining_capacity[bins != max_capacity]\n \n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = np.sort(bins) # sort the array in ascending order\n scores = np.zeros_like(capacities) # initialize scores array\n \n # calculate scores for each bin\n for i, capacity in enumerate(capacities):\n if capacity == item: # if rest capacity equals item size, set score to -1\n scores[i] = -1\n else:\n scores[i] = 1 / (capacity - item) # calculate score as the inverse of remaining capacity\n \n return scores",
"objective": 0.05232,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the sum of the rest capacity and the inverse of the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins + 1) / (np.arange(bins.size) + 1)\n scores[bins == item] = 0\n return scores",
"objective": 0.05343,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on both the rest capacity and the inverse of the bin number, using a modified weighting factor, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins/item) + (1/(np.arange(1, len(bins)+1))) * 1000\n scores[bins == item] = 0\n return scores",
"objective": 0.05383,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_4.json
================================================
[
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on its capacity and other factors such as ratio, index, proximity to item size, or number of items already assigned.}\n\n{New Algorithm: The score function will assign scores to each bin based on a combination of the bin's remaining capacity, its proximity to the item size, and the ratio of remaining capacity to item size, returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n distances = np.abs(bins - item)\n scores = (bins * ratios) / distances\n \n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the item size divided by the remaining capacity, multiplied by the index squared, and penalize bins at maximum capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (item / remaining_capacities) * (np.arange(len(bins)) ** 2)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nAlgorithm 6 (Reverse Ratio): The score function assigns scores to each bin based on the inverse of the ratio between the item size and the bin's remaining capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the remaining capacity to the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[np.where(bins == max(bins))] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the sum of the rest capacity and the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n index = np.arange(len(bins))\n scores = 1 / (rest_capacity + index)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: item (size of the item to be assigned), bins (a list of bin capacities).\nNew algorithm: The new algorithm assigns scores to bins based on the square root of the item size multiplied by the remaining capacity, the bin number squared, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithm.\nMain steps: Compute the remaining capacity of each bin, calculate the square root of the item size multiplied by the remaining capacity, compute the square of the bin numbers, calculate the inverse of the remaining capacity, sum up the three calculated values, and return the scores for each bin.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n sqrt_item_capacity = np.sqrt(item * remaining_capacity)\n bin_number_squared = np.power(np.arange(len(bins)), 2)\n inverse_remaining_capacity = 1 / remaining_capacity\n scores = sqrt_item_capacity + bin_number_squared + inverse_remaining_capacity\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign a score to each bin based on the ratio of the remaining capacity to the logarithm (base 2) of the bin index plus one, and return the scores for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.log2(np.arange(1, len(bins)+1) + 1))\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the item size and the bin number, subtracting the sum of the remaining capacity and the square root of the item size, ensuring a distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.arange(1, len(bins)+1)) - (np.sqrt(item) + bins)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins - item) != np.max(bins)).astype(int)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on certain criteria and choose the bin with the highest score for item assignment.}\n\n{New Algorithm: Assign scores to bins based on the exponential decay of the remaining capacity divided by the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(-bins/item))/(np.sqrt(np.arange(len(bins))+1))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "M",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[bins != np.max(bins)] = (np.max(bins) - bins[bins != np.max(bins)]) / item\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin by taking the product of the rest capacity and the inverse of the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(bins, np.reciprocal(np.arange(1, len(bins)+1, dtype=float)))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on its capacity and other factors such as ratio, index, proximity to item size, or number of items already assigned.}\n\n{New Algorithm: Assign scores to bins based on the sum of the item size multiplied by the remaining capacity, the bin number squared, and the inverse of the remaining capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of item sizes multiplied by remaining capacity\n sum_sizes = bins * (item + bins)\n \n # Calculate the bin number squared\n bin_numbers = np.arange(1, len(bins) + 1) ** 2\n \n # Calculate the inverse of remaining capacity\n inv_capacities = 1 / bins\n \n # Calculate the scores for each bin\n scores = sum_sizes + bin_numbers + inv_capacities\n \n return scores",
"objective": 0.04467,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by dividing the square root of the remaining capacity by the sum of the bin index and the item size, penalizing bins at maximum capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (np.arange(len(bins)) + item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04608,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the absolute difference between the item size and the square of the bin index, divided by the remaining capacity of the bin, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = np.abs(item - bin_indices**2) / bins\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04658,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the logarithm of the product of the item and the square root of the bin index, subtracting the sum of the remaining capacity and the exponential decay of the bin index divided by the item size, ensuring a distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_cap = max(bins)\n\n scores = np.log(item * np.sqrt(np.arange(len(bins)))) - (np.sum(bins) + np.exp(np.arange(len(bins))) / item)\n scores[bins == max_cap] = float('-inf')\n\n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by considering the sum of the bin index and item size divided by the remaining capacity of the bin, penalizing bins at maximum capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = (bins[mask] + item) / (bins[mask] - item)\n\n return scores",
"objective": 0.05021,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_5.json
================================================
[
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on its capacity and other factors such as ratio, index, proximity to item size, or number of items already assigned.}\n\n{New Algorithm: The score function will assign scores to each bin based on a combination of the bin's remaining capacity, its proximity to the item size, and the ratio of remaining capacity to item size, returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n distances = np.abs(bins - item)\n scores = (bins * ratios) / distances\n \n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the item size divided by the remaining capacity, multiplied by the index squared, and penalize bins at maximum capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (item / remaining_capacities) * (np.arange(len(bins)) ** 2)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nAlgorithm 6 (Reverse Ratio): The score function assigns scores to each bin based on the inverse of the ratio between the item size and the bin's remaining capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the remaining capacity to the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[np.where(bins == max(bins))] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins == np.max(bins))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: item (size of the item to be assigned), bins (a list of bin capacities).\nNew algorithm: The new algorithm assigns scores to bins based on the square root of the item size multiplied by the remaining capacity, the bin number squared, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithm.\nMain steps: Compute the remaining capacity of each bin, calculate the square root of the item size multiplied by the remaining capacity, compute the square of the bin numbers, calculate the inverse of the remaining capacity, sum up the three calculated values, and return the scores for each bin.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n sqrt_item_capacity = np.sqrt(item * remaining_capacity)\n bin_number_squared = np.power(np.arange(len(bins)), 2)\n inverse_remaining_capacity = 1 / remaining_capacity\n scores = sqrt_item_capacity + bin_number_squared + inverse_remaining_capacity\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign a score to each bin based on the ratio of the remaining capacity to the logarithm (base 2) of the bin index plus one, and return the scores for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.log2(np.arange(1, len(bins)+1) + 1))\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on a combination of the remaining capacity, item size, and bin index.\nNew algorithm: Assign a score to each bin based on the absolute difference between the item size and the logarithm (base 2) of the bin index plus one, divided by the remaining capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(np.log2(np.arange(1, len(bins) + 1)) - np.log2(item + 1)) / bins\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the bin's remaining capacity and the square root of the bin number, subtracting the product of the item size and the number of items already assigned, ensuring a unique scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item*np.arange(1, len(bins)+1)) + np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the item size and the bin number, subtracting the sum of the remaining capacity and the square root of the item size, ensuring a distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.arange(1, len(bins)+1)) - (np.sqrt(item) + bins)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins - item) != np.max(bins)).astype(int)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the logarithm of the remaining capacity divided by the cube root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / ((np.arange(len(bins)) + 1) ** (1/3))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on certain criteria and choose the bin with the highest score for item assignment.}\n\n{New Algorithm: Assign scores to bins based on the exponential decay of the remaining capacity divided by the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(-bins/item))/(np.sqrt(np.arange(len(bins))+1))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the remaining capacity to the logarithm of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.log(np.arange(1, len(bins)+1)) + 1)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin by taking the product of the rest capacity and the inverse of the index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(bins, np.reciprocal(np.arange(1, len(bins)+1, dtype=float)))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on its capacity and other factors such as ratio, index, proximity to item size, or number of items already assigned.}\n\n{New Algorithm: Assign scores to bins based on the sum of the item size multiplied by the remaining capacity, the bin number squared, and the inverse of the remaining capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of item sizes multiplied by remaining capacity\n sum_sizes = bins * (item + bins)\n \n # Calculate the bin number squared\n bin_numbers = np.arange(1, len(bins) + 1) ** 2\n \n # Calculate the inverse of remaining capacity\n inv_capacities = 1 / bins\n \n # Calculate the scores for each bin\n scores = sum_sizes + bin_numbers + inv_capacities\n \n return scores",
"objective": 0.04467,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_6.json
================================================
[
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on its capacity and other factors such as ratio, index, proximity to item size, or number of items already assigned.}\n\n{New Algorithm: The score function will assign scores to each bin based on a combination of the bin's remaining capacity, its proximity to the item size, and the ratio of remaining capacity to item size, returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = bins / item\n distances = np.abs(bins - item)\n scores = (bins * ratios) / distances\n \n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the item size divided by the remaining capacity, multiplied by the index squared, and penalize bins at maximum capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (item / remaining_capacities) * (np.arange(len(bins)) ** 2)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nAlgorithm 6 (Reverse Ratio): The score function assigns scores to each bin based on the inverse of the ratio between the item size and the bin's remaining capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the item size raised to the power of the bin index plus one, divided by the remaining capacity squared, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n \n scores = (item ** bin_index) / (remaining_capacity ** 2)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the remaining capacity divided by the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1)))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins == np.max(bins))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nAlgorithm parameters: item (size of the item to be assigned), bins (a list of bin capacities).\nNew algorithm: The new algorithm assigns scores to bins based on the square root of the item size multiplied by the remaining capacity, the bin number squared, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithm.\nMain steps: Compute the remaining capacity of each bin, calculate the square root of the item size multiplied by the remaining capacity, compute the square of the bin numbers, calculate the inverse of the remaining capacity, sum up the three calculated values, and return the scores for each bin.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n sqrt_item_capacity = np.sqrt(item * remaining_capacity)\n bin_number_squared = np.power(np.arange(len(bins)), 2)\n inverse_remaining_capacity = 1 / remaining_capacity\n scores = sqrt_item_capacity + bin_number_squared + inverse_remaining_capacity\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign a score to each bin based on the ratio of the remaining capacity to the logarithm (base 2) of the bin index plus one, and return the scores for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.log2(np.arange(1, len(bins)+1) + 1))\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on a combination of the remaining capacity, item size, and bin index.\nNew algorithm: Assign a score to each bin based on the absolute difference between the item size and the logarithm (base 2) of the bin index plus one, divided by the remaining capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(np.log2(np.arange(1, len(bins) + 1)) - np.log2(item + 1)) / bins\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the bin's remaining capacity and the square root of the bin number, subtracting the product of the item size and the number of items already assigned, ensuring a unique scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item*np.arange(1, len(bins)+1)) + np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the item size and the bin number, subtracting the sum of the remaining capacity and the square root of the item size, ensuring a distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.arange(1, len(bins)+1)) - (np.sqrt(item) + bins)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins - item) != np.max(bins)).astype(int)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the item size and the inverse of the bin index plus one, divided by the remaining capacity cubed, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (1 / (np.arange(len(bins)) + 1)) / (bins ** 3))\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign a score to each bin based on certain criteria and choose the bin with the highest score for item assignment.}\n\n{New Algorithm: Assign scores to bins based on the exponential decay of the remaining capacity divided by the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(-bins/item))/(np.sqrt(np.arange(len(bins))+1))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the item size divided by the remaining capacity squared and the inverse of the bin index plus one, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins**2)) * (1 / (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the remaining capacity to the logarithm of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.log(np.arange(1, len(bins)+1)) + 1)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04286,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_7.json
================================================
[
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the inverse of the remaining capacity, subtracting the logarithm of the bin number plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the inverse of the remaining capacity, subtract the logarithm of the bin number plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = item * (1 / remaining_capacities) - np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the inverse of the square of the bin index plus one, divided by the remaining capacity, ensuring a unique scoring system. Main steps: Calculate the remaining capacity of each bin, compute the product of the item size and the inverse of the square of the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n index = np.arange(len(bins))\n scores = (item * (1 / ((index**2) + 1))) / remaining_capacity\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the item size divided by the remaining capacity, multiplied by the index squared, and penalize bins at maximum capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (item / remaining_capacities) * (np.arange(len(bins)) ** 2)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nAlgorithm 6 (Reverse Ratio): The score function assigns scores to each bin based on the inverse of the ratio between the item size and the bin's remaining capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the item size raised to the power of the bin index plus one, divided by the remaining capacity squared, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n \n scores = (item ** bin_index) / (remaining_capacity ** 2)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the remaining capacity to the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the quotient of the item size divided by the remaining capacity plus one raised to the power of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + 1)) ** (np.arange(len(bins)) + 1) # Compute scores for bins\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins == np.max(bins))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the inverse of the ratio of the item size to the remaining capacity, the square of the bin number, and the ratio of the remaining capacity to the item size, ensuring a different scoring system than the existing algorithm while aiming to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.square(np.arange(1, bins.size + 1))) * ((bins - item) / item)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the log of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(np.arange(1, len(bins) + 1) + 1)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on a combination of the remaining capacity, item size, and bin index.\nNew algorithm: Assign a score to each bin based on the absolute difference between the item size and the logarithm (base 2) of the bin index plus one, divided by the remaining capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(np.log2(np.arange(1, len(bins) + 1)) - np.log2(item + 1)) / bins\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the bin's remaining capacity and the square root of the bin number, subtracting the product of the item size and the number of items already assigned, ensuring a unique scoring system.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item*np.arange(1, len(bins)+1)) + np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the item size and the bin number, subtracting the sum of the remaining capacity and the square root of the item size, ensuring a distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.arange(1, len(bins)+1)) - (np.sqrt(item) + bins)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the item size divided by the remaining capacity raised to the power of the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the product of the item size and the inverse of the bin index plus one, divided by the remaining capacity cubed, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (1 / (np.arange(len(bins)) + 1)) / (bins ** 3))\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_8.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the inverse of the remaining capacity, subtracting the logarithm of the bin number plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the inverse of the remaining capacity, subtract the logarithm of the bin number plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = item * (1 / remaining_capacities) - np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the square root of the item size to the remaining capacity, multiplied by the inverse of the bin index plus one, and return the scores for assignment. The main steps are to calculate the remaining capacity of each bin, compute the ratio of the square root of the item size to the remaining capacity, multiply it by the inverse of the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item # calculate remaining capacity of each bin\n sqrt_ratio = np.sqrt(item) / remaining_capacity # ratio of square root of item size to remaining capacity\n inverse_bin_index = 1 / (np.arange(len(bins)) + 1) # inverse of bin index plus one\n scores = sqrt_ratio * inverse_bin_index # compute scores for each bin\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the bin index plus one, divided by the remaining capacity raised to the power of two, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (np.arange(len(bins)) + 1)) /\n (bins - item + 1) ** 2).astype(np.float64)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the item size divided by the remaining capacity, multiplied by the index squared, and penalize bins at maximum capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (item / remaining_capacities) * (np.arange(len(bins)) ** 2)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nAlgorithm 6 (Reverse Ratio): The score function assigns scores to each bin based on the inverse of the ratio between the item size and the bin's remaining capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the difference between the item size and the logarithm (base 10) of the bin index plus one, divided by the remaining capacity, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item - np.log10(np.arange(1, len(bins)+1))) / bins).astype(np.float32)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the remaining capacity to the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the quotient of the item size divided by the remaining capacity plus one raised to the power of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + 1)) ** (np.arange(len(bins)) + 1) # Compute scores for bins\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins == np.max(bins))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the inverse of the ratio of the item size to the remaining capacity, the square of the bin number, and the ratio of the remaining capacity to the item size, ensuring a different scoring system than the existing algorithm while aiming to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.square(np.arange(1, bins.size + 1))) * ((bins - item) / item)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the square root of the remaining capacity and the logarithm (base 10) of the item size multiplied by the bin index plus one, divided by the item size, ensuring a distinct scoring system. Main steps: Compute the remaining capacity of each bin, calculate the square root of the remaining capacity, compute the logarithm (base 10) of the item size, multiply it by the bin index plus one, calculate the absolute difference between the two values, divide it by the item size, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the square root of the remaining capacity\n sqrt_capacity = np.sqrt(remaining_capacity)\n \n # Compute the logarithm (base 10) of the item size\n log_item = np.log10(item)\n \n # Multiply it by the bin index plus one\n index_plus_one = np.arange(len(bins)) + 1\n multiplied = log_item * index_plus_one\n \n # Calculate the absolute difference between the two values\n abs_diff = np.abs(sqrt_capacity - multiplied)\n \n # Divide it by the item size\n scores = abs_diff / item\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the log of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(np.arange(1, len(bins) + 1) + 1)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on a combination of the remaining capacity, item size, and bin index.\nNew algorithm: Assign a score to each bin based on the absolute difference between the item size and the logarithm (base 2) of the bin index plus one, divided by the remaining capacity, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(np.log2(np.arange(1, len(bins) + 1)) - np.log2(item + 1)) / bins\n return scores",
"objective": 0.04155,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T&C2T2C/Run3/population_generation_9.json
================================================
[
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins % item\n scores[scores == 0] = item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function that calculates the remainder of each bin's capacity divided by the item's size, substituting zero scores with the item's size and returns an array of scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins == item, item, bins % item)\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the ratio of the remaining capacity to the item size, the bin number, and the inverse of the remaining capacity, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n ratio = remaining_capacity / item\n bin_number = np.arange(len(bins))\n inverse_capacity = 1 / remaining_capacity\n scores = ratio + bin_number + inverse_capacity\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the inverse of the remaining capacity, subtracting the logarithm of the bin number plus one, ensuring a unique scoring system. Main steps: Compute the remaining capacity of each bin, calculate the product of the item size and the inverse of the remaining capacity, subtract the logarithm of the bin number plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = item * (1 / remaining_capacities) - np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the square root of the item size to the remaining capacity, multiplied by the inverse of the bin index plus one, and return the scores for assignment. The main steps are to calculate the remaining capacity of each bin, compute the ratio of the square root of the item size to the remaining capacity, multiply it by the inverse of the bin index plus one, and return the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item # calculate remaining capacity of each bin\n sqrt_ratio = np.sqrt(item) / remaining_capacity # ratio of square root of item size to remaining capacity\n inverse_bin_index = 1 / (np.arange(len(bins)) + 1) # inverse of bin index plus one\n scores = sqrt_ratio * inverse_bin_index # compute scores for each bin\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the ratio of the logarithm (base 3) of the item size to the remaining capacity, multiplied by the inverse of the square root of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (np.log(3) * (bins - item)) * (1 / np.sqrt(np.arange(bins.size) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the bin index plus one, divided by the remaining capacity raised to the power of two, ensuring a unique and distinct scoring system from the existing algorithms.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (np.arange(len(bins)) + 1)) /\n (bins - item + 1) ** 2).astype(np.float64)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the sum of the item size divided by the remaining capacity, multiplied by the index squared, and penalize bins at maximum capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = (item / remaining_capacities) * (np.arange(len(bins)) ** 2)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The main algorithm parameter is the item size, bins capacity, and the scoring function which assigns scores to each bin based on the exponential of the sum of the item size and remaining capacity divided by the bin index plus one. \nFor the new algorithm, we will modify the scoring function to assign scores based only on the remaining capacity of the bins, without considering the item size, using an inverse exponential function.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/(item+1))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the square root of the bin index plus two.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / np.sqrt(np.arange(len(bins)) + 2))\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the difference between the item size and the logarithm (base 10) of the bin index plus one, divided by the remaining capacity, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item - np.log10(np.arange(1, len(bins)+1))) / bins).astype(np.float32)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus two, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 2)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the square root of the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign scores to bins based on the inverse of the remaining capacity divided by the bin index plus one, returning the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item + 1)) / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the inverse ratio of the bin index plus one to the remaining capacity raised to the power of three, ensuring a modified scoring system that prioritizes filling smaller capacity bins first, while still considering the uniqueness and distinctness of the scoring system in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n \n # Calculate scores based on the inverse ratio of bin index\n scores = 1.0 / (np.arange(len(bins)) + 1)\n \n # Raise the remaining capacity of each bin to the power of three\n scores *= np.power(bins, 3)\n \n # Disable bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0.0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign scores to bins based on the quotient of the item size divided by the remaining capacity plus one raised to the power of the bin index plus one, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + 1)) ** (np.arange(len(bins)) + 1) # Compute scores for bins\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the sum of the remaining capacity and bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the inverse of the ratio of the item size to the remaining capacity, the square of the bin number, and the ratio of the remaining capacity to the item size, ensuring a different scoring system than the existing algorithm while aiming to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * (np.square(np.arange(1, bins.size + 1))) * ((bins - item) / item)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the exponential of the sum of the item size and the remaining capacity, divided by the bin index plus one, without excluding any bins based on maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((item + bins) / (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.04125,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_1.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by taking the sum of the rest capacity divided by the item size, considering all bins regardless of their capacity, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sum(bins / item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "assign item to bin with maximum score based on rest capacity}). \n\nBased on this idea, the new algorithm assigns the item to the bin with the maximum score calculated by considering the rest capacity, the inverse of the bin number, and a weighted average of the rest capacity and the inverse of the bin number ({assign item to bin with maximum score based on rest capacity, bin number, and weighted average",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.amax(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] / max_capacity) + (1 / (i+1))\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the highest score calculated by taking the square root of the rest capacity multiplied by the reciprocal of the bin number, with a penalty for bins at maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacity\n sqrt_rest_capacity = np.sqrt(bins)\n \n # Calculate the reciprocal of the bin number\n reciprocal_bin_number = 1 / np.arange(1, len(bins) + 1)\n \n # Calculate the score for each bin\n scores = sqrt_rest_capacity * reciprocal_bin_number\n \n # Apply penalty for bins at maximum capacity\n max_capacity_indices = bins == np.max(bins)\n scores[max_capacity_indices] -= 0.1\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the bin number and the ratio between the rest capacity and the item size, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_num = np.arange(1, len(bins)+1)\n ratios = bins / item\n scores = np.divide(1, bin_num) * ratios\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the inverse of the bin number, the logarithm of the rest capacity, and the ratio between the rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.arange(1, len(bins)+1)) * np.log(bins) * (bins / item)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign item to bin based on a score function.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the average rest capacity and prioritize bins with higher average rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=int)\n avg_rest_capacity = np.mean(bins)\n diff_rest_capacity = bins - avg_rest_capacity\n scores[diff_rest_capacity > 0] = diff_rest_capacity[diff_rest_capacity > 0]\n return scores",
"objective": 0.05322,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the scores for each bin by taking the floor of the rest capacity divided by the item size, ignoring bins where the rest capacity equals the maximum capacity, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.floor(bins / item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the product of the inverse of the bin number and the ratio between the remaining capacity and the item size, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins)+1)\n remaining_capacity = bins - item\n scores = (1/bin_nums) * (remaining_capacity / item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.06439,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign item to bin based on a score function.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the product of the rest capacity squared and the cosine of the bin number, prioritizing bins with higher rest capacity and lower bin numbers, and return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins**2) * np.cos(np.arange(len(bins)))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.07868,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function will calculate the scores for each bin based on the square root of the rest capacity, multiplied by the sine of the bin number, prioritizing bins with higher rest capacity and lower bin numbers, and return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) * np.sin(np.arange(len(bins)))\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.0816,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_10.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins.max() - item))**(1/3) * np.log(1 / (bins / item)) * (np.arange(len(bins)) + 1)**(1/3)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(range(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on the product of the inverse of the bin's rest capacity and the logarithm of the sum of the bin number and the item size, aiming to prioritize bins with lower rest capacity and higher bin numbers while considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log(item + np.arange(1,len(bins)+1))\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number multiplied by a constant factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + bins.sum() + np.arange(len(bins)) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the bin's rest capacity to the square root of the bin number multiplied by a factor, and select the bin with the maximum score for assignment, aiming to prioritize bins with both lower rest capacity and lower bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * item\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and the difference between the maximum capacity and the rest capacity of the bin, giving higher priority to bins with higher bin numbers, lower rest capacities, and larger differences between maximum and rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n bin_numbers = np.arange(len(bins)) # bin numbers from 0 to len(bins)-1\n\n # Calculate scores for each bin\n scores = bin_numbers + (max_capacity - bins) - bins / max_capacity\n\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with lower bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_number_score = bins.size - np.arange(bins.size)\n rest_capacity_score = bins.min() - bins\n weighted_average_score = (item + bins) / 2\n scores = bin_number_score + rest_capacity_score + weighted_average_score\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with lower rest capacities, lower bin numbers, and higher item-size-to-rest-capacity ratios.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n ratios = item / bins\n scores = bin_numbers + ratios\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_11.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n item_size_to_rest_capacity = item / (bins - item)\n scores = bins + bin_numbers + item_size_to_rest_capacity\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins.max() - item))**(1/3) * np.log(1 / (bins / item)) * (np.arange(len(bins)) + 1)**(1/3)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, lower bin numbers, and higher item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n ratios = item / (bins - item)\n \n scores = (bins == np.max(bins)) * -1 + bin_numbers * 0.1 + ratios * 0.01\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(range(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on the product of the inverse of the bin's rest capacity and the logarithm of the sum of the bin number and the item size, aiming to prioritize bins with lower rest capacity and higher bin numbers while considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log(item + np.arange(1,len(bins)+1))\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number multiplied by a constant factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + bins.sum() + np.arange(len(bins)) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the bin's rest capacity to the square root of the bin number multiplied by a factor, and select the bin with the maximum score for assignment, aiming to prioritize bins with both lower rest capacity and lower bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * item\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and the difference between the maximum capacity and the rest capacity of the bin, giving higher priority to bins with higher bin numbers, lower rest capacities, and larger differences between maximum and rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n bin_numbers = np.arange(len(bins)) # bin numbers from 0 to len(bins)-1\n\n # Calculate scores for each bin\n scores = bin_numbers + (max_capacity - bins) - bins / max_capacity\n\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with lower bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_number_score = bins.size - np.arange(bins.size)\n rest_capacity_score = bins.min() - bins\n weighted_average_score = (item + bins) / 2\n scores = bin_number_score + rest_capacity_score + weighted_average_score\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_12.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n item_size_to_rest_capacity = item / (bins - item)\n scores = bins + bin_numbers + item_size_to_rest_capacity\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins.max() - item))**(1/3) * np.log(1 / (bins / item)) * (np.arange(len(bins)) + 1)**(1/3)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, lower bin numbers, and higher item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n ratios = item / (bins - item)\n \n scores = (bins == np.max(bins)) * -1 + bin_numbers * 0.1 + ratios * 0.01\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(range(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on the product of the inverse of the bin's rest capacity and the logarithm of the sum of the bin number and the item size, aiming to prioritize bins with lower rest capacity and higher bin numbers while considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log(item + np.arange(1,len(bins)+1))\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number multiplied by a constant factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + bins.sum() + np.arange(len(bins)) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the bin's rest capacity to the square root of the bin number multiplied by a factor, and select the bin with the maximum score for assignment, aiming to prioritize bins with both lower rest capacity and lower bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * item\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and the difference between the maximum capacity and the rest capacity of the bin, giving higher priority to bins with higher bin numbers, lower rest capacities, and larger differences between maximum and rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n bin_numbers = np.arange(len(bins)) # bin numbers from 0 to len(bins)-1\n\n # Calculate scores for each bin\n scores = bin_numbers + (max_capacity - bins) - bins / max_capacity\n\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with lower bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_number_score = bins.size - np.arange(bins.size)\n rest_capacity_score = bins.min() - bins\n weighted_average_score = (item + bins) / 2\n scores = bin_number_score + rest_capacity_score + weighted_average_score\n return scores",
"objective": 0.04085,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_13.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n item_size_to_rest_capacity = item / (bins - item)\n scores = bins + bin_numbers + item_size_to_rest_capacity\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins.max() - item))**(1/3) * np.log(1 / (bins / item)) * (np.arange(len(bins)) + 1)**(1/3)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) * np.sqrt(bins / item))\n \n max_capacity = np.max(bins)\n \n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the bin number divided by the item size, prioritizing bins with higher rest capacity, lower bin numbers, and higher item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * np.arange(1, len(bins)+1) / item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, lower bin numbers, and higher item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n ratios = item / (bins - item)\n \n scores = (bins == np.max(bins)) * -1 + bin_numbers * 0.1 + ratios * 0.01\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(range(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on the product of the inverse of the bin's rest capacity and the logarithm of the sum of the bin number and the item size, aiming to prioritize bins with lower rest capacity and higher bin numbers while considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log(item + np.arange(1,len(bins)+1))\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number multiplied by a constant factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + bins.sum() + np.arange(len(bins)) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_14.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity minus the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.sqrt(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) * np.sqrt(bins / item))\n \n max_capacity = np.max(bins)\n \n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the bin number divided by the item size, prioritizing bins with higher rest capacity, lower bin numbers, and higher item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * np.arange(1, len(bins)+1) / item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, lower bin numbers, and higher item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n ratios = item / (bins - item)\n \n scores = (bins == np.max(bins)) * -1 + bin_numbers * 0.1 + ratios * 0.01\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(range(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on the product of the inverse of the bin's rest capacity and the logarithm of the sum of the bin number and the item size, aiming to prioritize bins with lower rest capacity and higher bin numbers while considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log(item + np.arange(1,len(bins)+1))\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04004,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_15.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the cube root of the ratio between the item size and the rest capacity, and the logarithm base 10 of the product of the bin number and the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n max_capacity = np.max(rest_capacity) # maximum capacity among the bins\n \n scores = np.zeros(num_bins) # initialize scores array\n \n for i in range(num_bins):\n if rest_capacity[i] == max_capacity:\n scores[i] = -1 # set score to -1 if bin has maximum capacity\n else:\n score1 = rest_capacity[i] / np.sqrt(i+1) # score based on rest capacity divided by square root of bin number\n score2 = (item / rest_capacity[i])**(1/3) # score based on cube root of item size divided by rest capacity\n score3 = np.log10((i+1) * (rest_capacity[i] / item)) # score based on logarithm of bin number times ratio of bin capacity to item size\n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity minus the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.sqrt(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) * np.sqrt(bins / item))\n \n max_capacity = np.max(bins)\n \n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the bin number divided by the item size, prioritizing bins with higher rest capacity, lower bin numbers, and higher item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * np.arange(1, len(bins)+1) / item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, lower bin numbers, and higher item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n ratios = item / (bins - item)\n \n scores = (bins == np.max(bins)) * -1 + bin_numbers * 0.1 + ratios * 0.01\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the cube root of the bin number, the logarithm base 2 of the ratio between the item size and the rest capacity, and the product of the square root of the bin number and the inverse of the square of the item size, prioritizing bins with higher rest capacity and bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins)+1))) * np.log2(item / bins) * (np.sqrt(np.arange(1, len(bins)+1)) / (item**2))\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_16.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the natural logarithm of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = item / (bins - item) - np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the cube root of the ratio between the item size and the rest capacity, and the logarithm base 10 of the product of the bin number and the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n max_capacity = np.max(rest_capacity) # maximum capacity among the bins\n \n scores = np.zeros(num_bins) # initialize scores array\n \n for i in range(num_bins):\n if rest_capacity[i] == max_capacity:\n scores[i] = -1 # set score to -1 if bin has maximum capacity\n else:\n score1 = rest_capacity[i] / np.sqrt(i+1) # score based on rest capacity divided by square root of bin number\n score2 = (item / rest_capacity[i])**(1/3) # score based on cube root of item size divided by rest capacity\n score3 = np.log10((i+1) * (rest_capacity[i] / item)) # score based on logarithm of bin number times ratio of bin capacity to item size\n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity minus the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.sqrt(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) * np.sqrt(bins / item))\n \n max_capacity = np.max(bins)\n \n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the bin number divided by the item size, prioritizing bins with higher rest capacity, lower bin numbers, and higher item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * np.arange(1, len(bins)+1) / item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the inverse of the bin number and the square of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n scores[i] = -np.inf\n else:\n rest_capacity = capacity - item\n bin_number = i + 1\n ratio = rest_capacity / item\n scores[i] = rest_capacity / (bin_number**2) + np.log(1 / ratio) + (1 / bin_number) * (capacity/item)**2\n\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_17.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the natural logarithm of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = item / (bins - item) - np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the cube root of the ratio between the item size and the rest capacity, and the logarithm base 10 of the product of the bin number and the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n max_capacity = np.max(rest_capacity) # maximum capacity among the bins\n \n scores = np.zeros(num_bins) # initialize scores array\n \n for i in range(num_bins):\n if rest_capacity[i] == max_capacity:\n scores[i] = -1 # set score to -1 if bin has maximum capacity\n else:\n score1 = rest_capacity[i] / np.sqrt(i+1) # score based on rest capacity divided by square root of bin number\n score2 = (item / rest_capacity[i])**(1/3) # score based on cube root of item size divided by rest capacity\n score3 = np.log10((i+1) * (rest_capacity[i] / item)) # score based on logarithm of bin number times ratio of bin capacity to item size\n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity minus the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.sqrt(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) * np.sqrt(bins / item))\n \n max_capacity = np.max(bins)\n \n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the bin number divided by the item size, prioritizing bins with higher rest capacity, lower bin numbers, and higher item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * np.arange(1, len(bins)+1) / item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins) + 1))) * np.log(item / bins) * (np.arange(1, len(bins) + 1) * np.cbrt(bins / item))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_18.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the natural logarithm of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = item / (bins - item) - np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the cube root of the ratio between the item size and the rest capacity, and the logarithm base 10 of the product of the bin number and the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n max_capacity = np.max(rest_capacity) # maximum capacity among the bins\n \n scores = np.zeros(num_bins) # initialize scores array\n \n for i in range(num_bins):\n if rest_capacity[i] == max_capacity:\n scores[i] = -1 # set score to -1 if bin has maximum capacity\n else:\n score1 = rest_capacity[i] / np.sqrt(i+1) # score based on rest capacity divided by square root of bin number\n score2 = (item / rest_capacity[i])**(1/3) # score based on cube root of item size divided by rest capacity\n score3 = np.log10((i+1) * (rest_capacity[i] / item)) # score based on logarithm of bin number times ratio of bin capacity to item size\n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity minus the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.sqrt(np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) * np.sqrt(bins / item))\n \n max_capacity = np.max(bins)\n \n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the bin number divided by the item size, prioritizing bins with higher rest capacity, lower bin numbers, and higher item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * np.arange(1, len(bins)+1) / item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins) + 1))) * np.log(item / bins) * (np.arange(1, len(bins) + 1) * np.cbrt(bins / item))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_19.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the difference between the bin number and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and larger differences between the bin number and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.sqrt(np.arange(1, len(bins)+1))) * (np.log(item / bins)) * (np.abs(np.arange(1, len(bins)+1) - item))\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the cosine of the bin's rest capacity divided by the square root of the bin number, multiplied by the inverse of the sum of the item size and the rest capacity, to prioritize bins with higher rest capacity and lower bin numbers while considering the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n bin_numbers = np.arange(1, len(bins)+1)\n scores = np.cos(rest_capacity / np.sqrt(bin_numbers)) * (1 / (item + rest_capacity))\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the natural logarithm of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = item / (bins - item) - np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the cube root of the ratio between the item size and the rest capacity, and the logarithm base 10 of the product of the bin number and the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n max_capacity = np.max(rest_capacity) # maximum capacity among the bins\n \n scores = np.zeros(num_bins) # initialize scores array\n \n for i in range(num_bins):\n if rest_capacity[i] == max_capacity:\n scores[i] = -1 # set score to -1 if bin has maximum capacity\n else:\n score1 = rest_capacity[i] / np.sqrt(i+1) # score based on rest capacity divided by square root of bin number\n score2 = (item / rest_capacity[i])**(1/3) # score based on cube root of item size divided by rest capacity\n score3 = np.log10((i+1) * (rest_capacity[i] / item)) # score based on logarithm of bin number times ratio of bin capacity to item size\n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the square root of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) * np.sqrt(bins / item))\n \n max_capacity = np.max(bins)\n \n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the bin number divided by the item size, prioritizing bins with higher rest capacity, lower bin numbers, and higher item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * np.arange(1, len(bins)+1) / item\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_2.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the logarithm of the bin number, the inverse of the rest capacity, and the ratio between the item size and the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1)\n capacities = bins - item\n ratios = item / capacities\n \n scores = np.log(bin_nums) * (1 / capacities) * ratios\n scores[bins == max(bins)] = -np.inf\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on a combination of weighted averages of bin rest capacity, the inverse of the bin number, and the square root of the bin capacity, prioritizing bins with higher rest capacity, lower bin numbers, and higher bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (\n (bins.max() - bins) / bins.max() + # weighted average of bin rest capacity\n 1 / (np.arange(len(bins)) + 1) + # weighted average of inverse of bin number\n np.sqrt(bins.max() - bins) # weighted average of square root of bin capacity\n )\n # Set scores of bins with capacity equal to maximum capacity to -inf\n scores[bins == bins.max()] = float('-inf')\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by taking the sum of the rest capacity divided by the item size, considering all bins regardless of their capacity, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sum(bins / item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "assign item to bin with maximum score based on rest capacity}). \n\nBased on this idea, the new algorithm assigns the item to the bin with the maximum score calculated by considering the rest capacity, the inverse of the bin number, and a weighted average of the rest capacity and the inverse of the bin number ({assign item to bin with maximum score based on rest capacity, bin number, and weighted average",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.amax(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] / max_capacity) + (1 / (i+1))\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the ratio of the rest capacity to the bin number, prioritizing bins with higher rest capacity and lower bin numbers for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the product of the rest capacity and the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n score = item / (bins[i] * (i+1))\n scores[i] = score\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the rest capacity and the inverse of the bin number to prioritize bins with both high rest capacity and lower bin numbers for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = bins * (1 / np.arange(1, len(bins)+1))\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the inverse of the bin number, the logarithm of the rest capacity, and the ratio between the rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.arange(1, len(bins)+1)) * np.log(bins) * (bins / item)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin based on the ratio between the logarithm of the bin number and the rest capacity multiplied by a factor that represents the bin's utilization trend, aiming to optimize bin utilization and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n utilization_trend_factor = 0.5\n\n # Calculate the logarithm of bin numbers\n bin_numbers = np.log10(np.arange(1, len(bins) + 1))\n\n # Calculate the ratio between logarithm of bin numbers and the rest capacity\n ratios = bin_numbers / bins\n\n # Calculate the scores for bins\n scores = ratios * utilization_trend_factor\n\n # Set the scores of unused bins to a very low value (-inf)\n unused_bins_mask = bins == bins.max()\n scores[unused_bins_mask] = float('-inf')\n\n return scores",
"objective": 0.04829,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the square root of the rest capacity multiplied by the inverse of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) * (1 / np.arange(1, len(bins) + 1))\n scores[bins == item] = -np.inf\n return scores",
"objective": 0.05252,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to bin with the maximum score based on the product of the inverse square root of the rest capacity, the logarithm of the bin number, and a random factor, aiming to increase the diversity of bin assignments.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.sqrt(bins)) * np.log(np.arange(1, len(bins) + 1))\n scores = np.multiply(scores, np.random.uniform(0.9, 1.1, len(bins)))\n scores[bins - item == 0] = 0\n return scores",
"objective": 0.05272,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign item to bin based on a score function.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the average rest capacity and prioritize bins with higher average rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=int)\n avg_rest_capacity = np.mean(bins)\n diff_rest_capacity = bins - avg_rest_capacity\n scores[diff_rest_capacity > 0] = diff_rest_capacity[diff_rest_capacity > 0]\n return scores",
"objective": 0.05322,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign item to bin with the maximum score based on the combination of rest capacity, bin number, and a weighted average of the rest capacity and the inverse of the bin number, prioritizing bins with lower rest capacity, higher bin numbers, and higher weighted average.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n weighted_average = bins / (bins.sum() + 1e-16)\n scores = bins * (weighted_average + 1 / bin_numbers)\n scores[bins == item] = 0\n return scores",
"objective": 0.05363,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the logarithm of the rest capacity, the inverse of the bin number, and a weighting factor, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) * (1 / (np.arange(len(bins)) + 1))\n scores[bins == item] = -np.inf\n return scores",
"objective": 0.05373,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_20.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number squared, the inverse of the item size, and the logarithm of the ratio between the item size and the rest capacity, prioritizing bins with higher rest capacity, smaller bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1)**2 * item * np.log(item / bins))\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the difference between the bin number and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and larger differences between the bin number and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.sqrt(np.arange(1, len(bins)+1))) * (np.log(item / bins)) * (np.abs(np.arange(1, len(bins)+1) - item))\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the bin's rest capacity divided by the square root of the bin number, the ratio between the item size and the rest capacity squared, and the exponential of the negative reciprocal of the ratio between the bin capacity and the item size cubed, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Calculate bin numbers\n rest_capacities = bins - item # Calculate rest capacities of bins\n \n # Calculate scores for each bin\n scores = rest_capacities / np.sqrt(bin_nums) # Rest capacity divided by square root of bin number\n scores *= (item / rest_capacities**2) # Ratio between item size and rest capacity squared\n scores *= np.exp(-1 / (bins / item**3)) # Exponential of negative reciprocal of ratio between bin capacity and item size cubed\n \n # Set scores of bins with maximum capacity to zero\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the cosine of the bin's rest capacity divided by the square root of the bin number, multiplied by the inverse of the sum of the item size and the rest capacity, to prioritize bins with higher rest capacity and lower bin numbers while considering the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n bin_numbers = np.arange(1, len(bins)+1)\n scores = np.cos(rest_capacity / np.sqrt(bin_numbers)) * (1 / (item + rest_capacity))\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the bin capacity and the item size, prioritizing larger rest capacity, lower bin numbers, and smaller item sizes, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n item_sizes = np.full_like(bins, item)\n \n scores = (bins * np.sqrt(bin_numbers)) / np.log(bin_capacity_ratios)\n scores[bins == np.max(bins)] = -np.inf\n scores[item_sizes > bins] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the natural logarithm of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = item / (bins - item) - np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the cube root of the ratio between the item size and the rest capacity, and the logarithm base 10 of the product of the bin number and the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n max_capacity = np.max(rest_capacity) # maximum capacity among the bins\n \n scores = np.zeros(num_bins) # initialize scores array\n \n for i in range(num_bins):\n if rest_capacity[i] == max_capacity:\n scores[i] = -1 # set score to -1 if bin has maximum capacity\n else:\n score1 = rest_capacity[i] / np.sqrt(i+1) # score based on rest capacity divided by square root of bin number\n score2 = (item / rest_capacity[i])**(1/3) # score based on cube root of item size divided by rest capacity\n score3 = np.log10((i+1) * (rest_capacity[i] / item)) # score based on logarithm of bin number times ratio of bin capacity to item size\n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the square root of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03884,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_21.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number squared, the inverse of the item size, and the logarithm of the ratio between the item size and the rest capacity, prioritizing bins with higher rest capacity, smaller bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1)**2 * item * np.log(item / bins))\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the difference between the bin number and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and larger differences between the bin number and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.sqrt(np.arange(1, len(bins)+1))) * (np.log(item / bins)) * (np.abs(np.arange(1, len(bins)+1) - item))\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the bin's rest capacity divided by the square root of the bin number, the ratio between the item size and the rest capacity squared, and the exponential of the negative reciprocal of the ratio between the bin capacity and the item size cubed, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Calculate bin numbers\n rest_capacities = bins - item # Calculate rest capacities of bins\n \n # Calculate scores for each bin\n scores = rest_capacities / np.sqrt(bin_nums) # Rest capacity divided by square root of bin number\n scores *= (item / rest_capacities**2) # Ratio between item size and rest capacity squared\n scores *= np.exp(-1 / (bins / item**3)) # Exponential of negative reciprocal of ratio between bin capacity and item size cubed\n \n # Set scores of bins with maximum capacity to zero\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the cosine of the bin's rest capacity divided by the square root of the bin number, multiplied by the inverse of the sum of the item size and the rest capacity, to prioritize bins with higher rest capacity and lower bin numbers while considering the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n bin_numbers = np.arange(1, len(bins)+1)\n scores = np.cos(rest_capacity / np.sqrt(bin_numbers)) * (1 / (item + rest_capacity))\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity and larger item sizes, with a penalty for higher bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = rest_capacity / np.log(item / rest_capacity) - i / 1000\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the natural logarithm of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = item / (bins - item) - np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the cube root of the ratio between the item size and the rest capacity, and the logarithm base 10 of the product of the bin number and the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n max_capacity = np.max(rest_capacity) # maximum capacity among the bins\n \n scores = np.zeros(num_bins) # initialize scores array\n \n for i in range(num_bins):\n if rest_capacity[i] == max_capacity:\n scores[i] = -1 # set score to -1 if bin has maximum capacity\n else:\n score1 = rest_capacity[i] / np.sqrt(i+1) # score based on rest capacity divided by square root of bin number\n score2 = (item / rest_capacity[i])**(1/3) # score based on cube root of item size divided by rest capacity\n score3 = np.log10((i+1) * (rest_capacity[i] / item)) # score based on logarithm of bin number times ratio of bin capacity to item size\n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the square root of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.sqrt(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03884,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_22.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number squared, the inverse of the item size, and the logarithm of the ratio between the item size and the rest capacity, prioritizing bins with higher rest capacity, smaller bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1)**2 * item * np.log(item / bins))\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the division of the rest capacity by the bin number, multiplied by the logarithm of three times the rest capacity, prioritizing bins with higher rest capacity and lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity / np.arange(1, len(rest_capacity) + 1) * np.log(3 * rest_capacity)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the difference between the bin number and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and larger differences between the bin number and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.sqrt(np.arange(1, len(bins)+1))) * (np.log(item / bins)) * (np.abs(np.arange(1, len(bins)+1) - item))\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the bin's rest capacity divided by the square root of the bin number, the ratio between the item size and the rest capacity squared, and the exponential of the negative reciprocal of the ratio between the bin capacity and the item size cubed, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Calculate bin numbers\n rest_capacities = bins - item # Calculate rest capacities of bins\n \n # Calculate scores for each bin\n scores = rest_capacities / np.sqrt(bin_nums) # Rest capacity divided by square root of bin number\n scores *= (item / rest_capacities**2) # Ratio between item size and rest capacity squared\n scores *= np.exp(-1 / (bins / item**3)) # Exponential of negative reciprocal of ratio between bin capacity and item size cubed\n \n # Set scores of bins with maximum capacity to zero\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the cosine of the bin's rest capacity divided by the square root of the bin number, multiplied by the inverse of the sum of the item size and the rest capacity, to prioritize bins with higher rest capacity and lower bin numbers while considering the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n bin_numbers = np.arange(1, len(bins)+1)\n scores = np.cos(rest_capacity / np.sqrt(bin_numbers)) * (1 / (item + rest_capacity))\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity and larger item sizes, with a penalty for higher bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = rest_capacity / np.log(item / rest_capacity) - i / 1000\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the natural logarithm of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = item / (bins - item) - np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the multiplication of the rest capacity, the square of the inverse of the bin number, and the logarithm of twice the rest capacity, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * (1 / np.square(np.arange(1, len(rest_capacity) + 1))) * np.log(2 * rest_capacity)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_23.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the cube root of the bin number, the logarithm of the ratio between the item size and the rest capacity squared, and the difference between the bin number and the item size divided by the sum of the bin capacity and the item size cubed, prioritizing bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins.copy()\n rest_capacity[rest_capacity == item] = 0\n bin_numbers = np.arange(1, len(bins) + 1)\n \n score_1 = rest_capacity * np.cbrt(bin_numbers)\n score_2 = np.log(item / rest_capacity**2)\n score_3 = (bin_numbers - item) / (bins + item**3)\n \n scores = score_1 * score_2 * score_3\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number squared, the inverse of the item size, and the logarithm of the ratio between the item size and the rest capacity, prioritizing bins with higher rest capacity, smaller bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1)**2 * item * np.log(item / bins))\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the division of the rest capacity by the bin number, multiplied by the logarithm of three times the rest capacity, prioritizing bins with higher rest capacity and lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity / np.arange(1, len(rest_capacity) + 1) * np.log(3 * rest_capacity)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the difference between the bin number and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and larger differences between the bin number and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.sqrt(np.arange(1, len(bins)+1))) * (np.log(item / bins)) * (np.abs(np.arange(1, len(bins)+1) - item))\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the bin's rest capacity divided by the square root of the bin number, the ratio between the item size and the rest capacity squared, and the exponential of the negative reciprocal of the ratio between the bin capacity and the item size cubed, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Calculate bin numbers\n rest_capacities = bins - item # Calculate rest capacities of bins\n \n # Calculate scores for each bin\n scores = rest_capacities / np.sqrt(bin_nums) # Rest capacity divided by square root of bin number\n scores *= (item / rest_capacities**2) # Ratio between item size and rest capacity squared\n scores *= np.exp(-1 / (bins / item**3)) # Exponential of negative reciprocal of ratio between bin capacity and item size cubed\n \n # Set scores of bins with maximum capacity to zero\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the cosine of the bin's rest capacity divided by the square root of the bin number, multiplied by the inverse of the sum of the item size and the rest capacity, to prioritize bins with higher rest capacity and lower bin numbers while considering the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n bin_numbers = np.arange(1, len(bins)+1)\n scores = np.cos(rest_capacity / np.sqrt(bin_numbers)) * (1 / (item + rest_capacity))\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity and larger item sizes, with a penalty for higher bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = rest_capacity / np.log(item / rest_capacity) - i / 1000\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the natural logarithm of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = item / (bins - item) - np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the multiplication of the rest capacity, the square of the inverse of the bin number, and the logarithm of twice the rest capacity, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * (1 / np.square(np.arange(1, len(rest_capacity) + 1))) * np.log(2 * rest_capacity)\n return scores",
"objective": 0.03864,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_24.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the cube root of the bin number, the logarithm of the ratio between the item size and the rest capacity squared, and the difference between the bin number and the item size divided by the sum of the bin capacity and the item size cubed, prioritizing bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins.copy()\n rest_capacity[rest_capacity == item] = 0\n bin_numbers = np.arange(1, len(bins) + 1)\n \n score_1 = rest_capacity * np.cbrt(bin_numbers)\n score_2 = np.log(item / rest_capacity**2)\n score_3 = (bin_numbers - item) / (bins + item**3)\n \n scores = score_1 * score_2 * score_3\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number squared, the inverse of the item size, and the logarithm of the ratio between the item size and the rest capacity, prioritizing bins with higher rest capacity, smaller bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1)**2 * item * np.log(item / bins))\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the division of the rest capacity by the bin number, multiplied by the logarithm of three times the rest capacity, prioritizing bins with higher rest capacity and lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity / np.arange(1, len(rest_capacity) + 1) * np.log(3 * rest_capacity)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the difference between the bin number and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and larger differences between the bin number and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.sqrt(np.arange(1, len(bins)+1))) * (np.log(item / bins)) * (np.abs(np.arange(1, len(bins)+1) - item))\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the bin's rest capacity divided by the square root of the bin number, the ratio between the item size and the rest capacity squared, and the exponential of the negative reciprocal of the ratio between the bin capacity and the item size cubed, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Calculate bin numbers\n rest_capacities = bins - item # Calculate rest capacities of bins\n \n # Calculate scores for each bin\n scores = rest_capacities / np.sqrt(bin_nums) # Rest capacity divided by square root of bin number\n scores *= (item / rest_capacities**2) # Ratio between item size and rest capacity squared\n scores *= np.exp(-1 / (bins / item**3)) # Exponential of negative reciprocal of ratio between bin capacity and item size cubed\n \n # Set scores of bins with maximum capacity to zero\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the cosine of the bin's rest capacity divided by the square root of the bin number, multiplied by the inverse of the sum of the item size and the rest capacity, to prioritize bins with higher rest capacity and lower bin numbers while considering the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n bin_numbers = np.arange(1, len(bins)+1)\n scores = np.cos(rest_capacity / np.sqrt(bin_numbers)) * (1 / (item + rest_capacity))\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the bin's rest capacity, bin number, and a custom function that takes into account the item size and the number of items already assigned to the bin, prioritizing bins with higher rest capacities, lower bin numbers, and a lower ratio of already assigned items to rest capacity, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n rest_capacities = bins\n num_items_assigned = np.maximum(0, bins - item)\n \n ratio_assigned_to_capacity = num_items_assigned / (rest_capacities - item)\n scores = rest_capacities * bin_numbers + ratio_assigned_to_capacity\n \n # Set scores of unused bins to a negative infinity value\n scores[rest_capacities == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Assign scores to each bin based on the sum of the bin's rest capacity divided by the exponential function of the bin number and the item size, the inverse of the logarithm of the ratio between the rest capacity and item size, and the product of the bin number and the logarithm of the ratio between the bin capacity and item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score_1 = bins[i] / (np.exp(i+1) * item)\n score_2 = np.log(bins[i] / item)**-1\n score_3 = (i+1) * np.log(bins[i] / item)\n \n scores[i] = score_1 + score_2 + score_3\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity and larger item sizes, with a penalty for higher bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = rest_capacity / np.log(item / rest_capacity) - i / 1000\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin as the ratio of the item size to the rest capacity minus the natural logarithm of the bin number, then return the scores for the bins for assignment.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = item / (bins - item) - np.log(np.arange(1, len(bins)+1))\n return scores",
"objective": 0.03854,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_25.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the cube root of the bin number, the logarithm of the ratio between the item size and the rest capacity squared, and the difference between the bin number and the item size divided by the sum of the bin capacity and the item size cubed, prioritizing bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins.copy()\n rest_capacity[rest_capacity == item] = 0\n bin_numbers = np.arange(1, len(bins) + 1)\n \n score_1 = rest_capacity * np.cbrt(bin_numbers)\n score_2 = np.log(item / rest_capacity**2)\n score_3 = (bin_numbers - item) / (bins + item**3)\n \n scores = score_1 * score_2 * score_3\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number squared, the inverse of the item size, and the logarithm of the ratio between the item size and the rest capacity, prioritizing bins with higher rest capacity, smaller bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1)**2 * item * np.log(item / bins))\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the square root of the bin number, the logarithm of the ratio between the item size and the rest capacity, and the absolute difference between the bin number and the item size divided by the sum of the bin capacity and the item size squared, prioritizing bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1)\n \n sqrtn_bin_nums = np.sqrt(bin_nums)\n log_ratio = np.log(item / bins)\n abs_diff = np.abs(bin_nums - item) / (bins + item**2)\n \n scores = bins * sqrtn_bin_nums * log_ratio * abs_diff\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the division of the rest capacity by the bin number, multiplied by the logarithm of three times the rest capacity, prioritizing bins with higher rest capacity and lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity / np.arange(1, len(rest_capacity) + 1) * np.log(3 * rest_capacity)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the sum of the logarithm of the rest capacity, the square root of the bin number, and the reciprocal of the product of the rest capacity and the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and a balanced ratio of rest capacity to bin number, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins\n rest_capacity[rest_capacity == item] = 0\n \n scores = np.log(rest_capacity) + np.sqrt(np.arange(1, len(bins)+1)) + (1 / (rest_capacity * np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.02173,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the bin's rest capacity divided by the bin number, the square root of the item size and the exponential function of the difference between the bin number and item size, in order to prioritize bins with higher rest capacities, lower bin numbers and larger differences between the bin number and item size, ultimately minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1) # Generate bin numbers\n rest_capacities = bins - item # Calculate rest capacities\n differences = np.abs(bin_numbers - item) # Calculate differences between bin numbers and item size\n\n # Calculate scores using the formula\n scores = rest_capacities / bin_numbers * np.sqrt(item) * np.exp(differences)\n\n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin's rest capacity and the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the difference between the bin number and the item size, prioritizing bins with higher rest capacity, lower bin numbers, and larger differences between the bin number and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.sqrt(np.arange(1, len(bins)+1))) * (np.log(item / bins)) * (np.abs(np.arange(1, len(bins)+1) - item))\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity divided by the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the square of the inverse of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins - item\n \n score1 = rest_capacities / bin_numbers\n score2 = np.log(item / rest_capacities)\n score3 = (1 / (bin_numbers**2)) * (1 / item)\n \n scores = score1 + score2 + score3\n \n return scores",
"objective": 0.03099,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign scores to bins based on their rest capacity, bin number, and a custom function that considers rest capacity, bin number, and item size, in order to prioritize bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios, and then assign the item to the bin with the maximum score while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n ratios = item / (bins - item)\n scores = bins + bin_nums + ratios\n scores[bins == np.max(bins)] = np.min(scores)\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the bin's rest capacity and the square root of the bin number, multiplied by the inverse of the item size, aiming to prioritize bins with higher rest capacity and lower bin numbers while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins)+1)\n rest_capacities = bins.astype(float)\n rest_capacities[rest_capacities == item] = np.inf\n \n scores = np.log(rest_capacities / np.sqrt(bin_numbers)) * (1.0 / item)\n \n return scores",
"objective": 0.0323,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the bin's rest capacity divided by the square root of the bin number, the ratio between the item size and the rest capacity squared, and the exponential of the negative reciprocal of the ratio between the bin capacity and the item size cubed, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes, excluding bins with maximum capacity, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1) # Calculate bin numbers\n rest_capacities = bins - item # Calculate rest capacities of bins\n \n # Calculate scores for each bin\n scores = rest_capacities / np.sqrt(bin_nums) # Rest capacity divided by square root of bin number\n scores *= (item / rest_capacities**2) # Ratio between item size and rest capacity squared\n scores *= np.exp(-1 / (bins / item**3)) # Exponential of negative reciprocal of ratio between bin capacity and item size cubed\n \n # Set scores of bins with maximum capacity to zero\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on the bin's rest capacity multiplied by the square root of the bin number, divided by the logarithm of the ratio between the item size and the rest capacity, prioritizing smaller rest capacity, higher bin numbers, and larger item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins*np.sqrt(np.arange(1,len(bins)+1))) / np.log(item/bins)\n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the cosine of the bin's rest capacity divided by the square root of the bin number, multiplied by the inverse of the sum of the item size and the rest capacity, to prioritize bins with higher rest capacity and lower bin numbers while considering the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n bin_numbers = np.arange(1, len(bins)+1)\n scores = np.cos(rest_capacity / np.sqrt(bin_numbers)) * (1 / (item + rest_capacity))\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of the bin's rest capacity, bin number, and a custom function that takes into account the item size and the number of items already assigned to the bin, prioritizing bins with higher rest capacities, lower bin numbers, and a lower ratio of already assigned items to rest capacity, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n rest_capacities = bins\n num_items_assigned = np.maximum(0, bins - item)\n \n ratio_assigned_to_capacity = num_items_assigned / (rest_capacities - item)\n scores = rest_capacities * bin_numbers + ratio_assigned_to_capacity\n \n # Set scores of unused bins to a negative infinity value\n scores[rest_capacities == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n continue\n \n rest_capacity = capacity - item\n bin_number = i + 1\n \n score1 = rest_capacity / np.sqrt(bin_number)\n score2 = np.log(1/(rest_capacity/item))\n score3 = bin_number * np.sqrt(capacity/item)\n \n scores[i] = score1 + score2 + score3\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_3.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the logarithm of the bin number, the inverse of the rest capacity, and the ratio between the item size and the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1)\n capacities = bins - item\n ratios = item / capacities\n \n scores = np.log(bin_nums) * (1 / capacities) * ratios\n scores[bins == max(bins)] = -np.inf\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on a combination of the ratio of the rest capacity to the bin number and the logarithm of the bin capacity, prioritizing bins with higher rest capacity and lower bin numbers, while also considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacity_ratio = bins / bins.sum()\n logarithmic_increase = np.log(bins)\n \n scores = rest_capacity_ratio * (1/bin_numbers) * logarithmic_increase\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the square root of the rest capacity to the logarithm of the bin number, emphasizing both optimal utilization and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.log(1 + np.arange(1, len(bins) + 1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on a combination of weighted averages of bin rest capacity, the inverse of the bin number, and the square root of the bin capacity, prioritizing bins with higher rest capacity, lower bin numbers, and higher bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (\n (bins.max() - bins) / bins.max() + # weighted average of bin rest capacity\n 1 / (np.arange(len(bins)) + 1) + # weighted average of inverse of bin number\n np.sqrt(bins.max() - bins) # weighted average of square root of bin capacity\n )\n # Set scores of bins with capacity equal to maximum capacity to -inf\n scores[bins == bins.max()] = float('-inf')\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by taking the sum of the rest capacity divided by the item size, considering all bins regardless of their capacity, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sum(bins / item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "assign item to bin with maximum score based on rest capacity}). \n\nBased on this idea, the new algorithm assigns the item to the bin with the maximum score calculated by considering the rest capacity, the inverse of the bin number, and a weighted average of the rest capacity and the inverse of the bin number ({assign item to bin with maximum score based on rest capacity, bin number, and weighted average",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.amax(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] / max_capacity) + (1 / (i+1))\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the ratio of the rest capacity to the bin number, prioritizing bins with higher rest capacity and lower bin numbers for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the product of the rest capacity and the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n score = item / (bins[i] * (i+1))\n scores[i] = score\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by taking into account the bin number, rest capacity, and a weighted average of the item size and the rest capacity, prioritizing bins with higher bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n num_bins = len(bins)\n max_capacity = max(bins)\n \n for i in range(num_bins):\n rest_capacity = bins[i]\n \n # If rest capacity equals to the maximum capacity, don't use the bin\n if rest_capacity == max_capacity:\n continue\n \n # Calculate the weighted average score\n weighted_avg = (item + rest_capacity) / 2\n \n # Calculate the bin score based on bin number, rest capacity, and weighted average\n bin_score = ((num_bins - i) * 100) + ((max_capacity - rest_capacity) * 10) + weighted_avg\n \n # Assign the score to the corresponding bin\n scores[i] = bin_score\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the rest capacity and the inverse of the bin number to prioritize bins with both high rest capacity and lower bin numbers for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = bins * (1 / np.arange(1, len(bins)+1))\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the inverse of the bin number, the logarithm of the rest capacity, and the ratio between the rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.arange(1, len(bins)+1)) * np.log(bins) * (bins / item)\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin based on the ratio between the logarithm of the bin number and the rest capacity multiplied by a factor that represents the bin's utilization trend, aiming to optimize bin utilization and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n utilization_trend_factor = 0.5\n\n # Calculate the logarithm of bin numbers\n bin_numbers = np.log10(np.arange(1, len(bins) + 1))\n\n # Calculate the ratio between logarithm of bin numbers and the rest capacity\n ratios = bin_numbers / bins\n\n # Calculate the scores for bins\n scores = ratios * utilization_trend_factor\n\n # Set the scores of unused bins to a very low value (-inf)\n unused_bins_mask = bins == bins.max()\n scores[unused_bins_mask] = float('-inf')\n\n return scores",
"objective": 0.04829,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the ratio of item size to rest capacity and the bin number multiplied by a fixed factor, and returns the scores for bin assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) * np.arange(len(bins)) * 2\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.05182,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the square root of the rest capacity multiplied by the inverse of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) * (1 / np.arange(1, len(bins) + 1))\n scores[bins == item] = -np.inf\n return scores",
"objective": 0.05252,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_4.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign items to bins by calculating a score that is derived from the ratio of the rest capacity to the square root of the product of the bin number and the item size, while prioritizing bins with higher rest capacity and lower bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt(np.arange(1,len(bins)+1)) * item)\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "In this new algorithm, only the bins with less than maximum capacity are considered for scoring, unlike the previous algorithm which considered all bins regardless of their capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n feasible_bins = bins[bins < max_capacity]\n scores[bins < max_capacity] = item / feasible_bins\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on a combination of the ratio of the rest capacity to the bin number and the logarithm of the bin capacity, prioritizing bins with higher rest capacity and lower bin numbers, while also considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacity_ratio = bins / bins.sum()\n logarithmic_increase = np.log(bins)\n \n scores = rest_capacity_ratio * (1/bin_numbers) * logarithmic_increase\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with higher bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins\n weighted_averages = (item + bins) / 2\n\n scores = bin_numbers * 100 + rest_capacities + weighted_averages\n\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the square root of the rest capacity to the logarithm of the bin number, emphasizing both optimal utilization and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.log(1 + np.arange(1, len(bins) + 1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the sum of the rest capacity divided by the item size, the inverse of the bin number, and the logarithm of the ratio between the rest capacity and the item size, while excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.sum() - bins) / item + 1 / np.arange(1, len(bins) + 1) + np.log(bins / item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by taking the sum of the rest capacity divided by the item size, considering all bins regardless of their capacity, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sum(bins / item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "assign item to bin with maximum score based on rest capacity}). \n\nBased on this idea, the new algorithm assigns the item to the bin with the maximum score calculated by considering the rest capacity, the inverse of the bin number, and a weighted average of the rest capacity and the inverse of the bin number ({assign item to bin with maximum score based on rest capacity, bin number, and weighted average",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.amax(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] / max_capacity) + (1 / (i+1))\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the ratio of the rest capacity to the bin number, prioritizing bins with higher rest capacity and lower bin numbers for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for each bin by dividing the inverse of the rest capacity by the product of the bin number and the item size, and assign the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins * np.arange(1, len(bins)+1) * item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by taking into account the bin number, rest capacity, and a weighted average of the item size and the rest capacity, prioritizing bins with higher bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n num_bins = len(bins)\n max_capacity = max(bins)\n \n for i in range(num_bins):\n rest_capacity = bins[i]\n \n # If rest capacity equals to the maximum capacity, don't use the bin\n if rest_capacity == max_capacity:\n continue\n \n # Calculate the weighted average score\n weighted_avg = (item + rest_capacity) / 2\n \n # Calculate the bin score based on bin number, rest capacity, and weighted average\n bin_score = ((num_bins - i) * 100) + ((max_capacity - rest_capacity) * 10) + weighted_avg\n \n # Assign the score to the corresponding bin\n scores[i] = bin_score\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the product of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins * np.sqrt(np.arange(1, len(bins) + 1)))\n scores[bins == bins.max() - item] = 0\n return scores",
"objective": 0.04336,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the bin capacity and the inverse of the bin number to prioritize bins with higher bin capacity and lower bin numbers for item assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the inverse of the bin number, the logarithm of the rest capacity, and the ratio between the rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.arange(1, len(bins)+1)) * np.log(bins) * (bins / item)\n return scores",
"objective": 0.04548,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_5.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign items to bins by calculating a score that is derived from the ratio of the rest capacity to the square root of the product of the bin number and the item size, while prioritizing bins with higher rest capacity and lower bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt(np.arange(1,len(bins)+1)) * item)\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "In this new algorithm, only the bins with less than maximum capacity are considered for scoring, unlike the previous algorithm which considered all bins regardless of their capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n feasible_bins = bins[bins < max_capacity]\n scores[bins < max_capacity] = item / feasible_bins\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on a combination of the ratio of the rest capacity to the bin number and the logarithm of the bin capacity, prioritizing bins with higher rest capacity and lower bin numbers, while also considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacity_ratio = bins / bins.sum()\n logarithmic_increase = np.log(bins)\n \n scores = rest_capacity_ratio * (1/bin_numbers) * logarithmic_increase\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with higher bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins\n weighted_averages = (item + bins) / 2\n\n scores = bin_numbers * 100 + rest_capacities + weighted_averages\n\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the square root of the rest capacity to the logarithm of the bin number, emphasizing both optimal utilization and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.log(1 + np.arange(1, len(bins) + 1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the sum of the rest capacity divided by the item size, the inverse of the bin number, and the logarithm of the ratio between the rest capacity and the item size, while excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.sum() - bins) / item + 1 / np.arange(1, len(bins) + 1) + np.log(bins / item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by taking the sum of the rest capacity divided by the item size, considering all bins regardless of their capacity, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sum(bins / item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "assign item to bin with maximum score based on rest capacity}). \n\nBased on this idea, the new algorithm assigns the item to the bin with the maximum score calculated by considering the rest capacity, the inverse of the bin number, and a weighted average of the rest capacity and the inverse of the bin number ({assign item to bin with maximum score based on rest capacity, bin number, and weighted average",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.amax(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] / max_capacity) + (1 / (i+1))\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the ratio of the rest capacity to the bin number, prioritizing bins with higher rest capacity and lower bin numbers for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for each bin by dividing the inverse of the rest capacity by the product of the bin number and the item size, and assign the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins * np.arange(1, len(bins)+1) * item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin number, rest capacity, and a weighted average of the item size and the rest capacity, prioritizing bins with lower bin numbers, higher rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n rest_capacities = bins\n weighted_avg = (item + rest_capacities) / rest_capacities\n scores = -1 * (bin_nums + 1) * (rest_capacities ** 2) * weighted_avg\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the product of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins * np.sqrt(np.arange(1, len(bins) + 1)))\n scores[bins == bins.max() - item] = 0\n return scores",
"objective": 0.04336,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the ratio of the bin capacity to the item size, the square root of the bin number, and the logarithm of the ratio between the bin capacity and the item size, while excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n b_capacity = bins / item\n b_number = np.sqrt(np.arange(1, len(bins) + 1))\n b_ratio = np.log(b_capacity / item)\n scores = b_capacity * b_number * b_ratio\n\n # Exclude bins with maximum capacity\n max_capacity = max(bins)\n scores[bins == max_capacity] = -np.inf\n\n return scores",
"objective": 0.04357,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the bin capacity and the inverse of the bin number to prioritize bins with higher bin capacity and lower bin numbers for item assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04407,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_6.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign items to bins by calculating a score that is derived from the ratio of the rest capacity to the square root of the product of the bin number and the item size, while prioritizing bins with higher rest capacity and lower bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt(np.arange(1,len(bins)+1)) * item)\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and the difference between the maximum capacity and the rest capacity of the bin, giving higher priority to bins with higher bin numbers, lower rest capacities, and larger differences between maximum and rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n bin_numbers = np.arange(len(bins)) # bin numbers from 0 to len(bins)-1\n\n # Calculate scores for each bin\n scores = bin_numbers + (max_capacity - bins) - bins / max_capacity\n\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on a combination of the ratio of the rest capacity to the bin number and the logarithm of the bin capacity, prioritizing bins with higher rest capacity and lower bin numbers, while also considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacity_ratio = bins / bins.sum()\n logarithmic_increase = np.log(bins)\n \n scores = rest_capacity_ratio * (1/bin_numbers) * logarithmic_increase\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with higher bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins\n weighted_averages = (item + bins) / 2\n\n scores = bin_numbers * 100 + rest_capacities + weighted_averages\n\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the square root of the rest capacity to the logarithm of the bin number, emphasizing both optimal utilization and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.log(1 + np.arange(1, len(bins) + 1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the sum of the rest capacity divided by the item size, the inverse of the bin number, and the logarithm of the ratio between the rest capacity and the item size, while excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.sum() - bins) / item + 1 / np.arange(1, len(bins) + 1) + np.log(bins / item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by taking the sum of the rest capacity divided by the item size, considering all bins regardless of their capacity, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sum(bins / item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "assign item to bin with maximum score based on rest capacity}). \n\nBased on this idea, the new algorithm assigns the item to the bin with the maximum score calculated by considering the rest capacity, the inverse of the bin number, and a weighted average of the rest capacity and the inverse of the bin number ({assign item to bin with maximum score based on rest capacity, bin number, and weighted average",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.amax(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] / max_capacity) + (1 / (i+1))\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the ratio of the rest capacity to the bin number, prioritizing bins with higher rest capacity and lower bin numbers for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for each bin by dividing the inverse of the rest capacity by the product of the bin number and the item size, and assign the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins * np.arange(1, len(bins)+1) * item)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin number, rest capacity, and a weighted average of the item size and the rest capacity, prioritizing bins with higher bin numbers, lower rest capacities, and lower weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n rest_capacity = bins\n weighted_average = (item * (bins / np.sum(bins))) + ((1 - item) * (1 - (bins / np.sum(bins))))\n scores = bin_numbers * rest_capacity * weighted_average\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin number, rest capacity, and a weighted average of the item size and the rest capacity, prioritizing bins with lower bin numbers, higher rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(len(bins))\n rest_capacities = bins\n weighted_avg = (item + rest_capacities) / rest_capacities\n scores = -1 * (bin_nums + 1) * (rest_capacities ** 2) * weighted_avg\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_7.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(range(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign items to bins by calculating a score that is derived from the ratio of the rest capacity to the square root of the product of the bin number and the item size, while prioritizing bins with higher rest capacity and lower bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt(np.arange(1,len(bins)+1)) * item)\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and the difference between the maximum capacity and the rest capacity of the bin, giving higher priority to bins with higher bin numbers, lower rest capacities, and larger differences between maximum and rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n bin_numbers = np.arange(len(bins)) # bin numbers from 0 to len(bins)-1\n\n # Calculate scores for each bin\n scores = bin_numbers + (max_capacity - bins) - bins / max_capacity\n\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with lower bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_number_score = bins.size - np.arange(bins.size)\n rest_capacity_score = bins.min() - bins\n weighted_average_score = (item + bins) / 2\n scores = bin_number_score + rest_capacity_score + weighted_average_score\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on a combination of the ratio of the rest capacity to the bin number and the logarithm of the bin capacity, prioritizing bins with higher rest capacity and lower bin numbers, while also considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacity_ratio = bins / bins.sum()\n logarithmic_increase = np.log(bins)\n \n scores = rest_capacity_ratio * (1/bin_numbers) * logarithmic_increase\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "\"The new algorithm assigns the item to the bin with the highest score calculated based on the ratio of the weighted average of the bin number and the item size to the rest capacity, prioritizing bins with lower ratios for assignment.\"",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = (bins / item) * (1 / (bins - item + 1))\n scores = np.argsort(ratios)\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with higher bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins\n weighted_averages = (item + bins) / 2\n\n scores = bin_numbers * 100 + rest_capacities + weighted_averages\n\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the square root of the rest capacity to the logarithm of the bin number, emphasizing both optimal utilization and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.log(1 + np.arange(1, len(bins) + 1))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns the item to the bin with the maximum score calculated by considering the sum of the rest capacity divided by the item size, the inverse of the bin number, and the logarithm of the ratio between the rest capacity and the item size, while excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.sum() - bins) / item + 1 / np.arange(1, len(bins) + 1) + np.log(bins / item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by taking the sum of the rest capacity divided by the item size, considering all bins regardless of their capacity, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sum(bins / item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "assign item to bin with maximum score based on rest capacity}). \n\nBased on this idea, the new algorithm assigns the item to the bin with the maximum score calculated by considering the rest capacity, the inverse of the bin number, and a weighted average of the rest capacity and the inverse of the bin number ({assign item to bin with maximum score based on rest capacity, bin number, and weighted average",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.amax(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] / max_capacity) + (1 / (i+1))\n \n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_8.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(range(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on the product of the inverse of the bin's rest capacity and the logarithm of the sum of the bin number and the item size, aiming to prioritize bins with lower rest capacity and higher bin numbers while considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log(item + np.arange(1,len(bins)+1))\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign items to bins by calculating a score that is derived from the ratio of the rest capacity to the square root of the product of the bin number and the item size, while prioritizing bins with higher rest capacity and lower bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt(np.arange(1,len(bins)+1)) * item)\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and the difference between the maximum capacity and the rest capacity of the bin, giving higher priority to bins with higher bin numbers, lower rest capacities, and larger differences between maximum and rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n bin_numbers = np.arange(len(bins)) # bin numbers from 0 to len(bins)-1\n\n # Calculate scores for each bin\n scores = bin_numbers + (max_capacity - bins) - bins / max_capacity\n\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with lower bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_number_score = bins.size - np.arange(bins.size)\n rest_capacity_score = bins.min() - bins\n weighted_average_score = (item + bins) / 2\n scores = bin_number_score + rest_capacity_score + weighted_average_score\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on a combination of the ratio of the rest capacity to the bin number and the logarithm of the bin capacity, prioritizing bins with higher rest capacity and lower bin numbers, while also considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacity_ratio = bins / bins.sum()\n logarithmic_increase = np.log(bins)\n \n scores = rest_capacity_ratio * (1/bin_numbers) * logarithmic_increase\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "\"The new algorithm assigns the item to the bin with the highest score calculated based on the ratio of the weighted average of the bin number and the item size to the rest capacity, prioritizing bins with lower ratios for assignment.\"",
"code": "import numpy as np\n\ndef score(item, bins):\n ratios = (bins / item) * (1 / (bins - item + 1))\n scores = np.argsort(ratios)\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with higher bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(1, len(bins) + 1)\n rest_capacities = bins\n weighted_averages = (item + bins) / 2\n\n scores = bin_numbers * 100 + rest_capacities + weighted_averages\n\n return scores",
"objective": 0.04196,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run1/population_generation_9.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n\n for i, bin_capacity in enumerate(bins):\n if bin_capacity == max_capacity:\n continue\n \n rest_capacity = bin_capacity - item\n \n scores[i] = (rest_capacity / np.sqrt(i + 1)) * np.log(rest_capacity / item) * (i + 1) * np.sqrt(bin_capacity / item)\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity, the logarithm of the rest capacity, and the inverse of the bin number, prioritizing bins with higher rest capacity, lower bin numbers, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins - item\n scores = rest_capacity * np.log(rest_capacity) * (1 / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with higher rest capacities, higher bin numbers, and lower item-size-to-rest-capacity ratios.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins)) + 1\n ratios = item / (bins - item)\n scores = bins + bin_numbers + ratios\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the square root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([])\n \n bin_numbers = np.arange(1, len(bins) + 1)\n bin_capacity_ratios = bins / item\n bin_rest_capacity_ratios = bins / (bins - item)\n \n scores = (bins - item) / np.sqrt(bin_numbers) + np.log(bin_rest_capacity_ratios) + bin_numbers * np.sqrt(bin_capacity_ratios)\n scores[bins == bins.max()] = -np.inf\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n \n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n rest_capacity = bins[i]\n bin_number = i + 1\n \n score = (rest_capacity ** (1/3)) / (np.log(rest_capacity / item)) * (bin_number * (bins[i] / item) ** (1/3))\n \n scores[i] = score\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin's rest capacity divided by the cube root of the bin number, the natural logarithm of the inverse of the ratio between the rest capacity and the item size, and the product of the bin number and the cube root of the ratio between the bin capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins.max() - item))**(1/3) * np.log(1 / (bins / item)) * (np.arange(len(bins)) + 1)**(1/3)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the rest capacity of the bin raised to the power of the bin number.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to each bin based on a combination of the bin's rest capacity divided by the square root of the bin number, the natural logarithm of the ratio between the item size and the rest capacity, and the product of the bin number and the inverse of the item size, prioritizing bins with higher rest capacity, lower bin numbers, and lower item sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item / bins) * (np.arange(1, len(bins)+1) / item)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the square of the ratio between the bin's rest capacity and the item size, the inverse of the bin number, and the square root of the ratio between the rest capacity and the item size, excluding bins with maximum capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n continue\n \n score = ((bins[i] / item) ** 2) * (1 / (i + 1)) * np.sqrt(bins[i] / item)\n scores[i] = score\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the inverse of the rest capacity and prioritize bins with lower inverse rest capacity for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the square root of the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(range(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign item to the bin with the maximum score based on the product of the inverse of the bin's rest capacity and the logarithm of the sum of the bin number and the item size, aiming to prioritize bins with lower rest capacity and higher bin numbers while considering the logarithmic increase in capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / bins) * np.log(item + np.arange(1,len(bins)+1))\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number multiplied by a constant factor.\n2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + bins.sum() + np.arange(len(bins)) * 0.5)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the ratio of the bin's rest capacity to the square root of the bin number multiplied by a factor, and select the bin with the maximum score for assignment, aiming to prioritize bins with both lower rest capacity and lower bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * item\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and the difference between the maximum capacity and the rest capacity of the bin, giving higher priority to bins with higher bin numbers, lower rest capacities, and larger differences between maximum and rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n bin_numbers = np.arange(len(bins)) # bin numbers from 0 to len(bins)-1\n\n # Calculate scores for each bin\n scores = bin_numbers + (max_capacity - bins) - bins / max_capacity\n\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns the item to the bin with the maximum score calculated by considering the bin number, rest capacity, and a weighted average of the item size and the rest capacity, giving higher priority to bins with lower bin numbers, lower rest capacities, and higher weighted averages.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_number_score = bins.size - np.arange(bins.size)\n rest_capacity_score = bins.min() - bins\n weighted_average_score = (item + bins) / 2\n scores = bin_number_score + rest_capacity_score + weighted_average_score\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: \n1. For each bin, calculate a score based on the ratio of the item size to the sum of the rest capacity and the bin number.\n2. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm will calculate the scores for each bin based on the rest capacity, the bin number, and a custom function that takes into account the item size, rest capacity, and bin number to prioritize the assignment of bins with lower rest capacities, lower bin numbers, and higher item-size-to-rest-capacity ratios.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_numbers = np.arange(len(bins))\n ratios = item / bins\n scores = bin_numbers + ratios\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_1.json
================================================
[
{
"algorithm": "Backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the product of the item size and the inverted rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins+1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate a score for each bin based on its rest capacity and assign the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity != max_capacity:\n scores[i] = (max_capacity - capacity) / capacity\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores for each bin based on a combination of rest capacity, item size, and bin index.}\n\nNew algorithm: {Calculate the scores for each bin by subtracting the product of the item size and the bin index from the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - (item * np.arange(len(bins)))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the inverse of the item size by the product of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (item * bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the rest capacity by the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms all calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the maximum between the square root of the rest capacity and the ratio of item size to bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(np.sqrt(bins), item / np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the rest capacity squared by the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 2) / (item * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = item / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by taking the inverse of the rest capacity, assigns the item to the bin with the minimum score, and returns the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n scores = np.where(bins == item, 0, scores)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item, set the rest capacities of bins that are not used to a negative value, and return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n scores[bins == item] = -1\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate scores for each bin based on some combination of rest capacity, item size, and bin index.\nNew algorithm: Calculate the scores for each bin by taking the square root of the sum of the rest capacity and twice the bin index, and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n scores = np.sqrt(bins + 2 * indices)\n return scores",
"objective": 0.08492,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on a combination of its rest capacity, the size of the item, and a predefined weight, and then assigns the item to the bin with the maximum score at each step.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(len(bins), 0, -1) # decreasing weights for bins\n\n scores = bins - item + weights\n \n return scores",
"objective": 0.10102,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by dividing the difference between the rest capacity and the item size by the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.10715,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_10.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size divided by the rest capacity minus the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / (bins - item)) - np.log(np.arange(1, len(bins) + 1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity plus the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(1, len(bins)+1)**(-0.5)\n scores = bins * weights\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Novel algorithm: Calculate scores for bins by subtracting the logarithm of both the rest capacity and item size from the product of the bin index and the square root of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n sqrt_item_size = np.sqrt(item)\n scores = indices * sqrt_item_size - np.log(bins) - np.log(item)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the sum of the item size and the rest capacity divided by the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / np.arange(1, len(bins)+1)\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the difference between the maximum capacity and the rest capacity of a bin to the sum of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n rest_capacity[rest_capacity < 0] = max_capacity\n scores = (max_capacity - rest_capacity) / (item + np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the sum of the rest capacity and the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n gamma = 0.75\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins) + 1), gamma)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04216,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_11.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size divided by the rest capacity minus the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / (bins - item)) - np.log(np.arange(1, len(bins) + 1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity plus the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the rest capacity to the square root of the bin index, multiplied by the logarithm of the item size, then return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Novel algorithm: Calculate scores for bins by subtracting the logarithm of both the rest capacity and item size from the product of the bin index and the square root of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n sqrt_item_size = np.sqrt(item)\n scores = indices * sqrt_item_size - np.log(bins) - np.log(item)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the sum of the item size and the rest capacity divided by the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / np.arange(1, len(bins)+1)\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the difference between the maximum capacity and the rest capacity of a bin to the sum of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n rest_capacity[rest_capacity < 0] = max_capacity\n scores = (max_capacity - rest_capacity) / (item + np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on a combination of item size and the rest capacity of bins to determine the best bin for item assignment.}\n\n{New algorithm: Assign scores to bins based on the difference between the logarithm of the rest capacity and the square of the item size, divided by the bin index multiplied by a constant delta.",
"code": "import numpy as np\n\ndef score(item, bins):\n delta = 0.5\n bin_indices = np.arange(1, len(bins) + 1)\n scores = (np.log(bins) - item**2) / (bin_indices * delta)\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the sum of the rest capacity and the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_12.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity multiplied by the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity plus the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the rest capacity to the square root of the bin index, multiplied by the logarithm of the item size, then return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Novel algorithm: Calculate scores for bins by subtracting the logarithm of both the rest capacity and item size from the product of the bin index and the square root of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n sqrt_item_size = np.sqrt(item)\n scores = indices * sqrt_item_size - np.log(bins) - np.log(item)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the sum of the item size and the rest capacity divided by the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / np.arange(1, len(bins)+1)\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the difference between the maximum capacity and the rest capacity of a bin to the sum of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n rest_capacity[rest_capacity < 0] = max_capacity\n scores = (max_capacity - rest_capacity) / (item + np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on a combination of item size and the rest capacity of bins to determine the best bin for item assignment.}\n\n{New algorithm: Assign scores to bins based on the difference between the logarithm of the rest capacity and the square of the item size, divided by the bin index multiplied by a constant delta.",
"code": "import numpy as np\n\ndef score(item, bins):\n delta = 0.5\n bin_indices = np.arange(1, len(bins) + 1)\n scores = (np.log(bins) - item**2) / (bin_indices * delta)\n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_13.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity multiplied by the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the rest capacity to the square root of the bin index, multiplied by the logarithm of the item size, then return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the square of the item size and the inverse of the rest capacity, subtracting the bin index from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) * (1/bins) - np.arange(len(bins))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Novel algorithm: Calculate scores for bins by subtracting the logarithm of both the rest capacity and item size from the product of the bin index and the square root of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n sqrt_item_size = np.sqrt(item)\n scores = indices * sqrt_item_size - np.log(bins) - np.log(item)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the sum of the item size and the rest capacity divided by the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / np.arange(1, len(bins)+1)\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the difference between the maximum capacity and the rest capacity of a bin to the sum of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n rest_capacity = bins - item\n rest_capacity[rest_capacity < 0] = max_capacity\n scores = (max_capacity - rest_capacity) / (item + np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04135,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_14.json
================================================
[
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "C",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = (bins != np.max(bins))\n scores[mask] = item / (np.maximum(bins[mask] - item, np.ones_like(bins[mask])))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the rest capacity to the square root of the bin index, multiplied by the logarithm of the item size, then return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the square of the item size and the inverse of the rest capacity, subtracting the bin index from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) * (1/bins) - np.arange(len(bins))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_15.json
================================================
[
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the rest capacity to the square root of the bin index, multiplied by the logarithm of the item size, then return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the square of the item size and the inverse of the rest capacity, subtracting the bin index from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) * (1/bins) - np.arange(len(bins))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_16.json
================================================
[
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the rest capacity to the square root of the bin index, multiplied by the logarithm of the item size, then return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the square of the item size and the inverse of the rest capacity, subtracting the bin index from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) * (1/bins) - np.arange(len(bins))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_17.json
================================================
[
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the rest capacity to the square root of the bin index, multiplied by the logarithm of the item size, then return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the square of the item size and the inverse of the rest capacity, subtracting the bin index from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) * (1/bins) - np.arange(len(bins))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_18.json
================================================
[
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the rest capacity to the square root of the bin index, multiplied by the logarithm of the item size, then return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) * np.log(item)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the square of the item size and the inverse of the rest capacity, subtracting the bin index from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) * (1/bins) - np.arange(len(bins))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_19.json
================================================
[
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Identify the common backbone idea: Assign scores to bins based on a combination or manipulation of the item size, rest capacity, and bin index.\n\nBased on the backbone idea, my new algorithm is: Assign scores to bins based on the difference between the square of the item size divided by the rest capacity, and the bin index multiplied by a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n gamma = 0.5\n scores = (item ** 2 / bins) - (np.arange(len(bins)) * gamma)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the square of the item size and the inverse of the rest capacity, subtracting the bin index from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) * (1/bins) - np.arange(len(bins))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_2.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "Backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the product of the item size and the inverted rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins+1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(1, len(bins)+1)**(-0.5)\n scores = bins * weights\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate a score for each bin based on its rest capacity and assign the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity != max_capacity:\n scores[i] = (max_capacity - capacity) / capacity\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the inverse of the bin index by the rest capacity multiplied by a constant factor, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (1 / (i + 1)) / ((max_capacity - capacity) * 0.5)\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by subtracting the product of the bin index and the rest capacity from the item size and return the scores for assignment.",
"code": "import numpy as np\n\n\ndef score(item, bins):\n scores = item - np.arange(len(bins)) * bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the square root of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (np.sqrt(item) + np.arange(len(bins)))\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the inverse of the item size by the product of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (item * bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.\n\nNew algorithm: Assign scores to bins based on the square of the inverted rest capacity divided by the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacity_ratio = bins.astype(float) / item\n scores = np.square(1 / capacity_ratio) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the sum of the rest capacity and the square of the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins + item) ** 2) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by taking the minimum between the rest capacity divided by the square of the bin index and the product of the item size and the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = np.minimum(rest_capacity / np.square(indices), item * rest_capacity)\n \n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the rest capacity by the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms all calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the maximum between the square root of the rest capacity and the ratio of item size to bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(np.sqrt(bins), item / np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores for each bin based on their rest capacities squared divided by the item size multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins**2) / (item * np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = item / (bins[mask] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by taking the inverse of the rest capacity, assigns the item to the bin with the minimum score, and returns the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / bins\n scores = np.where(bins == item, 0, scores)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin by multiplying the rest capacity with the inverse of the bin index and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (1 / np.arange(1, len(bins) + 1))\n scores[bins == item] = 0\n return scores",
"objective": 0.05322,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item, set the rest capacities of bins that are not used to a negative value, and return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n scores[bins == item] = -1\n return scores",
"objective": 0.05383,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_20.json
================================================
[
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin by considering the logarithm of the item size, weighted by the bin index and the difference between the item size and the bin index, divided by the rest capacity and the product of the difference mentioned.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * (bins / item) * (np.log(item) / (bins - item)) * (np.arange(len(bins)) / item)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm divides the item size by the sum of the rest capacity and the logarithm (base 2) of the bin index to determine the scores for assigning items to bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log2(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Identify the common backbone idea: Assign scores to bins based on a combination or manipulation of the item size, rest capacity, and bin index.\n\nBased on the backbone idea, my new algorithm is: Assign scores to bins based on the difference between the square of the item size divided by the rest capacity, and the bin index multiplied by a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n gamma = 0.5\n scores = (item ** 2 / bins) - (np.arange(len(bins)) * gamma)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the square of the item size and the inverse of the rest capacity, subtracting the bin index from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) * (1/bins) - np.arange(len(bins))\n return scores",
"objective": 0.04085,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_21.json
================================================
[
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin by considering the logarithm of the item size, weighted by the bin index and the difference between the item size and the bin index, divided by the rest capacity and the product of the difference mentioned.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * (bins / item) * (np.log(item) / (bins - item)) * (np.arange(len(bins)) / item)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm divides the item size by the sum of the rest capacity and the logarithm (base 2) of the bin index to determine the scores for assigning items to bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log2(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Identify the common backbone idea: Assign scores to bins based on a combination or manipulation of the item size, rest capacity, and bin index.\n\nBased on the backbone idea, my new algorithm is: Assign scores to bins based on the difference between the square of the item size divided by the rest capacity, and the bin index multiplied by a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n gamma = 0.5\n scores = (item ** 2 / bins) - (np.arange(len(bins)) * gamma)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the square of the item size and the inverse of the rest capacity, subtracting the bin index from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) * (1/bins) - np.arange(len(bins))\n return scores",
"objective": 0.04085,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_22.json
================================================
[
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the ratio between the squared difference of rest capacity and a constant alpha, and the absolute difference of the item size and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n beta = 2.0\n gamma = 0.5\n \n squared_diff = np.square(bins - item) - alpha\n abs_diff = np.abs(bins - item) - beta\n bin_index = np.arange(len(bins)) + 1\n \n scores = (squared_diff / abs_diff) / np.power(bin_index, gamma)\n \n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the sum of the square of the item size divided by the rest capacity, and the bin index multiplied by a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n gamma = 10\n scores = (item ** 2) / (bins - item) + gamma * np.arange(len(bins))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin by considering the logarithm of the item size, weighted by the bin index and the difference between the item size and the bin index, divided by the rest capacity and the product of the difference mentioned.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * (bins / item) * (np.log(item) / (bins - item)) * (np.arange(len(bins)) / item)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the item size divided by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm divides the item size by the sum of the logarithm (base 2) of the bin index and the rest capacity divided by the maximum capacity, multiplied by the square root of the bin index plus one, to determine the scores for assigning items to bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n rest_capacity = bins - item\n max_capacity = np.max(bins)\n \n scores = item / (np.log2(bin_indices + 1) + rest_capacity / max_capacity) * np.sqrt(bin_indices + 1)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm divides the item size by the sum of the rest capacity and the logarithm (base 2) of the bin index to determine the scores for assigning items to bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log2(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Identify the common backbone idea: Assign scores to bins based on a combination or manipulation of the item size, rest capacity, and bin index.\n\nBased on the backbone idea, my new algorithm is: Assign scores to bins based on the difference between the square of the item size divided by the rest capacity, and the bin index multiplied by a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n gamma = 0.5\n scores = (item ** 2 / bins) - (np.arange(len(bins)) * gamma)\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_23.json
================================================
[
{
"algorithm": "New algorithm: Assign scores to bins based on the difference between the item size and the bin index, multiplied by the logarithm of the rest capacity, plus the sum of the item size and the bin index, divided by the square of the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item - bin_index) * np.log(rest_capacity) + (item + bin_index) / (rest_capacity ** 2)\n \n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score based on a combination of the item size, bin index, and rest capacity.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size multiplied by the bin index, divided by the sum of the rest capacity and the square of the difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * np.arange(len(bins)) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02354,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the ratio between the squared difference of rest capacity and a constant alpha, and the absolute difference of the item size and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n beta = 2.0\n gamma = 0.5\n \n squared_diff = np.square(bins - item) - alpha\n abs_diff = np.abs(bins - item) - beta\n bin_index = np.arange(len(bins)) + 1\n \n scores = (squared_diff / abs_diff) / np.power(bin_index, gamma)\n \n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the sum of the square of the item size divided by the rest capacity, and the bin index multiplied by a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n gamma = 10\n scores = (item ** 2) / (bins - item) + gamma * np.arange(len(bins))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin by considering the logarithm of the item size, weighted by the bin index and the difference between the item size and the bin index, divided by the rest capacity and the product of the difference mentioned.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * (bins / item) * (np.log(item) / (bins - item)) * (np.arange(len(bins)) / item)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Divide the square of the item size by the product of the rest capacity and the bin index to the power of the inverse of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins.copy()\n rest_capacity[rest_capacity == item] = 0\n \n bin_index = np.arange(len(bins)) + 1\n \n scores = (item**2) / (rest_capacity * bin_index**(1/item))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_24.json
================================================
[
{
"algorithm": "New algorithm: Assign scores to bins based on the difference between the item size and the bin index, multiplied by the logarithm of the rest capacity, plus the sum of the item size and the bin index, divided by the square of the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item - bin_index) * np.log(rest_capacity) + (item + bin_index) / (rest_capacity ** 2)\n \n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score based on a combination of the item size, bin index, and rest capacity.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size multiplied by the bin index, divided by the sum of the rest capacity and the square of the difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * np.arange(len(bins)) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02354,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the product of the cube root of the item size multiplied by the bin index, divided by the square root of the rest capacity plus the absolute value of the difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(np.cbrt(item) * np.arange(len(bins))) / (np.sqrt(bins) + np.abs(item - np.arange(len(bins))))\n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the ratio between the squared difference of rest capacity and a constant alpha, and the absolute difference of the item size and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n beta = 2.0\n gamma = 0.5\n \n squared_diff = np.square(bins - item) - alpha\n abs_diff = np.abs(bins - item) - beta\n bin_index = np.arange(len(bins)) + 1\n \n scores = (squared_diff / abs_diff) / np.power(bin_index, gamma)\n \n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n scores = (item / (bins - item)) - bin_indices\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the sum of the square of the item size divided by the rest capacity, and the bin index multiplied by a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n gamma = 10\n scores = (item ** 2) / (bins - item) + gamma * np.arange(len(bins))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin by considering the logarithm of the item size, weighted by the bin index and the difference between the item size and the bin index, divided by the rest capacity and the product of the difference mentioned.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * (bins / item) * (np.log(item) / (bins - item)) * (np.arange(len(bins)) / item)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Divide the square of the item size by the product of the rest capacity and the bin index to the power of the inverse of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins.copy()\n rest_capacity[rest_capacity == item] = 0\n \n bin_index = np.arange(len(bins)) + 1\n \n scores = (item**2) / (rest_capacity * bin_index**(1/item))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_25.json
================================================
[
{
"algorithm": "New algorithm: Assign scores to bins based on the difference between the item size and the bin index, multiplied by the logarithm of the rest capacity, plus the sum of the item size and the bin index, divided by the square of the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item - bin_index) * np.log(rest_capacity) + (item + bin_index) / (rest_capacity ** 2)\n \n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the cosine of the bin index divided by the sum of the logarithm of the item size and the rest capacity, multiplied by the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n bin_capacity = bins - item\n scores = np.cos(bin_index / (np.log(item) + np.log(bin_capacity))) * np.sqrt(bin_index)\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate the score based on a combination of the item size, bin index, and rest capacity.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size multiplied by the bin index, divided by the sum of the rest capacity and the square of the difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * np.arange(len(bins)) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02354,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the logarithm of the product of the cube root of the item size multiplied by the bin index, divided by the square root of the rest capacity plus the absolute value of the difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(np.cbrt(item) * np.arange(len(bins))) / (np.sqrt(bins) + np.abs(item - np.arange(len(bins))))\n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Assign scores to bins based on the ratio between the squared difference of rest capacity and a constant alpha, and the absolute difference of the item size and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n beta = 2.0\n gamma = 0.5\n \n squared_diff = np.square(bins - item) - alpha\n abs_diff = np.abs(bins - item) - beta\n bin_index = np.arange(len(bins)) + 1\n \n scores = (squared_diff / abs_diff) / np.power(bin_index, gamma)\n \n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity subtracted from the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins > item)\n scores[bins == bins.max()] = np.NINF\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the inverse of the rest capacity and a constant beta (where beta can be adjusted to control the importance of rest capacity in scoring), divided by the bin index subtracted by a constant delta (where delta can be adjusted to alter the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5 # Adjust the importance of rest capacity in scoring\n delta = 0.1 # Adjust the influence of bin index in scoring\n\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n\n scores = (beta / rest_capacity) / (indices - delta)\n scores[rest_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the sum of the square of the item size divided by the rest capacity, and the bin index multiplied by a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n gamma = 10\n scores = (item ** 2) / (bins - item) + gamma * np.arange(len(bins))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin by considering the logarithm of the item size, weighted by the bin index and the difference between the item size and the bin index, divided by the rest capacity and the product of the difference mentioned.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * (bins / item) * (np.log(item) / (bins - item)) * (np.arange(len(bins)) / item)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size divided by the rest capacity raised to the power of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assign scores to bins based on some combination or manipulation of the item size, rest capacity, and bin index.}\n\n{New algorithm: Divide the square of the item size by the product of the rest capacity and the bin index to the power of the inverse of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins.copy()\n rest_capacity[rest_capacity == item] = 0\n \n bin_index = np.arange(len(bins)) + 1\n \n scores = (item**2) / (rest_capacity * bin_index**(1/item))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the cube root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of item size by the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_3.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the product of the item size and the inverted rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins+1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(1, len(bins)+1)**(-0.5)\n scores = bins * weights\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, (bins + np.arange(len(bins))))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate a score for each bin based on its rest capacity and assign the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity != max_capacity:\n scores[i] = (max_capacity - capacity) / capacity\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the sum of the rest capacity and the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n gamma = 0.75\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins) + 1), gamma)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Reverse algorithm: The score function will calculate the scores for each bin by subtracting the rest capacity of the bin from the product of the bin index and the item size and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item * np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the square root of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (np.sqrt(item) + np.arange(len(bins)))\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the square root of the item size and the ratio of the bin's rest capacity to the bin index, subtracting the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = np.sqrt(item) * (capacity / (i+1)) - item\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the inverse of the item size by the product of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (item * bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Calculate the scores for each bin by dividing the inverse of the bin index by the squared rest capacity multiplied by a different constant factor, returning the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.arange(1, len(bins) + 1)) / (bins ** 2)\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n unused_bins = np.where(bins == max_capacity)[0]\n\n if len(unused_bins) == len(bins):\n return scores\n\n scores[unused_bins] = -1\n\n non_empty_bins = np.where(bins < max_capacity)[0]\n\n scores[non_empty_bins] = (max_capacity - bins[non_empty_bins]) / item\n\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the sum of the rest capacity and the square of the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins + item) ** 2) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by taking the minimum between the rest capacity divided by the square of the bin index and the product of the item size and the rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = np.minimum(rest_capacity / np.square(indices), item * rest_capacity)\n \n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the rest capacity by the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * np.arange(1, len(bins)+1))\n return scores",
"objective": 0.04407,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_4.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the product of the item size and the inverted rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins+1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity plus the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(1, len(bins)+1)**(-0.5)\n scores = bins * weights\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, (bins + np.arange(len(bins))))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to calculate a score for each bin based on its rest capacity and assign the item to the bin with the highest score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity != max_capacity:\n scores[i] = (max_capacity - capacity) / capacity\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the sum of the rest capacity and the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n gamma = 0.75\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins) + 1), gamma)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Reverse algorithm: The score function will calculate the scores for each bin by subtracting the rest capacity of the bin from the product of the bin index and the item size and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item * np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the square root of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (np.sqrt(item) + np.arange(len(bins)))\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the square root of the item size and the ratio of the bin's rest capacity to the bin index, subtracting the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = np.sqrt(item) * (capacity / (i+1)) - item\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the inverse of the item size by the product of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (item * bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Calculate the scores for each bin by dividing the inverse of the bin index by the squared rest capacity multiplied by a different constant factor, returning the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.arange(1, len(bins) + 1)) / (bins ** 2)\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "N",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n unused_bins = np.where(bins == max_capacity)[0]\n\n if len(unused_bins) == len(bins):\n return scores\n\n scores[unused_bins] = -1\n\n non_empty_bins = np.where(bins < max_capacity)[0]\n\n scores[non_empty_bins] = (max_capacity - bins[non_empty_bins]) / item\n\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the sum of the rest capacity and the square of the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins + item) ** 2) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.04306,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_5.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the product of the item size and the inverted rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins+1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity plus the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(1, len(bins)+1)**(-0.5)\n scores = bins * weights\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, (bins + np.arange(len(bins))))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the rest capacity of each bin, dividing it by the bin index plus one, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / (np.arange(len(bins)) + 1) \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the sum of the rest capacity and the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n gamma = 0.75\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins) + 1), gamma)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Reverse algorithm: The score function will calculate the scores for each bin by subtracting the rest capacity of the bin from the product of the bin index and the item size and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item * np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for each bin by taking the sum of the inverse of the rest capacity and the square root of the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.sqrt(item * np.arange(1,len(bins)+1))\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the square root of the item size and the ratio of the bin's rest capacity to the bin index, subtracting the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n for i, capacity in enumerate(bins):\n if capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = np.sqrt(item) * (capacity / (i+1)) - item\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by dividing the inverse of the item size by the product of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (item * bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Calculate the scores for each bin by dividing the inverse of the bin index by the squared rest capacity multiplied by a different constant factor, returning the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / np.arange(1, len(bins) + 1)) / (bins ** 2)\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, subtracting the square root of the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n scores = (item * np.abs(bins - beta)) / (np.power(np.arange(1,len(bins)+1), gamma) - np.sqrt(np.arange(1,len(bins)+1)) * (1/item))\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the sum of the rest capacity and the square of the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins + item) ** 2) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.04306,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_6.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the square of the bin index, and assign items to the bin with the maximum score in each step to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n bin_indices = np.arange(len(bins)) + 1\n scores = np.abs(bins - item - beta) / (bin_indices ** 2)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the product of the item size and the inverted rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins+1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity plus the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(1, len(bins)+1)**(-0.5)\n scores = bins * weights\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(item, (bins + np.arange(len(bins))))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Novel algorithm: Calculate scores for bins by subtracting the logarithm of both the rest capacity and item size from the product of the bin index and the square root of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n sqrt_item_size = np.sqrt(item)\n scores = indices * sqrt_item_size - np.log(bins) - np.log(item)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the rest capacity of each bin, dividing it by the bin index plus one, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / (np.arange(len(bins)) + 1) \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the sum of the rest capacity and the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n gamma = 0.75\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins) + 1), gamma)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Reverse algorithm: The score function will calculate the scores for each bin by subtracting the rest capacity of the bin from the product of the bin index and the item size and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item * np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for each bin by taking the sum of the inverse of the rest capacity and the square root of the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.sqrt(item * np.arange(1,len(bins)+1))\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin by taking the difference between the rest capacity and the product of the item size and the bin index, subtracting the natural logarithm of the bin index, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1) # Generate bin indices\n scores = bins - item * bin_indices - np.log(bin_indices) # Calculate scores\n return scores",
"objective": 0.04246,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_7.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the square of the bin index, and assign items to the bin with the maximum score in each step to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n bin_indices = np.arange(len(bins)) + 1\n scores = np.abs(bins - item - beta) / (bin_indices ** 2)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the product of the item size and the inverted rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins+1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity plus the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(1, len(bins)+1)**(-0.5)\n scores = bins * weights\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores based on the logarithm of the item size divided by the sum of the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / (bins + np.arange(len(bins))))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Novel algorithm: Calculate scores for bins by subtracting the logarithm of both the rest capacity and item size from the product of the bin index and the square root of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n sqrt_item_size = np.sqrt(item)\n scores = indices * sqrt_item_size - np.log(bins) - np.log(item)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the rest capacity of each bin, dividing it by the bin index plus one, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / (np.arange(len(bins)) + 1) \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the sum of the rest capacity and the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n gamma = 0.75\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins) + 1), gamma)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Reverse algorithm: The score function will calculate the scores for each bin by subtracting the rest capacity of the bin from the product of the bin index and the item size and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item * np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for each bin by taking the sum of the inverse of the rest capacity and the square root of the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1/bins) + np.sqrt(item * np.arange(1,len(bins)+1))\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin by taking the difference between the rest capacity and the product of the item size and the bin index, subtracting the natural logarithm of the bin index, and returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins) + 1) # Generate bin indices\n scores = bins - item * bin_indices - np.log(bin_indices) # Calculate scores\n return scores",
"objective": 0.04246,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_8.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size divided by the rest capacity minus the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / (bins - item)) - np.log(np.arange(1, len(bins) + 1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the square of the bin index, and assign items to the bin with the maximum score in each step to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n bin_indices = np.arange(len(bins)) + 1\n scores = np.abs(bins - item - beta) / (bin_indices ** 2)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the product of the item size and the inverted rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins+1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity plus the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(1, len(bins)+1)**(-0.5)\n scores = bins * weights\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Novel algorithm: Calculate scores for bins by subtracting the logarithm of both the rest capacity and item size from the product of the bin index and the square root of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n sqrt_item_size = np.sqrt(item)\n scores = indices * sqrt_item_size - np.log(bins) - np.log(item)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the sum of the item size and the rest capacity of each bin, dividing it by the bin index plus one, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / (np.arange(len(bins)) + 1) \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the sum of the rest capacity and the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n gamma = 0.75\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins) + 1), gamma)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Reverse algorithm: The score function will calculate the scores for each bin by subtracting the rest capacity of the bin from the product of the bin index and the item size and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item * np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run2/population_generation_9.json
================================================
[
{
"algorithm": "\nNew algorithm: Assign scores to bins based on the ratio of the bin index multiplied by the inverse of the item size to the rest capacity, subtracting the square of the item size from the scores for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.where(bins > item)[0]\n scores = np.zeros_like(bins)\n if len(bin_indices) == 0:\n return scores\n \n bin_sizes = bins[bin_indices]\n ratios = (bin_indices * (1/item)) / bin_sizes\n scores[bin_indices] = ratios - np.square(item)\n return scores",
"objective": 0.02133,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size multiplied by the bin index, divided by the sum of the rest capacity and the squared difference between the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item * np.arange(len(bins))) / (bins + (item - np.arange(len(bins)))**2)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the absolute difference between the rest capacity and a constant beta, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 10\n gamma = 2\n \n rest_capacity = bins - item\n scores = np.abs(rest_capacity - beta) / np.power(np.arange(1, len(bins) + 1), gamma)\n \n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the square root of the item size divided by the rest capacity minus the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / (bins - item)) - np.log(np.arange(1, len(bins) + 1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha (where alpha can be adjusted to fine-tune the importance of rest capacity in scoring), divided by the bin index raised to the power of a constant gamma (where gamma can be adjusted to control the influence of bin index in scoring), returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n gamma = 0.2\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins)+1), gamma)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the product of the item size and the inverted rest capacity, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins+1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on item size and rest capacity of bins to assign item to bin with maximum score.}\n\n{New algorithm: Assign scores to bins based on the logarithm of the item size divided by the rest capacity plus the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the division of the item size by the sum of the rest capacity and the square root of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the item size by the sum of the rest capacity and the logarithm of the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.log(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores based on the item size and the rest capacity of bins to assign an item to the bin with the maximum score.}\n\n{New algorithm: Assign scores to bins based on the difference between the item size and the square root of the rest capacity, multiplied by the bin index raised to the power of two, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and square root of the rest capacity\n diff = item - np.sqrt(bins)\n \n # Calculate the scores based on the difference and the bin index raised to the power of two\n scores = diff * np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.arange(1, len(bins)+1)**(-0.5)\n scores = bins * weights\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the product of the item size and the squared difference between the rest capacity and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * (bins - np.arange(len(bins)))**2)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the ratio of the item size to the rest capacity, subtracting the bin index multiplied by the inverse of the item size from the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) - (np.arange(len(bins)) * (1/item))\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign scores to bins based on the item size divided by the rest capacity plus the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the difference between the maximum capacity and the rest capacity of a bin by the sum of the item size and the bin index to calculate the score for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) / (item + np.arange(len(bins)))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Novel algorithm: Calculate scores for bins by subtracting the logarithm of both the rest capacity and item size from the product of the bin index and the square root of the item size, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n sqrt_item_size = np.sqrt(item)\n scores = indices * sqrt_item_size - np.log(bins) - np.log(item)\n scores[bins == item] = np.inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin based on the sum of the item size and the rest capacity divided by the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item + bins) / np.arange(1, len(bins)+1)\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the rest capacity and other parameters to determine the optimal bin for item assignment.}\n\n{New algorithm: The new algorithm calculates the score for each bin by taking the sum of the rest capacity and the product of the item size and the bin index, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign scores to bins based on the square root of the rest capacity multiplied by a constant alpha, divided by the bin index raised to the power of a constant gamma, returning the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 1.5\n gamma = 0.75\n scores = np.sqrt(bins) * alpha / np.power(np.arange(1, len(bins) + 1), gamma)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Reverse algorithm: The score function will calculate the scores for each bin by subtracting the rest capacity of the bin from the product of the bin index and the item size and return the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item * np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_1.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the square of the item size by the rest capacity, giving priority to bins with lower rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.square(item) / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm modifies the score function to prioritize assigning items to bins that are closer to their maximum capacity, thus minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=int)\n sorted_indices = np.argsort(bins)\n \n for i in range(len(bins)):\n bin_index = sorted_indices[i]\n if bins[bin_index] == item:\n scores[bin_index] = -1 # If bin is exactly equal to item size, do not use it\n else:\n scores[bin_index] = item - bins[bin_index] # Calculate score based on how close the bin is to its maximum capacity\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the remaining/rest capacity.}\n\n{New algorithm: The score function will calculate the scores for each bin by dividing the item size by the sum of the rest capacity and its index, favoring bins with higher indices and lower rest capacity, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)) + 1)\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.sqrt(1 / np.arange(1, len(bins) + 1))\n scores = (bins * weights) + (item * weights)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by taking the square root of the item size divided by the product of the rest capacity and its index, promoting bins with lower rest capacity and lower index for assignment, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / (bins * np.arange(1, len(bins)+1)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores for bins based on their rest capacity and prioritize bins with higher rest capacity.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin number multiplied by the rest capacity, returning an array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (np.arange(len(bins)) + 1) * bins\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\n\nNew algorithm: The score function will calculate the scores for each bin based on the ratio of the bin's remaining capacity to the item size, incorporating a logarithmic function of the bin capacity and item size, to assign the item to the bin with the highest score in each step.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != bins.max()\n scores[mask] = np.log(bins[mask] / item)\n return scores",
"objective": 0.05614,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin by multiplying the remaining/rest capacity by the bin index, favoring lower capacity bins with higher indices for assignment, while penalizing bins with rest capacity equal to the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins != max_capacity) * ((max_capacity - bins) * np.arange(len(bins)))\n return scores",
"objective": 0.05886,
"other_inf": null
},
{
"algorithm": "1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to -1 if the available capacity is less than or equal to half of the item size, otherwise set the score to the available capacity minus the item size. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -2 to indicate that it will not be used. \n4. Return the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity <= item/2, -1, available_capacity - item)\n scores = np.where(bins == np.max(bins), -2, scores)\n return scores",
"objective": 0.06077,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by taking the difference between the item size and the rest capacity squared, divided by the index squared, promoting bins with lower rest capacity and lower index for assignment, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the index squared for each bin\n index_squared = np.arange(1, len(bins)+1)**2\n \n # Calculate the difference between item size and rest capacity squared for each bin\n diff_squared = (item - bins)**2\n \n # Calculate the scores for each bin\n scores = diff_squared / index_squared\n \n # Penalize bins with rest capacity equal to the maximum capacity\n scores[bins == np.max(bins)] = -1\n \n return scores",
"objective": 0.06359,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin by dividing the remaining capacity of each bin by the size of the current item, subtracting 1 if the remaining capacity is equal to the maximum capacity, and setting the score to 0 if the remaining capacity is less than or equal to four times the item size, then it returns the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n scores = remaining_capacity / item\n scores[remaining_capacity == max_capacity] -= 1\n scores[remaining_capacity <= 4 * item] = 0\n return scores",
"objective": 0.06983,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_10.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, lower index, and a lower value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 0.5\n bin_index = np.arange(1, len(bins) + 1)\n rest_capacity_index = (bins - item) ** bin_index\n scores = (item * bin_index) / (rest_capacity_index * k)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin plus the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = float('-inf')\n else:\n scores[i] = item / (rest_capacity - item) + np.sqrt(i)\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, larger remaining capacity, and a greater difference between the item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n capacities = bins - item\n scores = (np.log(item) * bin_indices) / (capacities ** np.sqrt(bin_indices))\n scores[capacities == max(bins)] = -np.inf\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin index squared and the inverse of the remaining capacity, aiming to prioritize bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n scores = indices ** 2 / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the item size by the rest capacity, giving priority to bins with higher rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns scores to each bin based on the logarithm of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the cube root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * np.arange(len(bins))\n scores /= bins**(1/3)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the exponential function of the item size divided by the sum of the rest capacity and the logarithm of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(item / (bins + np.log(range(1, len(bins)+1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the logarithmic function of the item size divided by the sum of the rest capacity and the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n size_ratio = np.log(item) / np.log(2)\n rest_ratio = (bins / np.sum(bins)) ** 2\n index_ratio = (np.arange(1, len(bins) + 1) / len(bins)) ** 3\n \n scores = size_ratio / (rest_ratio + index_ratio)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the product of the item size divided by the difference between the rest capacity and the logarithm of the bin index, aiming to prioritize bins with smaller rest capacity and higher index while maintaining a balance between item size and bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins)) + 1\n log_indices = np.log(indices)\n scores = (item / (bins - log_indices)).astype(np.float64)\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04035,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_11.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remainder_capacity = bins - item\n scores = (np.log(item) * index) / (remainder_capacity ** index)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the product of the item size and the bin index, divided by the square root of the remainder capacity raised to the power of the exponential function of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, lower rest capacity, and a higher rate of decrease in capacity with increasing index.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remainder_capacity = bins - item\n scores = (item * index) / (np.sqrt(remainder_capacity) ** index)\n max_score = np.max(scores)\n scores[remainder_capacity == np.max(bins)] = -np.inf\n scores[np.isnan(scores)] = -np.inf\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin plus the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = float('-inf')\n else:\n scores[i] = item / (rest_capacity - item) + np.sqrt(i)\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The score function assigns scores to each bin by dividing the square of the bin index by the difference between the item size and the remainder capacity, aiming to prioritize bins with higher index values and a larger difference between item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remainder_capacity = bins - item\n \n scores = bin_index / remainder_capacity**2\n scores[remainder_capacity == item] = 0\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, larger remaining capacity, and a greater difference between the item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n capacities = bins - item\n scores = (np.log(item) * bin_indices) / (capacities ** np.sqrt(bin_indices))\n scores[capacities == max(bins)] = -np.inf\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the inverse of the bin index plus the product of the inverse of the remaining capacity and the square root of the bin index, aiming to prioritize both bins with lower indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(bins.size) + 1\n remaining_capacities = bins - item\n remaining_capacities[remaining_capacities < 0] = 0\n scores = 1 / bin_indices + (1 / remaining_capacities) * np.sqrt(bin_indices)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the inverse of the bin index plus the product of the inverse of the remaining capacity and the logarithm of the bin index, aiming to prioritize both bins with lower indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacities = bins - item\n inverse_bin_indices = 1 / (bin_indices + 1)\n inverse_remaining_capacities = 1 / remaining_capacities\n\n scores = inverse_bin_indices + inverse_remaining_capacities * np.log(bin_indices + 1)\n scores[remaining_capacities == bins] = -np.inf\n\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin index squared and the inverse of the remaining capacity, aiming to prioritize bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n scores = indices ** 2 / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_12.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the product of the item size and the bin index, divided by the square root of the remainder capacity raised to the power of the exponential function of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, lower rest capacity, and a higher rate of decrease in capacity with increasing index.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remainder_capacity = bins - item\n scores = (item * index) / (np.sqrt(remainder_capacity) ** index)\n max_score = np.max(scores)\n scores[remainder_capacity == np.max(bins)] = -np.inf\n scores[np.isnan(scores)] = -np.inf\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The modified algorithm will assign a score to each bin based on the ratio of the item size to the rest capacity of the bin minus the product of the bin index and the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item / rest_capacity) - (index * np.sqrt(index))\n scores[rest_capacity == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin plus the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = float('-inf')\n else:\n scores[i] = item / (rest_capacity - item) + np.sqrt(i)\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The score function assigns scores to each bin by dividing the square of the bin index by the difference between the item size and the remainder capacity, aiming to prioritize bins with higher index values and a larger difference between item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remainder_capacity = bins - item\n \n scores = bin_index / remainder_capacity**2\n scores[remainder_capacity == item] = 0\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, larger remaining capacity, and a greater difference between the item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n capacities = bins - item\n scores = (np.log(item) * bin_indices) / (capacities ** np.sqrt(bin_indices))\n scores[capacities == max(bins)] = -np.inf\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the inverse of the bin index plus the product of the inverse of the remaining capacity and the square root of the bin index, aiming to prioritize both bins with lower indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(bins.size) + 1\n remaining_capacities = bins - item\n remaining_capacities[remaining_capacities < 0] = 0\n scores = 1 / bin_indices + (1 / remaining_capacities) * np.sqrt(bin_indices)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the inverse of the bin index plus the product of the inverse of the remaining capacity and the logarithm of the bin index, aiming to prioritize both bins with lower indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacities = bins - item\n inverse_bin_indices = 1 / (bin_indices + 1)\n inverse_remaining_capacities = 1 / remaining_capacities\n\n scores = inverse_bin_indices + inverse_remaining_capacities * np.log(bin_indices + 1)\n scores[remaining_capacities == bins] = -np.inf\n\n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_13.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to balance the size of the item, the remaining capacity, and the index of the bin while favoring certain combinations of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * item - bins) * (bins != np.max(bins))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index and the exponential function of the difference between the item size and the remaining capacity, aiming to balance the index of the bin and the difference in size and capacity while favoring bins with higher indices and smaller differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_scores = np.sqrt(np.arange(1, len(bins)+1)) # score based on bin index\n size_scores = np.exp(item - bins) # score based on difference in size and capacity\n scores = index_scores + size_scores # combine the scores\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The modified algorithm will assign a score to each bin based on the ratio of the item size to the rest capacity of the bin minus the product of the bin index and the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item / rest_capacity) - (index * np.sqrt(index))\n scores[rest_capacity == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the square of the item size divided by the index of the bin plus the remainder capacity, in order to favor smaller items and bins with higher index and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n capacity = bins % item\n scores = (item**2) / (index + capacity)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The score function assigns scores to each bin by dividing the square of the bin index by the difference between the item size and the remainder capacity, aiming to prioritize bins with higher index values and a larger difference between item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remainder_capacity = bins - item\n \n scores = bin_index / remainder_capacity**2\n scores[remainder_capacity == item] = 0\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, larger remaining capacity, and a greater difference between the item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin index and the item size, divided by the exponentiation of the remainder capacity raised to the power of the square root of the bin index, aiming to balance the bin index, the item size, and the relative decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remainder_capacity = bins - item\n scores = (bin_indices * item) / np.power(remainder_capacity, np.sqrt(bin_indices))\n return scores",
"objective": 0.03934,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_14.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to balance the size of the item, the remaining capacity, and the index of the bin while favoring certain combinations of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * item - bins) * (bins != np.max(bins))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index and the exponential function of the difference between the item size and the remaining capacity, aiming to balance the index of the bin and the difference in size and capacity while favoring bins with higher indices and smaller differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_scores = np.sqrt(np.arange(1, len(bins)+1)) # score based on bin index\n size_scores = np.exp(item - bins) # score based on difference in size and capacity\n scores = index_scores + size_scores # combine the scores\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The modified algorithm will assign a score to each bin based on the ratio of the item size to the rest capacity of the bin minus the product of the bin index and the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item / rest_capacity) - (index * np.sqrt(index))\n scores[rest_capacity == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the square of the item size divided by the index of the bin plus the remainder capacity, in order to favor smaller items and bins with higher index and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n capacity = bins % item\n scores = (item**2) / (index + capacity)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The score function assigns scores to each bin by dividing the square of the bin index by the difference between the item size and the remainder capacity, aiming to prioritize bins with higher index values and a larger difference between item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remainder_capacity = bins - item\n \n scores = bin_index / remainder_capacity**2\n scores[remainder_capacity == item] = 0\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, larger remaining capacity, and a greater difference between the item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the bin index multiplied by a constant value and the square root of the bin's maximum capacity, aiming to prioritize bins with lower remaining capacity, lower index, and larger maximum capacity while addressing the size of the item and providing a balanced scoring mechanism.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1) * np.sqrt(bins)\n scores[bins == np.amax(bins)] = -np.inf\n return scores",
"objective": 0.03934,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_15.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to balance the size of the item, the remaining capacity, and the index of the bin while favoring certain combinations of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * item - bins) * (bins != np.max(bins))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index and the exponential function of the difference between the item size and the remaining capacity, aiming to balance the index of the bin and the difference in size and capacity while favoring bins with higher indices and smaller differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_scores = np.sqrt(np.arange(1, len(bins)+1)) # score based on bin index\n size_scores = np.exp(item - bins) # score based on difference in size and capacity\n scores = index_scores + size_scores # combine the scores\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The modified algorithm will assign a score to each bin based on the ratio of the item size to the rest capacity of the bin minus the product of the bin index and the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item / rest_capacity) - (index * np.sqrt(index))\n scores[rest_capacity == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the square of the item size divided by the index of the bin plus the remainder capacity, in order to favor smaller items and bins with higher index and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n capacity = bins % item\n scores = (item**2) / (index + capacity)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.arange(len(bins), 0, -1)\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The score function assigns scores to each bin by dividing the square of the bin index by the difference between the item size and the remainder capacity, aiming to prioritize bins with higher index values and a larger difference between item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remainder_capacity = bins - item\n \n scores = bin_index / remainder_capacity**2\n scores[remainder_capacity == item] = 0\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, larger remaining capacity, and a greater difference between the item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the bin index multiplied by a constant value and the square root of the bin's maximum capacity, aiming to prioritize bins with lower remaining capacity, lower index, and larger maximum capacity while addressing the size of the item and providing a balanced scoring mechanism.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1) * np.sqrt(bins)\n scores[bins == np.amax(bins)] = -np.inf\n return scores",
"objective": 0.03934,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_16.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to balance the size of the item, the remaining capacity, and the index of the bin while favoring certain combinations of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * item - bins) * (bins != np.max(bins))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index and the exponential function of the difference between the item size and the remaining capacity, aiming to balance the index of the bin and the difference in size and capacity while favoring bins with higher indices and smaller differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_scores = np.sqrt(np.arange(1, len(bins)+1)) # score based on bin index\n size_scores = np.exp(item - bins) # score based on difference in size and capacity\n scores = index_scores + size_scores # combine the scores\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The modified algorithm will assign a score to each bin based on the ratio of the item size to the rest capacity of the bin minus the product of the bin index and the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item / rest_capacity) - (index * np.sqrt(index))\n scores[rest_capacity == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function assigns scores to each bin based on the difference between the item size and the rest capacity multiplied by the bin index divided by the sum of the bin index and the square root of the remainder capacity, aiming to prioritize bins with a larger difference between item size and remaining capacity, as well as bins with higher indices and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) * np.arange(1, len(bins)+1) / (np.arange(1, len(bins)+1) + np.sqrt(bins))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.arange(len(bins), 0, -1)\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, divided by the bin index squared, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) / (np.arange(len(bins)) ** 2)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the ratio of the item size to the rest capacity raised to the power of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while addressing the utilization of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins) ** np.arange(1, len(bins)+1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, larger remaining capacity, and a greater difference between the item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the bin index multiplied by a constant value and the square root of the bin's maximum capacity, aiming to prioritize bins with lower remaining capacity, lower index, and larger maximum capacity while addressing the size of the item and providing a balanced scoring mechanism.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1) * np.sqrt(bins)\n scores[bins == np.amax(bins)] = -np.inf\n return scores",
"objective": 0.03934,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_17.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(bin_indices) * np.power(remaining_capacity, bin_indices) * (item / remaining_capacity)\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each of these factors, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins.astype(float) - item)\n \n # Define weights for bin index, remaining capacity, and ratio of item size to capacity\n index_weight = 0.4\n capacity_weight = 0.3\n ratio_weight = 0.3\n \n # Calculate the scores for each bin using the defined weights and factors\n scores = index_weight * np.arange(len(bins)) + capacity_weight * bins + ratio_weight * ratios\n \n # Set scores of bins with maximum capacity to a very low value to avoid their selection\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index and the logarithmic value of the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = bin_index * np.log(remaining_capacity) ** bin_index\n return scores",
"objective": 0.03521,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to balance the size of the item, the remaining capacity, and the index of the bin while favoring certain combinations of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * item - bins) * (bins != np.max(bins))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index and the exponential function of the difference between the item size and the remaining capacity, aiming to balance the index of the bin and the difference in size and capacity while favoring bins with higher indices and smaller differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_scores = np.sqrt(np.arange(1, len(bins)+1)) # score based on bin index\n size_scores = np.exp(item - bins) # score based on difference in size and capacity\n scores = index_scores + size_scores # combine the scores\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The modified algorithm will assign a score to each bin based on the ratio of the item size to the rest capacity of the bin minus the product of the bin index and the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item / rest_capacity) - (index * np.sqrt(index))\n scores[rest_capacity == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function assigns scores to each bin based on the difference between the item size and the rest capacity multiplied by the bin index divided by the sum of the bin index and the square root of the remainder capacity, aiming to prioritize bins with a larger difference between item size and remaining capacity, as well as bins with higher indices and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) * np.arange(1, len(bins)+1) / (np.arange(1, len(bins)+1) + np.sqrt(bins))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.arange(len(bins), 0, -1)\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, divided by the bin index squared, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) / (np.arange(len(bins)) ** 2)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03904,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_18.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(bin_indices) * np.power(remaining_capacity, bin_indices) * (item / remaining_capacity)\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each of these factors, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins.astype(float) - item)\n \n # Define weights for bin index, remaining capacity, and ratio of item size to capacity\n index_weight = 0.4\n capacity_weight = 0.3\n ratio_weight = 0.3\n \n # Calculate the scores for each bin using the defined weights and factors\n scores = index_weight * np.arange(len(bins)) + capacity_weight * bins + ratio_weight * ratios\n \n # Set scores of bins with maximum capacity to a very low value to avoid their selection\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index and the logarithmic value of the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = bin_index * np.log(remaining_capacity) ** bin_index\n return scores",
"objective": 0.03521,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index, the logarithm of the remaining capacity raised to the power of 2, and the inverse of the item size, aiming to prioritize both bins with higher indices, larger remaining capacities, and smaller item sizes for an optimal bin assignment to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = np.log10(bins - item) ** 2\n item_size_inverse = 1 / item\n\n scores = np.sqrt(bin_indices) + remaining_capacity + item_size_inverse\n scores[bins == np.max(bins)] = -np.inf\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to balance the size of the item, the remaining capacity, and the index of the bin while favoring certain combinations of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * item - bins) * (bins != np.max(bins))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index and the exponential function of the difference between the item size and the remaining capacity, aiming to balance the index of the bin and the difference in size and capacity while favoring bins with higher indices and smaller differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_scores = np.sqrt(np.arange(1, len(bins)+1)) # score based on bin index\n size_scores = np.exp(item - bins) # score based on difference in size and capacity\n scores = index_scores + size_scores # combine the scores\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The modified algorithm will assign a score to each bin based on the ratio of the item size to the rest capacity of the bin minus the product of the bin index and the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item / rest_capacity) - (index * np.sqrt(index))\n scores[rest_capacity == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function assigns scores to each bin based on the difference between the item size and the rest capacity multiplied by the bin index divided by the sum of the bin index and the square root of the remainder capacity, aiming to prioritize bins with a larger difference between item size and remaining capacity, as well as bins with higher indices and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) * np.arange(1, len(bins)+1) / (np.arange(1, len(bins)+1) + np.sqrt(bins))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * np.arange(len(bins), 0, -1)\n return scores",
"objective": 0.03894,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_19.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins))\n remaining_capacity = bins - item\n \n inverse_exponential = np.exp(-bin_indexes)\n remaining_capacity_power = remaining_capacity ** bin_indexes\n \n ratio = item / remaining_capacity\n \n scores = inverse_exponential * remaining_capacity_power * ratio\n\n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(bin_indices) * np.power(remaining_capacity, bin_indices) * (item / remaining_capacity)\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each of these factors, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins.astype(float) - item)\n \n # Define weights for bin index, remaining capacity, and ratio of item size to capacity\n index_weight = 0.4\n capacity_weight = 0.3\n ratio_weight = 0.3\n \n # Calculate the scores for each bin using the defined weights and factors\n scores = index_weight * np.arange(len(bins)) + capacity_weight * bins + ratio_weight * ratios\n \n # Set scores of bins with maximum capacity to a very low value to avoid their selection\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index and the logarithmic value of the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = bin_index * np.log(remaining_capacity) ** bin_index\n return scores",
"objective": 0.03521,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index, the logarithm of the remaining capacity raised to the power of 2, and the inverse of the item size, aiming to prioritize both bins with higher indices, larger remaining capacities, and smaller item sizes for an optimal bin assignment to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = np.log10(bins - item) ** 2\n item_size_inverse = 1 / item\n\n scores = np.sqrt(bin_indices) + remaining_capacity + item_size_inverse\n scores[bins == np.max(bins)] = -np.inf\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to balance the size of the item, the remaining capacity, and the index of the bin while favoring certain combinations of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * item - bins) * (bins != np.max(bins))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index and the exponential function of the difference between the item size and the remaining capacity, aiming to balance the index of the bin and the difference in size and capacity while favoring bins with higher indices and smaller differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_scores = np.sqrt(np.arange(1, len(bins)+1)) # score based on bin index\n size_scores = np.exp(item - bins) # score based on difference in size and capacity\n scores = index_scores + size_scores # combine the scores\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The modified algorithm will assign a score to each bin based on the ratio of the item size to the rest capacity of the bin minus the product of the bin index and the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item / rest_capacity) - (index * np.sqrt(index))\n scores[rest_capacity == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function assigns scores to each bin based on the difference between the item size and the rest capacity multiplied by the bin index divided by the sum of the bin index and the square root of the remainder capacity, aiming to prioritize bins with a larger difference between item size and remaining capacity, as well as bins with higher indices and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) * np.arange(1, len(bins)+1) / (np.arange(1, len(bins)+1) + np.sqrt(bins))\n return scores",
"objective": 0.03884,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_2.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the bin index divided by the square root of the remaining capacity, favoring bins with lower indices and higher remaining capacity, ensuring a unique scoring approach. In each step, the item will be assigned to the bin with the maximum score until all items are assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n capacities = np.sqrt(bins - item)\n scores = indices / capacities\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the square of the item size by the rest capacity, giving priority to bins with lower rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.square(item) / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as the rest capacity divided by the square root of the bin number plus one, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity divided by the bin number raised to the power of 1/3, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1) ** (1/3))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the remaining/rest capacity.}\n\n{New algorithm: The score function will calculate the scores for each bin by dividing the square of the item size by the sum of the rest capacity and the bin index, aiming to prioritize bins with lower indices and higher rest capacity while considering the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on a modified ratio of the rest capacity to the product of the bin index and a user-defined parameter to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (np.arange(len(bins)) * 2 + 1)) * item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The modified algorithm will calculate the score for each bin as the rest capacity divided by the logarithm of the bin number plus one, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(np.arange(1, len(bins) + 1) + 1)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.sqrt(1 / np.arange(1, len(bins) + 1))\n scores = (bins * weights) + (item * weights)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the remaining capacity to the square of the bin index plus one, promoting bins with higher remaining capacity and lower indices to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / ((np.arange(len(bins))+1)**2 + 1)) * (bins != np.max(bins))\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the square of the item size by the difference between the rest capacity and the bin index, aiming to prioritize bins with higher indices and lower rest capacity while considering the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.square(item) / (bins.size - np.arange(1, bins.size+1))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin by dividing the remaining capacity by the bin index, promoting bins with higher rest capacity and lower index, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.arange(1, len(bins) + 1)) * (bins != np.max(bins))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by taking the square root of the item size divided by the product of the rest capacity and its index, promoting bins with lower rest capacity and lower index for assignment, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / (bins * np.arange(1, len(bins)+1)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores for bins based on their rest capacity and prioritize bins with higher rest capacity.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the logarithm of the ratio between the remaining capacity and the bin index, favoring bins with higher rest capacity and lower index, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins/item) - np.log(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin by considering the logarithmic ratio between the item size and the difference between the remaining capacity and a weighted average of the capacities, promoting bins with larger remaining capacity and smaller differences, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n weighted_avg = np.average(bins)\n differences = max_capacity - weighted_avg\n ratios = np.log(item / differences)\n scores = ratios * (bins != max_capacity)\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores for bins based on their rest capacity and prioritize bins with higher rest capacity.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the inverse of the bin number multiplied by the rest capacity, returning an array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (np.arange(len(bins)) + 1) * bins\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: Assign bins based on the ratio of the rest capacity to the square root of the bin index, promoting bins with higher remaining capacity and lower index, while penalizing bins with rest capacity equal to the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins)+1))) - (bins == np.max(bins))\n return scores",
"objective": 0.04467,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the product of the rest capacity and the square root of the inverse of the bin number, then return the scores for each bin for assignment, aiming to prioritize bins with lower rest capacity and higher bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacity = bins[bins >= item]\n scores = rest_capacity * np.sqrt(1 / np.arange(len(rest_capacity), 0, -1))\n return scores",
"objective": 0.04598,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by taking the square root of the item size minus the product of the rest capacity and the bin index, promoting bins with higher rest capacity and lower index for assignment, while penalizing bins with rest capacity equal to the maximum capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item - (bins * np.arange(1, len(bins)+1)))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04668,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_20.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins))\n remaining_capacity = bins - item\n \n inverse_exponential = np.exp(-bin_indexes)\n remaining_capacity_power = remaining_capacity ** bin_indexes\n \n ratio = item / remaining_capacity\n \n scores = inverse_exponential * remaining_capacity_power * ratio\n\n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(bin_indices) * np.power(remaining_capacity, bin_indices) * (item / remaining_capacity)\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each of these factors, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins.astype(float) - item)\n \n # Define weights for bin index, remaining capacity, and ratio of item size to capacity\n index_weight = 0.4\n capacity_weight = 0.3\n ratio_weight = 0.3\n \n # Calculate the scores for each bin using the defined weights and factors\n scores = index_weight * np.arange(len(bins)) + capacity_weight * bins + ratio_weight * ratios\n \n # Set scores of bins with maximum capacity to a very low value to avoid their selection\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the product of the item size and the bin index divided by the remaining capacity raised to the power of the bin index multiplied by a constant value, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher value of the constant factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n constant = 0.5\n\n scores = np.log(item * indices) / (remaining_capacity ** indices) * constant\n scores[remaining_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index and the logarithmic value of the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = bin_index * np.log(remaining_capacity) ** bin_index\n return scores",
"objective": 0.03521,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the inverse product of the bin index, the remaining capacity raised to the power of the bin index multiplied by the natural logarithm of the ratio of the item size to the remaining capacity, aiming to favor bins with lower index and higher remaining capacity while considering the item's size in relation to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = (1 / index) * (remaining_capacity ** index) * np.log(item / remaining_capacity)\n return scores",
"objective": 0.03642,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index, the logarithm of the remaining capacity raised to the power of 2, and the inverse of the item size, aiming to prioritize both bins with higher indices, larger remaining capacities, and smaller item sizes for an optimal bin assignment to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = np.log10(bins - item) ** 2\n item_size_inverse = 1 / item\n\n scores = np.sqrt(bin_indices) + remaining_capacity + item_size_inverse\n scores[bins == np.max(bins)] = -np.inf\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to balance the size of the item, the remaining capacity, and the index of the bin while favoring certain combinations of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (2 * item - bins) * (bins != np.max(bins))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index divided by the inverse square root of the remaining capacity, aiming to balance the index of the bin and the rate of decrease in capacity while favoring bins with higher indices and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.arange(len(bins)) + 1) / np.sqrt(bins - item)\n scores[bins == np.amax(bins)] = 0\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The modified algorithm will assign a score to each bin based on the ratio of the item size to the rest capacity of the bin minus the product of the bin index and the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n rest_capacity = bins - item\n \n scores = (item / rest_capacity) - (index * np.sqrt(index))\n scores[rest_capacity == np.max(bins)] = -np.inf\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_21.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each factor, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n ratio = item / remaining_capacity\n weights = np.array([0.4, 0.3, 0.3]) # Adjust weights as desired\n \n scores = indices * weights[0] + remaining_capacity * weights[1] + ratio * weights[2]\n scores[remaining_capacity == bins] = -np.inf\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The new algorithm assigns scores to each bin based on the bin index, the remaining capacity raised to the power of the bin index multiplied by the natural logarithm of the ratio of the item size to the remaining capacity, aiming to favor bins with higher index and lower remaining capacity while considering the item's size in relation to the remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins.copy()\n remaining_capacity[bins == item] = 0\n scores = np.power(remaining_capacity, indices) * np.log(item / remaining_capacity)\n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(-bin_indices) + np.exp(-remaining_capacity**bin_indices) + (item/remaining_capacity)\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins))\n remaining_capacity = bins - item\n \n inverse_exponential = np.exp(-bin_indexes)\n remaining_capacity_power = remaining_capacity ** bin_indexes\n \n ratio = item / remaining_capacity\n \n scores = inverse_exponential * remaining_capacity_power * ratio\n\n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(bin_indices) * np.power(remaining_capacity, bin_indices) * (item / remaining_capacity)\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each of these factors, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins.astype(float) - item)\n \n # Define weights for bin index, remaining capacity, and ratio of item size to capacity\n index_weight = 0.4\n capacity_weight = 0.3\n ratio_weight = 0.3\n \n # Calculate the scores for each bin using the defined weights and factors\n scores = index_weight * np.arange(len(bins)) + capacity_weight * bins + ratio_weight * ratios\n \n # Set scores of bins with maximum capacity to a very low value to avoid their selection\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the product of the item size and the bin index divided by the remaining capacity raised to the power of the bin index multiplied by a constant value, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher value of the constant factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n constant = 0.5\n\n scores = np.log(item * indices) / (remaining_capacity ** indices) * constant\n scores[remaining_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the logarithm of the bin index, the square root of the remaining capacity raised to the power of the bin index, and the cube of the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins)+1)\n remaining_capacity = bins - item\n ratio = item / remaining_capacity\n \n scores = np.log(bin_index) + np.sqrt(remaining_capacity)**bin_index + ratio**3\n scores[remaining_capacity == np.max(bins)-item] = -np.inf\n \n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index and the logarithmic value of the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = bin_index * np.log(remaining_capacity) ** bin_index\n return scores",
"objective": 0.03521,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the bin index and the remaining capacity multiplied by the square root of the quotient between the bin index and the remaining capacity, aiming to balance the index of the bin, the remaining capacity, and the rate of decrease in capacity with increasing index while favoring bins with higher indices and lower rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_count = len(bins)\n \n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the bin indices\n bin_indices = np.arange(bin_count) + 1\n \n # Calculate the score for each bin\n scores = (bin_indices + remaining_capacity) * np.sqrt(bin_indices / remaining_capacity)\n \n # Set scores of bins with maximum capacity to -inf to exclude them from being used\n scores[remaining_capacity == np.max(remaining_capacity)] = -np.inf\n \n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the logarithm of the bin index, the square root of the remaining capacity raised to the power of the bin index, and the product of the item size and the inverse of the rest capacity, aiming to balance the index and capacity factors while favoring bins with lower index and larger remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n \n scores = np.log(bin_index) + np.sqrt(remaining_capacity) ** bin_index + (item * (1 / remaining_capacity))\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03622,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the inverse product of the bin index, the remaining capacity raised to the power of the bin index multiplied by the natural logarithm of the ratio of the item size to the remaining capacity, aiming to favor bins with lower index and higher remaining capacity while considering the item's size in relation to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = (1 / index) * (remaining_capacity ** index) * np.log(item / remaining_capacity)\n return scores",
"objective": 0.03642,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the square root of the bin index, the logarithm of the remaining capacity raised to the power of 2, and the inverse of the item size, aiming to prioritize both bins with higher indices, larger remaining capacities, and smaller item sizes for an optimal bin assignment to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = np.log10(bins - item) ** 2\n item_size_inverse = 1 / item\n\n scores = np.sqrt(bin_indices) + remaining_capacity + item_size_inverse\n scores[bins == np.max(bins)] = -np.inf\n\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_22.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the logarithm of the bin index, the square of the remaining capacity divided by the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher rest capacity with a non-linear relationship.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n \n scores = np.log(bin_index) * (remaining_capacity**2 / bin_index) * (item / remaining_capacity)\n \n # Filter out bins with maximum capacity\n max_capacity = np.max(bins)\n scores[remaining_capacity == max_capacity] = 0\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each factor, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n ratio = item / remaining_capacity\n weights = np.array([0.4, 0.3, 0.3]) # Adjust weights as desired\n \n scores = indices * weights[0] + remaining_capacity * weights[1] + ratio * weights[2]\n scores[remaining_capacity == bins] = -np.inf\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The new algorithm assigns scores to each bin based on the bin index, the remaining capacity raised to the power of the bin index multiplied by the natural logarithm of the ratio of the item size to the remaining capacity, aiming to favor bins with higher index and lower remaining capacity while considering the item's size in relation to the remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins.copy()\n remaining_capacity[bins == item] = 0\n scores = np.power(remaining_capacity, indices) * np.log(item / remaining_capacity)\n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(-bin_indices) + np.exp(-remaining_capacity**bin_indices) + (item/remaining_capacity)\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins))\n remaining_capacity = bins - item\n \n inverse_exponential = np.exp(-bin_indexes)\n remaining_capacity_power = remaining_capacity ** bin_indexes\n \n ratio = item / remaining_capacity\n \n scores = inverse_exponential * remaining_capacity_power * ratio\n\n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the sine function of the bin index, the cosine function of the remaining capacity raised to the power of the inverse bin index, and the logarithm of the item size, in order to incorporate trigonometric and logarithmic functions for a unique scoring approach while considering the bin index, remaining capacity, and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n inverse_bin_index = 1 / (bin_index + 1)\n scores = np.sin(bin_index) * np.cos(remaining_capacity**inverse_bin_index) * np.log(item)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the logarithm of the bin index, the square root of the remaining capacity raised to the power of the bin index, and the inverse of the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n \n scores = np.log(index) * np.sqrt(remaining_capacity)**index * (item / remaining_capacity)\n \n # Set score to 0 for bins with maximum capacity\n scores[remaining_capacity == bins] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(bin_indices) * np.power(remaining_capacity, bin_indices) * (item / remaining_capacity)\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each of these factors, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins.astype(float) - item)\n \n # Define weights for bin index, remaining capacity, and ratio of item size to capacity\n index_weight = 0.4\n capacity_weight = 0.3\n ratio_weight = 0.3\n \n # Calculate the scores for each bin using the defined weights and factors\n scores = index_weight * np.arange(len(bins)) + capacity_weight * bins + ratio_weight * ratios\n \n # Set scores of bins with maximum capacity to a very low value to avoid their selection\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the square root of the product of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the remaining capacity, aiming to balance the size and capacity factors while giving higher priority to bins with higher index and higher remaining capacity and favoring a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n scores = np.sqrt(bin_indexes * remaining_capacity**bin_indexes * (item / remaining_capacity))\n scores[remaining_capacity == np.max(bins)] = -np.inf\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the product of the item size and the bin index divided by the remaining capacity raised to the power of the bin index multiplied by a constant value, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher value of the constant factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n constant = 0.5\n\n scores = np.log(item * indices) / (remaining_capacity ** indices) * constant\n scores[remaining_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the square root of the bin index, the logarithm of the remaining capacity raised to the power of the bin index, and the product of the item size and the inverse of the rest capacity, aiming to prioritize bins with lower index, larger remaining capacity, and penalize bins with smaller remaining capacity by introducing logarithmic scaling.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.sqrt(bin_indices) * np.log(remaining_capacity) ** bin_indices * item / remaining_capacity\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index raised to the power of the item size, divided by the square root of the remaining capacity, aiming to optimize the balance between item size, bin index, and remaining capacity for effective bin assignment in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1\n remaining_capacities = np.sqrt(bins - item)\n scores = (bin_indices ** item) / remaining_capacities\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the logarithm of the bin index, the square root of the remaining capacity raised to the power of the bin index, and the cube of the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins)+1)\n remaining_capacity = bins - item\n ratio = item / remaining_capacity\n \n scores = np.log(bin_index) + np.sqrt(remaining_capacity)**bin_index + ratio**3\n scores[remaining_capacity == np.max(bins)-item] = -np.inf\n \n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the product of the bin index and the logarithmic value of the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = bin_index * np.log(remaining_capacity) ** bin_index\n return scores",
"objective": 0.03521,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_23.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the logarithm of the bin index, the square of the remaining capacity divided by the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher rest capacity with a non-linear relationship.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n \n scores = np.log(bin_index) * (remaining_capacity**2 / bin_index) * (item / remaining_capacity)\n \n # Filter out bins with maximum capacity\n max_capacity = np.max(bins)\n scores[remaining_capacity == max_capacity] = 0\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each factor, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n ratio = item / remaining_capacity\n weights = np.array([0.4, 0.3, 0.3]) # Adjust weights as desired\n \n scores = indices * weights[0] + remaining_capacity * weights[1] + ratio * weights[2]\n scores[remaining_capacity == bins] = -np.inf\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The new algorithm assigns scores to each bin based on the bin index, the remaining capacity raised to the power of the bin index multiplied by the natural logarithm of the ratio of the item size to the remaining capacity, aiming to favor bins with higher index and lower remaining capacity while considering the item's size in relation to the remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins.copy()\n remaining_capacity[bins == item] = 0\n scores = np.power(remaining_capacity, indices) * np.log(item / remaining_capacity)\n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(-bin_indices) + np.exp(-remaining_capacity**bin_indices) + (item/remaining_capacity)\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the bin index, the remaining capacity divided by the bin index, and the square root of the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = np.log(indices) + remaining_capacity / indices + np.sqrt(item / remaining_capacity)\n scores[remaining_capacity == np.max(bins)] = 0\n return scores",
"objective": 0.02224,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the squared ratio of the item size to the rest capacity, divided by the bin index raised to the power of the inverse of the remaining capacity, aiming to favor bins with lower index and higher rest capacity, while penalizing larger items relative to the available space.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n bin_indices = np.arange(len(bins)) + 1\n remaining_caps = bins - item\n\n scores = np.log((item**2 / remaining_caps)) / (bin_indices**remaining_caps)\n\n return scores",
"objective": 0.02465,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins))\n remaining_capacity = bins - item\n \n inverse_exponential = np.exp(-bin_indexes)\n remaining_capacity_power = remaining_capacity ** bin_indexes\n \n ratio = item / remaining_capacity\n \n scores = inverse_exponential * remaining_capacity_power * ratio\n\n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the sine function of the bin index, the cosine function of the remaining capacity raised to the power of the inverse bin index, and the logarithm of the item size, in order to incorporate trigonometric and logarithmic functions for a unique scoring approach while considering the bin index, remaining capacity, and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n inverse_bin_index = 1 / (bin_index + 1)\n scores = np.sin(bin_index) * np.cos(remaining_capacity**inverse_bin_index) * np.log(item)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the absolute differences between the bin index and the remaining capacity, multiplied by the logarithm of the ratio of the item size to the rest capacity, aiming to prioritize both the proximity of the bin to its original index and the suitability of the available space for the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_diff = np.abs(np.arange(len(bins)) - bins)\n ratio = np.log(item / bins)\n scores = index_diff * ratio\n return scores",
"objective": 0.02878,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the logarithm of the bin index, the square root of the remaining capacity raised to the power of the bin index, and the inverse of the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n \n scores = np.log(index) * np.sqrt(remaining_capacity)**index * (item / remaining_capacity)\n \n # Set score to 0 for bins with maximum capacity\n scores[remaining_capacity == bins] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(bin_indices) * np.power(remaining_capacity, bin_indices) * (item / remaining_capacity)\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each of these factors, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins.astype(float) - item)\n \n # Define weights for bin index, remaining capacity, and ratio of item size to capacity\n index_weight = 0.4\n capacity_weight = 0.3\n ratio_weight = 0.3\n \n # Calculate the scores for each bin using the defined weights and factors\n scores = index_weight * np.arange(len(bins)) + capacity_weight * bins + ratio_weight * ratios\n \n # Set scores of bins with maximum capacity to a very low value to avoid their selection\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the square root of the product of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the remaining capacity, aiming to balance the size and capacity factors while giving higher priority to bins with higher index and higher remaining capacity and favoring a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n scores = np.sqrt(bin_indexes * remaining_capacity**bin_indexes * (item / remaining_capacity))\n scores[remaining_capacity == np.max(bins)] = -np.inf\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the product of the item size and the bin index divided by the remaining capacity raised to the power of the bin index multiplied by a constant value, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher value of the constant factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n constant = 0.5\n\n scores = np.log(item * indices) / (remaining_capacity ** indices) * constant\n scores[remaining_capacity == bins] = -np.inf\n\n return scores",
"objective": 0.033,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the square root of the bin index, the logarithm of the remaining capacity raised to the power of the bin index, and the product of the item size and the inverse of the rest capacity, aiming to prioritize bins with lower index, larger remaining capacity, and penalize bins with smaller remaining capacity by introducing logarithmic scaling.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.sqrt(bin_indices) * np.log(remaining_capacity) ** bin_indices * item / remaining_capacity\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_24.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the logarithm of the bin index, the square of the remaining capacity divided by the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher rest capacity with a non-linear relationship.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n \n scores = np.log(bin_index) * (remaining_capacity**2 / bin_index) * (item / remaining_capacity)\n \n # Filter out bins with maximum capacity\n max_capacity = np.max(bins)\n scores[remaining_capacity == max_capacity] = 0\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each factor, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n ratio = item / remaining_capacity\n weights = np.array([0.4, 0.3, 0.3]) # Adjust weights as desired\n \n scores = indices * weights[0] + remaining_capacity * weights[1] + ratio * weights[2]\n scores[remaining_capacity == bins] = -np.inf\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, aiming to achieve a balanced score that takes into account all three factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(bins.size)\n bin_ratio = item / (bins - item)\n scores = bin_index + bins + bin_ratio\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The new algorithm assigns scores to each bin based on the bin index, the remaining capacity raised to the power of the bin index multiplied by the natural logarithm of the ratio of the item size to the remaining capacity, aiming to favor bins with higher index and lower remaining capacity while considering the item's size in relation to the remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins.copy()\n remaining_capacity[bins == item] = 0\n scores = np.power(remaining_capacity, indices) * np.log(item / remaining_capacity)\n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(-bin_indices) + np.exp(-remaining_capacity**bin_indices) + (item/remaining_capacity)\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the logarithm of the bin index, the cube of the remaining capacity divided by the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher rest capacity with a non-linear relationship.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(1, len(bins) + 1)\n remaining_capacities = bins - item\n scores = np.log(indices) + (remaining_capacities**3 / indices) + (item / remaining_capacities)\n scores[remaining_capacities == bins] = -np.inf\n return scores",
"objective": 0.02113,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the bin index, the remaining capacity divided by the bin index, and the square root of the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = np.log(indices) + remaining_capacity / indices + np.sqrt(item / remaining_capacity)\n scores[remaining_capacity == np.max(bins)] = 0\n return scores",
"objective": 0.02224,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the squared ratio of the item size to the rest capacity, divided by the bin index raised to the power of the inverse of the remaining capacity, aiming to favor bins with lower index and higher rest capacity, while penalizing larger items relative to the available space.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n bin_indices = np.arange(len(bins)) + 1\n remaining_caps = bins - item\n\n scores = np.log((item**2 / remaining_caps)) / (bin_indices**remaining_caps)\n\n return scores",
"objective": 0.02465,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins))\n remaining_capacity = bins - item\n \n inverse_exponential = np.exp(-bin_indexes)\n remaining_capacity_power = remaining_capacity ** bin_indexes\n \n ratio = item / remaining_capacity\n \n scores = inverse_exponential * remaining_capacity_power * ratio\n\n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the sine function of the bin index, the cosine function of the remaining capacity raised to the power of the inverse bin index, and the logarithm of the item size, in order to incorporate trigonometric and logarithmic functions for a unique scoring approach while considering the bin index, remaining capacity, and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n inverse_bin_index = 1 / (bin_index + 1)\n scores = np.sin(bin_index) * np.cos(remaining_capacity**inverse_bin_index) * np.log(item)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the absolute differences between the bin index and the remaining capacity, multiplied by the logarithm of the ratio of the item size to the rest capacity, aiming to prioritize both the proximity of the bin to its original index and the suitability of the available space for the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_diff = np.abs(np.arange(len(bins)) - bins)\n ratio = np.log(item / bins)\n scores = index_diff * ratio\n return scores",
"objective": 0.02878,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the inverse exponential values of the bin index, two times the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n \n exponential_values = np.exp(-bin_index)\n capacity_factor = 2 * np.power(remaining_capacity, bin_index)\n size_factor = item / remaining_capacity\n \n scores = exponential_values * capacity_factor * size_factor\n \n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the logarithm of the bin index, the square root of the remaining capacity raised to the power of the bin index, and the inverse of the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n \n scores = np.log(index) * np.sqrt(remaining_capacity)**index * (item / remaining_capacity)\n \n # Set score to 0 for bins with maximum capacity\n scores[remaining_capacity == bins] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(bin_indices) * np.power(remaining_capacity, bin_indices) * (item / remaining_capacity)\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each of these factors, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins.astype(float) - item)\n \n # Define weights for bin index, remaining capacity, and ratio of item size to capacity\n index_weight = 0.4\n capacity_weight = 0.3\n ratio_weight = 0.3\n \n # Calculate the scores for each bin using the defined weights and factors\n scores = index_weight * np.arange(len(bins)) + capacity_weight * bins + ratio_weight * ratios\n \n # Set scores of bins with maximum capacity to a very low value to avoid their selection\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the square root of the product of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the remaining capacity, aiming to balance the size and capacity factors while giving higher priority to bins with higher index and higher remaining capacity and favoring a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n scores = np.sqrt(bin_indexes * remaining_capacity**bin_indexes * (item / remaining_capacity))\n scores[remaining_capacity == np.max(bins)] = -np.inf\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin by calculating the sum of the bin index divided by the remaining capacity raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = indices / np.power(remaining_capacity, indices)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_25.json
================================================
[
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the logarithm of the bin index, the square of the remaining capacity divided by the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher rest capacity with a non-linear relationship.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n \n scores = np.log(bin_index) * (remaining_capacity**2 / bin_index) * (item / remaining_capacity)\n \n # Filter out bins with maximum capacity\n max_capacity = np.max(bins)\n scores[remaining_capacity == max_capacity] = 0\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each factor, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins - item\n ratio = item / remaining_capacity\n weights = np.array([0.4, 0.3, 0.3]) # Adjust weights as desired\n \n scores = indices * weights[0] + remaining_capacity * weights[1] + ratio * weights[2]\n scores[remaining_capacity == bins] = -np.inf\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, aiming to achieve a balanced score that takes into account all three factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(bins.size)\n bin_ratio = item / (bins - item)\n scores = bin_index + bins + bin_ratio\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The new algorithm assigns scores to each bin based on the bin index, the remaining capacity raised to the power of the bin index multiplied by the natural logarithm of the ratio of the item size to the remaining capacity, aiming to favor bins with higher index and lower remaining capacity while considering the item's size in relation to the remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacity = bins.copy()\n remaining_capacity[bins == item] = 0\n scores = np.power(remaining_capacity, indices) * np.log(item / remaining_capacity)\n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(-bin_indices) + np.exp(-remaining_capacity**bin_indices) + (item/remaining_capacity)\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns scores to each bin based on the sum of the logarithm of the bin index, the cube of the remaining capacity divided by the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher rest capacity with a non-linear relationship.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(1, len(bins) + 1)\n remaining_capacities = bins - item\n scores = np.log(indices) + (remaining_capacities**3 / indices) + (item / remaining_capacities)\n scores[remaining_capacities == bins] = -np.inf\n return scores",
"objective": 0.02113,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the reciprocal of the bin index, the difference between the remaining capacity and the item size divided by the bin index, and the square of the logarithm of the ratio of the item size to the rest capacity, aiming to prioritize bins with lower index, higher remaining capacity relative to item size, and a non-linear relationship between item size and available space.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(1, len(bins)+1)\n remaining_capacity = bins - item\n ratio = item / remaining_capacity\n \n scores = 1/bin_indices + remaining_capacity/bin_indices + np.log(ratio)**2\n \n return scores",
"objective": 0.02153,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the bin index, the remaining capacity divided by the bin index, and the square root of the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = np.log(indices) + remaining_capacity / indices + np.sqrt(item / remaining_capacity)\n scores[remaining_capacity == np.max(bins)] = 0\n return scores",
"objective": 0.02224,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the squared ratio of the item size to the rest capacity, divided by the bin index raised to the power of the inverse of the remaining capacity, aiming to favor bins with lower index and higher rest capacity, while penalizing larger items relative to the available space.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n bin_indices = np.arange(len(bins)) + 1\n remaining_caps = bins - item\n\n scores = np.log((item**2 / remaining_caps)) / (bin_indices**remaining_caps)\n\n return scores",
"objective": 0.02465,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the inverse exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins))\n remaining_capacity = bins - item\n \n inverse_exponential = np.exp(-bin_indexes)\n remaining_capacity_power = remaining_capacity ** bin_indexes\n \n ratio = item / remaining_capacity\n \n scores = inverse_exponential * remaining_capacity_power * ratio\n\n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the sine function of the bin index, the cosine function of the remaining capacity raised to the power of the inverse bin index, and the logarithm of the item size, in order to incorporate trigonometric and logarithmic functions for a unique scoring approach while considering the bin index, remaining capacity, and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n inverse_bin_index = 1 / (bin_index + 1)\n scores = np.sin(bin_index) * np.cos(remaining_capacity**inverse_bin_index) * np.log(item)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the absolute differences between the bin index and the remaining capacity, multiplied by the logarithm of the ratio of the item size to the rest capacity, aiming to prioritize both the proximity of the bin to its original index and the suitability of the available space for the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n index_diff = np.abs(np.arange(len(bins)) - bins)\n ratio = np.log(item / bins)\n scores = index_diff * ratio\n return scores",
"objective": 0.02878,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the inverse of the bin index multiplied by the logarithm of the ratio of the item size to the remaining capacity, aiming to favor bins with lower index and larger remaining capacity while considering the item's size in relation to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=np.float64)\n max_capacity = np.max(bins)\n \n if max_capacity == bins[0]:\n scores[1:] = np.log(item / bins[1:])\n\n else:\n scores[0] = 1 / (np.log(item / max_capacity) + 1)\n scores[1:] = (1 / np.arange(2, len(bins) + 1)) * np.log(item / bins[1:])\n \n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the inverse exponential values of the bin index, two times the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(len(bins))\n remaining_capacity = bins - item\n \n exponential_values = np.exp(-bin_index)\n capacity_factor = 2 * np.power(remaining_capacity, bin_index)\n size_factor = item / remaining_capacity\n \n scores = exponential_values * capacity_factor * size_factor\n \n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the logarithm of the bin index, the square root of the remaining capacity raised to the power of the bin index, and the inverse of the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with lower index and lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n \n scores = np.log(index) * np.sqrt(remaining_capacity)**index * (item / remaining_capacity)\n \n # Set score to 0 for bins with maximum capacity\n scores[remaining_capacity == bins] = 0\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the sum of the exponential values of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the rest capacity, aiming to balance the size and capacity factors while favoring bins with higher index and higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n \n scores = np.exp(bin_indices) * np.power(remaining_capacity, bin_indices) * (item / remaining_capacity)\n \n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin index, the remaining capacity, and the ratio of the item size to the rest capacity, with specific weights assigned to each of these factors, in order to achieve a balanced scoring system that minimizes the number of used bins while considering the size and capacity differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins.astype(float) - item)\n \n # Define weights for bin index, remaining capacity, and ratio of item size to capacity\n index_weight = 0.4\n capacity_weight = 0.3\n ratio_weight = 0.3\n \n # Calculate the scores for each bin using the defined weights and factors\n scores = index_weight * np.arange(len(bins)) + capacity_weight * bins + ratio_weight * ratios\n \n # Set scores of bins with maximum capacity to a very low value to avoid their selection\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the square root of the product of the bin index, the remaining capacity raised to the power of the bin index, and the ratio of the item size to the remaining capacity, aiming to balance the size and capacity factors while giving higher priority to bins with higher index and higher remaining capacity and favoring a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indexes = np.arange(len(bins)) + 1\n remaining_capacity = bins - item\n scores = np.sqrt(bin_indexes * remaining_capacity**bin_indexes * (item / remaining_capacity))\n scores[remaining_capacity == np.max(bins)] = -np.inf\n return scores",
"objective": 0.0326,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_3.json
================================================
[
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = (item * bin_indices) / (np.exp(remaining_capacity) ** bin_indices)\n scores[remaining_capacity == bins] = 0\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the bin index divided by the square root of the remaining capacity, favoring bins with lower indices and higher remaining capacity, ensuring a unique scoring approach. In each step, the item will be assigned to the bin with the maximum score until all items are assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n capacities = np.sqrt(bins - item)\n scores = indices / capacities\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the item size by the rest capacity, giving priority to bins with higher rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as the rest capacity divided by the square root of the bin number plus one, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity divided by the bin number raised to the power of 1/3, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1) ** (1/3))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the remaining/rest capacity.}\n\n{New algorithm: The score function will calculate the scores for each bin by dividing the square of the item size by the sum of the rest capacity and the bin index, aiming to prioritize bins with lower indices and higher rest capacity while considering the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on a modified ratio of the rest capacity to the product of the bin index and a user-defined parameter to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (np.arange(len(bins)) * 2 + 1)) * item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The modified algorithm will calculate the score for each bin as the rest capacity divided by the logarithm of the bin number plus one, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(np.arange(1, len(bins) + 1) + 1)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.sqrt(1 / np.arange(1, len(bins) + 1))\n scores = (bins * weights) + (item * weights)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the product of the item size and the bin index divided by the sum of the rest capacity and the square of the bin index plus one, aiming to balance the size of the item, the remaining capacity, and the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n scores = (item * index) / (bins + index**2 + 1)\n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the remaining capacity to the square of the bin index plus one, promoting bins with higher remaining capacity and lower indices to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / ((np.arange(len(bins))+1)**2 + 1)) * (bins != np.max(bins))\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the inverse of the rest capacity, this time giving priority to bins with higher rest capacity, and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.reciprocal(bins)).astype(np.float32)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin by dividing the remaining capacity by the bin index, promoting bins with higher rest capacity and lower index, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.arange(1, len(bins) + 1)) * (bins != np.max(bins))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the product of the item size and the square root of the remaining capacity divided by the bin index plus one, aiming to prioritize smaller items with higher remaining capacity and favoring bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.sqrt(bins) / (np.arange(len(bins), dtype=float) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores for bins based on their rest capacity and prioritize bins with higher rest capacity.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the logarithm of the ratio between the remaining capacity and the bin index, favoring bins with higher rest capacity and lower index, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins/item) - np.log(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the product of the item size and the bin index divided by the sum of the rest capacity and the square of the bin index minus one, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n rest_capacity = bins - item\n denominator = rest_capacity + bin_indices**2 - 1\n scores = item * bin_indices / denominator\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_4.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the square root of the ratio of the item size to the rest capacity of the bin raised to the power of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / bins) ** (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the bin index divided by the square root of the remaining capacity, favoring bins with lower indices and higher remaining capacity, ensuring a unique scoring approach. In each step, the item will be assigned to the bin with the maximum score until all items are assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n capacities = np.sqrt(bins - item)\n scores = indices / capacities\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the item size by the rest capacity, giving priority to bins with higher rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the rest capacity by the square root of the bin index plus one, aiming to prioritize bins with both higher rest capacity and lower index while considering the index of the bin in the calculation of the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(bins.size) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity divided by the bin number raised to the power of 1/3, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1) ** (1/3))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The algorithms calculate scores for each bin based on the remaining/rest capacity.}\n\n{New algorithm: The score function will calculate the scores for each bin by dividing the square of the item size by the sum of the rest capacity and the bin index, aiming to prioritize bins with lower indices and higher rest capacity while considering the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2) / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on a modified ratio of the rest capacity to the product of the bin index and a user-defined parameter to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (np.arange(len(bins)) * 2 + 1)) * item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The modified algorithm will calculate the score for each bin as the rest capacity divided by the logarithm of the bin number plus one, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(np.arange(1, len(bins) + 1) + 1)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.sqrt(1 / np.arange(1, len(bins) + 1))\n scores = (bins * weights) + (item * weights)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the product of the item size and the bin index divided by the sum of the rest capacity and the square of the bin index plus one, aiming to balance the size of the item, the remaining capacity, and the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n scores = (item * index) / (bins + index**2 + 1)\n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the remaining capacity to the square of the bin index plus one, promoting bins with higher remaining capacity and lower indices to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / ((np.arange(len(bins))+1)**2 + 1)) * (bins != np.max(bins))\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the inverse of the rest capacity, this time giving priority to bins with higher rest capacity, and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.reciprocal(bins)).astype(np.float32)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin by dividing the remaining capacity by the bin index, promoting bins with higher rest capacity and lower index, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.arange(1, len(bins) + 1)) * (bins != np.max(bins))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the product of the item size and the square root of the remaining capacity divided by the bin index plus one, aiming to prioritize smaller items with higher remaining capacity and favoring bins with lower indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.sqrt(bins) / (np.arange(len(bins), dtype=float) + 1))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Calculate scores for bins based on their rest capacity and prioritize bins with higher rest capacity.}\n\n{New algorithm: The score function will calculate the scores for each bin based on the logarithm of the ratio between the remaining capacity and the bin index, favoring bins with higher rest capacity and lower index, while penalizing bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins/item) - np.log(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the product of the item size and the bin index divided by the sum of the rest capacity and the square of the bin index minus one, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n rest_capacity = bins - item\n denominator = rest_capacity + bin_indices**2 - 1\n scores = item * bin_indices / denominator\n return scores",
"objective": 0.04276,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_5.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the square root of the ratio of the item size to the rest capacity of the bin raised to the power of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / bins) ** (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the bin index divided by the square root of the remaining capacity, favoring bins with lower indices and higher remaining capacity, ensuring a unique scoring approach. In each step, the item will be assigned to the bin with the maximum score until all items are assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n capacities = np.sqrt(bins - item)\n scores = indices / capacities\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the item size by the rest capacity, giving priority to bins with higher rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the rest capacity by the square root of the bin index plus one, aiming to prioritize bins with both higher rest capacity and lower index while considering the index of the bin in the calculation of the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(np.arange(bins.size) + 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity divided by the bin number raised to the power of 1/3, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1) ** (1/3))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns bins based on the quotient between the item's size and the sum of the rest capacity and the bin index, guaranteeing that larger items will be placed in bins with higher remaining capacity and lower index values.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the item size to the square of the bin index plus one, divided by the sum of the rest capacity and the bin index, aiming to prioritize the size of the item and the index of the bin over the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(bins.size)\n rest_capacity = bins - item\n scores = (item / (bin_indices**2 + 1)) / (rest_capacity + bin_indices)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on a modified ratio of the rest capacity to the product of the bin index and a user-defined parameter to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (np.arange(len(bins)) * 2 + 1)) * item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The modified algorithm will calculate the score for each bin as the rest capacity divided by the logarithm of the bin number plus one, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(np.arange(1, len(bins) + 1) + 1)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.sqrt(1 / np.arange(1, len(bins) + 1))\n scores = (bins * weights) + (item * weights)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the product of the item size and the bin index divided by the sum of the rest capacity and the square of the bin index plus one, aiming to balance the size of the item, the remaining capacity, and the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n scores = (item * index) / (bins + index**2 + 1)\n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the remaining capacity to the square of the bin index plus one, promoting bins with higher remaining capacity and lower indices to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / ((np.arange(len(bins))+1)**2 + 1)) * (bins != np.max(bins))\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The score function calculates scores for each bin based on the remaining capacity and the item size.}\n\n{New algorithm: The score function will calculate the scores for each bin by taking the minimum of the square root of the item size and the remaining capacity, emphasizing bins with more remaining capacity and smaller items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(np.sqrt(item), bins)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the inverse of the rest capacity divided by the sum of the bin index and a user-defined parameter to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins).astype(float)\n max_capacity = max(bins)\n denominator = np.arange(len(bins)) + 1\n scores = (max_capacity - bins) / (denominator + 1)\n scores[denominator == max_capacity] = 0\n scores /= np.sum(scores)\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_6.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the square root of the ratio of the item size to the rest capacity of the bin raised to the power of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / bins) ** (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the sum of the rest capacity and a user-defined parameter to the square root of the bin index, with the aim of optimizing the assignment and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n # Calculate the ratio of the sum of rest capacity to the square root of bin index\n ratio = np.sum(rest_capacity) / np.sqrt(np.arange(1, num_bins+1))\n \n # Assign scores based on the ratio\n scores = ratio / rest_capacity\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the bin index divided by the square root of the remaining capacity, favoring bins with lower indices and higher remaining capacity, ensuring a unique scoring approach. In each step, the item will be assigned to the bin with the maximum score until all items are assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n capacities = np.sqrt(bins - item)\n scores = indices / capacities\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the item size by the rest capacity, giving priority to bins with higher rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the exponential function of the item size divided by the sum of the rest capacity and the logarithm of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(item / (bins + np.log(range(1, len(bins)+1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the rest capacity to the square root of the bin index, with the aim of optimizing the assignment and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins) + 1))) * (bins != np.max(bins))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity divided by the bin number raised to the power of 1/3, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1) ** (1/3))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns bins based on the quotient between the item's size and the sum of the rest capacity and the bin index, guaranteeing that larger items will be placed in bins with higher remaining capacity and lower index values.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the item size to the square of the bin index plus one, divided by the sum of the rest capacity and the bin index, aiming to prioritize the size of the item and the index of the bin over the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(bins.size)\n rest_capacity = bins - item\n scores = (item / (bin_indices**2 + 1)) / (rest_capacity + bin_indices)\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on a modified ratio of the rest capacity to the product of the bin index and a user-defined parameter to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (np.arange(len(bins)) * 2 + 1)) * item\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The modified algorithm will calculate the score for each bin as the rest capacity divided by the logarithm of the bin number plus one, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(np.arange(1, len(bins) + 1) + 1)\n scores[bins == max(bins)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on a weighted average of the rest capacity and the inverse of the square root of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.sqrt(1 / np.arange(1, len(bins) + 1))\n scores = (bins * weights) + (item * weights)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the product of the item size and the bin index divided by the sum of the rest capacity and the square of the bin index plus one, aiming to balance the size of the item, the remaining capacity, and the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins)) + 1\n scores = (item * index) / (bins + index**2 + 1)\n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function will assign bins based on the square root of the product of the item size and the bin index, divided by the sum of the remainder capacity and the square of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins))\n \n scores = np.sqrt(item * bin_indices) / (bins + bin_indices**2)\n \n return scores",
"objective": 0.04186,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_7.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the square root of the ratio of the item size to the rest capacity of the bin raised to the power of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / bins) ** (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the sum of the rest capacity and a user-defined parameter to the square root of the bin index, with the aim of optimizing the assignment and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n # Calculate the ratio of the sum of rest capacity to the square root of bin index\n ratio = np.sum(rest_capacity) / np.sqrt(np.arange(1, num_bins+1))\n \n # Assign scores based on the ratio\n scores = ratio / rest_capacity\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the bin index divided by the square root of the remaining capacity, favoring bins with lower indices and higher remaining capacity, ensuring a unique scoring approach. In each step, the item will be assigned to the bin with the maximum score until all items are assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n capacities = np.sqrt(bins - item)\n scores = indices / capacities\n scores[bins == max(bins)] = -np.inf\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the item size by the rest capacity, giving priority to bins with higher rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Using a combination of the item size, bin index, and rest capacity, the new algorithm assigns bins based on a logarithmic function with adjustable parameters, aiming to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = np.log(item) / np.log(rest_capacity / (max_capacity - rest_capacity))\n\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the exponential function of the item size divided by the sum of the rest capacity and the logarithm of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(item / (bins + np.log(range(1, len(bins)+1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "T",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=int)\n max_capacity = np.max(bins)\n\n # Calculate score for each bin\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1 # Not using bins with maximum capacity\n else:\n remaining_capacity = max_capacity - bins[i]\n scores[i] = remaining_capacity - item\n\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the rest capacity to the square root of the bin index, with the aim of optimizing the assignment and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins) + 1))) * (bins != np.max(bins))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio of the bin index subtracted by the square root of the remaining capacity, aiming to prioritize bins with lower indices and higher remaining capacities for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = np.sqrt(bins - item)\n scores = indices - remaining_capacities\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity divided by the bin number raised to the power of 1/3, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1) ** (1/3))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns bins based on the quotient between the item's size and the sum of the rest capacity and the bin index, guaranteeing that larger items will be placed in bins with higher remaining capacity and lower index values.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the item size to the square of the bin index plus one, divided by the sum of the rest capacity and the bin index, aiming to prioritize the size of the item and the index of the bin over the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(bins.size)\n rest_capacity = bins - item\n scores = (item / (bin_indices**2 + 1)) / (rest_capacity + bin_indices)\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_8.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the sum of the rest capacity and a user-defined parameter to the square root of the bin index, with the aim of optimizing the assignment and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n # Calculate the ratio of the sum of rest capacity to the square root of bin index\n ratio = np.sum(rest_capacity) / np.sqrt(np.arange(1, num_bins+1))\n \n # Assign scores based on the ratio\n scores = ratio / rest_capacity\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin index squared and the inverse of the remaining capacity, aiming to prioritize bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n scores = indices ** 2 / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the item size by the rest capacity, giving priority to bins with higher rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Using a combination of the item size, bin index, and rest capacity, the new algorithm assigns bins based on a logarithmic function with adjustable parameters, aiming to optimize the assignment and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = -np.inf\n else:\n scores[i] = np.log(item) / np.log(rest_capacity / (max_capacity - rest_capacity))\n\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the exponential function of the item size divided by the sum of the rest capacity and the logarithm of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(item / (bins + np.log(range(1, len(bins)+1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the logarithmic function of the item size divided by the sum of the rest capacity and the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n size_ratio = np.log(item) / np.log(2)\n rest_ratio = (bins / np.sum(bins)) ** 2\n index_ratio = (np.arange(1, len(bins) + 1) / len(bins)) ** 3\n \n scores = size_ratio / (rest_ratio + index_ratio)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the rest capacity to the square root of the bin index, with the aim of optimizing the assignment and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins) + 1))) * (bins != np.max(bins))\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio of the bin index subtracted by the square root of the remaining capacity, aiming to prioritize bins with lower indices and higher remaining capacities for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = np.sqrt(bins - item)\n scores = indices - remaining_capacities\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity divided by the bin number raised to the power of 1/3, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.arange(1, len(bins)+1) ** (1/3))\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns bins based on the quotient between the item's size and the sum of the rest capacity and the bin index, guaranteeing that larger items will be placed in bins with higher remaining capacity and lower index values.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins + np.arange(len(bins)))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the item size to the square of the bin index plus one, divided by the sum of the rest capacity and the bin index, aiming to prioritize the size of the item and the index of the bin over the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(bins.size)\n rest_capacity = bins - item\n scores = (item / (bin_indices**2 + 1)) / (rest_capacity + bin_indices)\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_CoevolutionThoughts&Codes/T2T2C/Run3/population_generation_9.json
================================================
[
{
"algorithm": "Modified algorithm: The score function will calculate the scores for each bin based on the remaining capacity, penalizing bins with maximum capacity and also considering the number of items already assigned to each bin, to further reduce the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items already assigned to each bin\n assigned_items = np.ceil(remaining_capacity/item)\n \n # Calculate the score for each bin\n scores = remaining_capacity - (assigned_items - 1) * item\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the bin index multiplied by a constant factor, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a lower rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n index = np.arange(len(bins))\n remaining_capacity = bins - item\n scores = np.exp(item * index / (remaining_capacity**index * 0.5))\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, lower index, and a lower value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 0.5\n bin_index = np.arange(1, len(bins) + 1)\n rest_capacity_index = (bins - item) ** bin_index\n scores = (item * bin_index) / (rest_capacity_index * k)\n return scores",
"objective": 0.0327,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the product of the item size and the bin index by the rest capacity raised to the power of the bin index multiplied by a constant value k, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity, higher index, and a higher value of k.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2 # Constant value\n bin_index = np.arange(len(bins))\n rest_capacity_indexed = bins - item\n scores = (item * bin_index) / (rest_capacity_indexed**bin_index * k)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "The new algorithm uses the bin index cubed as a factor in the score function to give higher priority to bins with higher indices and lower remaining capacities, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins ** 3) / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the exponential function of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the square root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_indices = np.arange(len(bins)) + 1 # bin index starts from 1\n remainder_capacity = bins - item\n\n scores = (item * np.exp(bin_indices))/(remainder_capacity**np.sqrt(bin_indices))\n scores[remainder_capacity == bins] = 0 # Ignore bins with full capacity\n\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the bin index squared plus the inverse of the remaining capacity, aiming to prioritize both bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n remaining_capacities = bins - item\n \n scores = indices ** 2 + (1 / remaining_capacities)\n \n max_capacity = np.max(bins)\n scores[bins == max_capacity] = -np.inf\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin minus the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the product of the item size and the bin index divided by the exponential function of the rest capacity raised to the power of the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_index = np.arange(1, len(bins) + 1)\n remaining_capacity = bins - item\n scores = (item * bin_index) / (np.exp(remaining_capacity) ** np.sqrt(bin_index))\n scores[remaining_capacity == max(bins)] = -np.inf\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the ratio of the item size to the rest capacity of the bin plus the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n max_capacity = np.max(bins)\n \n for i, rest_capacity in enumerate(bins):\n if rest_capacity == max_capacity:\n scores[i] = float('-inf')\n else:\n scores[i] = item / (rest_capacity - item) + np.sqrt(i)\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the item size and the rest capacity, divided by the sum of the bin index and a constant value, aiming to prioritize bins with lower remaining capacity and lower index while addressing the size of the item and providing a constant factor to balance the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item - bins) / (np.arange(len(bins)) + 1)\n scores[bins == bins.max()] = -np.inf\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score function calculates the scores for each bin based on the logarithm of the ratio of the item size to the rest capacity of the bin, multiplied by the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with lower remaining capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item / bins) * (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the logarithm of the ratio between the item size and the remaining capacity, multiplied by the square root of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, larger remaining capacity, and a greater difference between the item size and remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item/bins) * np.sqrt(np.arange(1, len(bins)+1))\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the sum of the rest capacity and a user-defined parameter to the square root of the bin index, with the aim of optimizing the assignment and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n rest_capacity = bins - item\n \n # Calculate the ratio of the sum of rest capacity to the square root of bin index\n ratio = np.sum(rest_capacity) / np.sqrt(np.arange(1, num_bins+1))\n \n # Assign scores based on the ratio\n scores = ratio / rest_capacity\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the product of the bin index squared and the inverse of the remaining capacity, aiming to prioritize bins with higher indices and lower remaining capacities while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n indices = np.arange(len(bins))\n scores = indices ** 2 / (bins - item)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin by dividing the item size by the rest capacity, giving priority to bins with higher rest capacity and returning the scores as a Numpy array for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The modified algorithm assigns scores to each bin based on the logarithm of the item size multiplied by the bin index, divided by the remainder capacity raised to the power of the cube root of the bin index, in order to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher index, higher rest capacity, and a higher rate of decrease in capacity with increasing index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(item) * np.arange(len(bins))\n scores /= bins**(1/3)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the exponential function of the item size divided by the sum of the rest capacity and the logarithm of the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(item / (bins + np.log(range(1, len(bins)+1))))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the logarithmic function of the item size divided by the sum of the rest capacity and the bin index, aiming to balance the size of the item, the remaining capacity, and the index of the bin while favoring bins with higher rest capacity and higher index.",
"code": "import numpy as np\n\ndef score(item, bins):\n size_ratio = np.log(item) / np.log(2)\n rest_ratio = (bins / np.sum(bins)) ** 2\n index_ratio = (np.arange(1, len(bins) + 1) / len(bins)) ** 3\n \n scores = size_ratio / (rest_ratio + index_ratio)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns bins based on the ratio of the rest capacity to the square root of the bin index, with the aim of optimizing the assignment and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.arange(1, len(bins) + 1))) * (bins != np.max(bins))\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin, while avoiding using bins with the maximum rest capacity. The goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item)\n\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, calculated by subtracting the item size from the bin capacity, and avoids using bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin based on its current rest capacity and the size of the item, where the score is equal to the absolute value of the difference between the rest capacity and the item size, multiplied by -1 if the bin is empty, to prioritize filling the empty bins first, or multiplied by 1 if the bin is not empty.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(bins - item) * np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))\n return scores",
"objective": 0.13281,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = bins[i] - item\n else:\n scores[i] = -1000\n \n return scores",
"objective": 0.14418,
"other_inf": null
},
{
"algorithm": "The algorithm first calculates the score for each bin by dividing the rest capacity of the bin by the item size, then subtracting 1 if the rest capacity equals the maximum capacity. Next, it sets the score to 0 if the rest capacity is less than the item size. Finally, it returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(bins, item)\n scores[bins == np.max(bins)] -= 1\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, considering the rest capacity of the bin, and returns the scores for all bins after the assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize an array of scores with zeros\n\n # Calculate the score for each bin based on their rest capacity\n scores = np.where(bins == np.max(bins), 0, bins - np.max(bins) + item + 1)\n \n return scores",
"objective": 0.32971,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Calculate the ratio of the capacity remaining in each bin to the size of the current item.\n2. Assign a score of 0 to bins that have the same capacity as their maximum capacity.\n3. Assign a score of 1 to bins whose remaining capacity is 1 larger than the size of the current item.\n4. Assign a score of 2 to bins whose remaining capacity is 2 larger than the size of the current item.\n5. Assign a score of 3 to bins whose remaining capacity is 3 larger than the size of the current item.\n6. Continue this pattern and assign scores in increasing order to bins with increasing available capacity.\n7. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item) # Assign scores based on ratio\n return scores",
"objective": 0.36543,
"other_inf": null
},
{
"algorithm": "The algorithm scores each bin based on a score function that takes into account both the remaining capacity of the bin and the size of the item being assigned. The main steps of the algorithm are: \n1. Initialize an empty Numpy array 'scores' with the same size as 'bins' to store the scores for each bin.\n2. Calculate the score for each bin by dividing the remaining capacity of the bin by the size of the item, and store the result in the corresponding index of 'scores'.\n3. Return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = bins[bins > item] / item\n return scores",
"objective": 0.3763,
"other_inf": null
},
{
"algorithm": "\nThe algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment.\nThe main steps of the algorithm are as follows:\n1. Calculate the available capacities of all bins by subtracting 'item' from 'bins'.\n2. Filter out the bins with available capacity equal to the maximum capacity ('bins_max') using a mask.\n3. Assign a score of 0 to all bins that have 'bins_max' capacity.\n4. For the remaining bins, calculate the score by dividing the available capacity by the difference between 'bins_max' and the available capacity.\n5. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score for each bin is calculated as the difference between the rest capacity and twice the size of the item, with a lower bound of zero, and the final scores are stored in a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - 2 * item, 0)\n return scores",
"objective": 0.86699,
"other_inf": null
},
{
"algorithm": "The novel score function assigns an item to the bin with the maximum score, taking into account the rest capacity of each bin, and aims to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = item - bins[mask]\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "We first calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, and then subtract 1 from the score of the bin with the maximum capacity. Finally, we return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n max_index = np.argmax(bins)\n scores[max_index] -= 1\n return scores",
"objective": 1.51484,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin by dividing the rest capacity of the bin by the size of the item and subtracting it from the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins) / item\n scores = (bins / item) - max_score\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_1.json
================================================
[
{
"algorithm": "Algorithm: \n\nThe new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account both these parameters.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n scores[bins != bins.max()] = scores[bins != bins.max()] / np.power(2, bins[bins != bins.max()] - item)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Algorithm description: \n\nThe new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The scoring method is modified by incorporating both the rest capacity and the number of items of each bin. \n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1)) + (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1)) * (np.sum(bins != 0) / (np.sum(bins != 0) + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Algorithm description: \n\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. The new algorithm modifies the scoring method by taking into account both the rest capacity of the bin and the number of items already assigned to the bin.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering both the rest capacity of each bin and the number of items already assigned to the bin. The scoring function is adjusted by incorporating a weighting factor that is determined based on the product of the rest capacity and the number of items already assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 - ((bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))) * (bins[bins != bins.max()] * (bins[bins != bins.max()] != 0))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering both the rest capacity of each bin and the cost of assigning the item to the bin, in order to minimize the number of used bins. The cost of assigning the item to a bin is calculated as the product of the item size and the ratio of the item size to the bin capacity, and a smaller cost indicates a better fit.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n ratios = item / bins.astype(float)\n costs = item * ratios\n scores[bins != bins.max()] = costs[bins != bins.max()]\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm is modified to assign scores to the bins based on the following steps: calculate the ratio of item size to bin capacity, calculate the number of used bins, assign weights based on the number of used bins and ratio, and then calculate the scores for each bin based on the modified score formula.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n ratio = item / bins\n \n used_bins = np.count_nonzero(bins < max_capacity)\n weights = 0.8 * used_bins + 0.2 * ratio\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(1.5 * ratio[i] * bins[i] * weights[i])\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm will calculate the score for each bin by considering both the ratio of item size to bin capacity and the number of used bins for previous assignments. The score will be a weighted sum of these two factors, with more weight given to the number of used bins to prioritize the minimization of used bins. \n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n ratio = item / bins\n\n used_bins = np.count_nonzero(scores)\n weights = 0.8 * used_bins + 0.2 * ratio\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(ratio[i] * bins[i] * weights[i])\n\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the ratio of item size to bin capacity, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n ratios = item / bins.astype(float)\n scores[bins != bins.max()] = ratios[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "Algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, squared.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) ** 2\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n ratio = item / bins\n \n used_bins = np.count_nonzero(scores)\n weights = 0.9 * used_bins + 0.1 * ratio\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(1.2 * ratio[i] * bins[i] * weights[i])\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Algorithm description: Modified Algorithm Description: \nIn this modified algorithm, the score function will assign items to bins based on a modified score function that takes into account the bin capacity, the item size, and the number of items already assigned to a bin. Each bin will be assigned the item with the maximum modified score, and empty bins with maximum capacity will not be used. The goal is still to minimize the number of used bins, but the modified score function will prioritize bins with lower capacity, fewer items already assigned to them, and a higher ratio of item size to bin capacity. \n\nModified Algorithm Implementation:\n\n```\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n # Calculate the maximum capacity and its count\n max_capacity = np.max(bins)\n max_capacity_count = np.count_nonzero(bins == max_capacity)\n \n # Calculate the number of items already assigned to each bin\n assigned_items_count = np.zeros_like(bins)\n unique_bins = np.unique(bins)\n for bin in unique_bins:\n assigned_items_count[bins == bin] = np.count_nonzero(bins[bins == bin])\n \n # Calculate the proximity of the bin capacity to the item size\n proximity = max_capacity - item\n \n # Add the proximity, assigned items count, and item size to bin capacity ratio factors to the scores of non-maximum capacity bins\n scores[bins != max_capacity] = (item / bins[bins != max_capacity]) + (proximity * 0.1) + (assigned_items_count[bins != max_capacity] * 0.01) + (item/bins[bins != max_capacity])\n \n # If there are empty bins with maximum capacity, assign them a high score\n scores[bins == max_capacity] = item / (max_capacity - 1)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign items to bins based on a modified score function that takes into account the proximity of the bin capacity to the item size, as well as an additional parameter called \"fill_ratio\". The fill_ratio represents the ratio of the item size to the maximum capacity of the bin.\n\nThe main steps of the algorithm are as follows:\n1. Calculate the maximum capacity and its count in the bins.\n2. Calculate the proximity of the bin capacity to the item size.\n3. Calculate the fill_ratio of the item size to the maximum capacity.\n4. Initialize an array of scores with zeros.\n5. For each bin with non-maximum capacity, calculate the score using the formula: (item / bin_capacity) + (proximity * fill_ratio).\n6. For each bin with maximum capacity, calculate the score using the formula: item / (bin_capacity - 1).\n7. Return the scores array.\n\nHere is the implementation of the new score function in Python:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n max_capacity_count = np.count_nonzero(bins == max_capacity)\n proximity = max_capacity - item\n fill_ratio = item / max_capacity\n \n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = (item / bins[bins != max_capacity]) + (proximity * fill_ratio)\n scores[bins == max_capacity] = item / (max_capacity - 1)\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, the ratio of item size to bin capacity, and a penalty term based on the number of items already assigned to the bin, in order to minimize the number of used bins.\n\nHere's the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n ratios = item / bins.astype(float)\n penalty = np.log(1 + bins) / (1 + np.count_nonzero(bins != bins.max(), axis=0))\n scores[bins != bins.max()] = ratios[bins != bins.max()] * penalty[bins != bins.max()]\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a modified score function that takes into account the bin capacity, the item size, and the number of items already assigned to a bin. Each bin is assigned the item with the maximum modified score, and empty bins with maximum capacity are not used. The goal is to minimize the number of used bins. \n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n\n # Calculate the maximum capacity and its count\n max_capacity = np.max(bins)\n max_capacity_count = np.count_nonzero(bins == max_capacity)\n\n # Calculate the number of items already assigned to each bin\n assigned_items_count = np.zeros_like(bins)\n unique_bins = np.unique(bins)\n for bin in unique_bins:\n assigned_items_count[bins == bin] = np.count_nonzero(bins[bins == bin])\n\n # Calculate the proximity of the bin capacity to the item size\n proximity = max_capacity - item\n\n # Add the proximity and assigned items count factors to the scores of non-maximum capacity bins\n scores[bins != max_capacity] = (item / bins[bins != max_capacity]) + (proximity * 0.1) + (assigned_items_count[bins != max_capacity] * 0.01)\n\n # If there are empty bins with maximum capacity, assign them a high score\n scores[bins == max_capacity] = item / (max_capacity - 1)\n\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the sum of the bin's capacity and the item size, plus the number of times the bin has been used.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins + item) + np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm description: Algorithm:\n1. Initialize an empty array named scores with the same size as bins.\n2. Calculate the ratio between the item size and each bin capacity.\n3. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by multiplying the ratio with the bin capacity.\n c. Round down the result to the nearest integer.\n d. Assign the calculated score to the corresponding index in the scores array.\n4. Return the scores array.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n ratio = item / bins\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(ratio[i] * bins[i])\n\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, the ratio of item size to bin capacity, and a penalty factor based on the bin's remaining capacity to promote filling bins with higher capacity first, in order to minimize the number of used bins.\n\nNew Python code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n ratios = item / bins.astype(float)\n penalties = (bins.max() - bins) / bins.max()\n scores[bins != bins.max()] = ratios[bins != bins.max()] + penalties[bins != bins.max()]\n return scores",
"objective": 0.04286,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_10.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the square root of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 0.5 # Constant multiplier\n scores = c * item / (np.sqrt(bins - item)) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the cube root of the bin's current capacity raised to the power of the bin's index plus four, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins raised to the power of three, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.cbrt(bins)**(4*np.arange(len(bins))+4) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the cube root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Score function:\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / (bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated by taking the square root of the bin's current capacity, raised to the power of the bin's index plus one, multiplied by a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = np.sqrt(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Algorithm: \nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the square root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared.\n\nPython code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, all raised to a power determined by the index of the bin.",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) + np.sqrt(bins) ** (2 * np.arange(len(bins))) + penalty\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus two, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins raised to the power of four, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**4\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins. The penalty term is squared before being added to the score.\n\nCode implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = (remaining_capacity / total_capacity) ** 2\n scores = (bins / (bins - item)) * np.power(bins, np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, updates the rest capacity of the bin accordingly, and penalizes bins with lower remaining capacity by adding a logarithmic term to the score. The score for each bin is calculated as the ratio of the bin's current capacity to the item's size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.sqrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_11.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the square root of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 0.5 # Constant multiplier\n scores = c * item / (np.sqrt(bins - item)) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the cube root of the bin's current capacity raised to the power of the bin's index plus four, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins raised to the power of three, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.cbrt(bins)**(4*np.arange(len(bins))+4) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the cube root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Score function:\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / (bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated by taking the square root of the bin's current capacity, raised to the power of the bin's index plus one, multiplied by a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = np.sqrt(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Algorithm: \nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the square root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared.\n\nPython code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, all raised to a power determined by the index of the bin.",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) + np.sqrt(bins) ** (2 * np.arange(len(bins))) + penalty\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus two, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins raised to the power of four, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**4\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(3*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, updates the rest capacity of the bin accordingly, and penalizes bins with lower remaining capacity by adding a logarithmic term to the score. The score for each bin is calculated as the ratio of the bin's current capacity to the item's size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.sqrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_12.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the square root of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 0.5 # Constant multiplier\n scores = c * item / (np.sqrt(bins - item)) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns an item to the bin with the maximum score that is calculated as the product of the bin's current capacity divided by the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the cube root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Score function:\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / (bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description:\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated by taking the logarithm of the bin's current capacity, raised to the power of the bin's index plus one, multiplied by a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.\n\nNew code implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Algorithm: \nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the square root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared.\n\nPython code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, all raised to a power determined by the index of the bin.",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) + np.sqrt(bins) ** (2 * np.arange(len(bins))) + penalty\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings such as a different power value for the natural logarithm and a different coefficient for the penalty term.\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(2*np.arange(len(bins)) + 2) * penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(3*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, updates the rest capacity of the bin accordingly, and penalizes bins with lower remaining capacity by adding a logarithmic term to the score. The score for each bin is calculated as the ratio of the bin's current capacity to the item's size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.sqrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_13.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the square root of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 0.5 # Constant multiplier\n scores = c * item / (np.sqrt(bins - item)) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "\nAlgorithm description: The new algorithm calculates the scores based on the remaining capacity of the bins and the total capacity. It penalizes the bins with smaller remaining capacity by applying a logarithmic function and a power function to the original score. The algorithm prioritizes assigning items to bins with larger remaining capacity while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * (1/(remaining_capacity / total_capacity))\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the cube root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The new algorithm involves calculating the scores for the bins based on a modified formula.",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = (total_capacity / remaining_capacity)**2\n scores = (bins / (bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n scores = c * item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, all raised to a power determined by the index of the bin.",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) + np.sqrt(bins) ** (2 * np.arange(len(bins))) + penalty\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings such as a different power value for the natural logarithm and a different coefficient for the penalty term.\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(2*np.arange(len(bins)) + 2) * penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus 2.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, updates the rest capacity of the bin accordingly, and penalizes bins with lower remaining capacity by adding a logarithmic term to the score. The score for each bin is calculated as the ratio of the bin's current capacity to the item's size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the square root of the bin's remaining capacity divided by the sum of the square roots of the remaining capacities of all bins.\n\nCode:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = np.sqrt(bins) / np.sum(np.sqrt(bins))\n scores = (bins / (bins - item)) * np.sqrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_14.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 3.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 3)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the square root of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 0.5 # Constant multiplier\n scores = c * item / (np.sqrt(bins - item)) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "\nAlgorithm description: The new algorithm calculates the scores based on the remaining capacity of the bins and the total capacity. It penalizes the bins with smaller remaining capacity by applying a logarithmic function and a power function to the original score. The algorithm prioritizes assigning items to bins with larger remaining capacity while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * (1/(remaining_capacity / total_capacity))\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New Algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the inverse of the item's size divided by the bin's capacity, multiplied by the logarithm of the bin's capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (1 / item) * (1 / bins) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The new algorithm involves calculating the scores for the bins based on a modified formula.",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = (total_capacity / remaining_capacity)**2\n scores = (bins / (bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n scores = c * item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 4.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 4)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus 2.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, updates the rest capacity of the bin accordingly, and penalizes bins with lower remaining capacity by adding a logarithmic term to the score. The score for each bin is calculated as the ratio of the bin's current capacity to the item's size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the square root of the bin's remaining capacity divided by the sum of the square roots of the remaining capacities of all bins.\n\nCode:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = np.sqrt(bins) / np.sum(np.sqrt(bins))\n scores = (bins / (bins - item)) * np.sqrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_15.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 3.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 3)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the square root of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 0.5 # Constant multiplier\n scores = c * item / (np.sqrt(bins - item)) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "\nAlgorithm description: The new algorithm calculates the scores based on the remaining capacity of the bins and the total capacity. It penalizes the bins with smaller remaining capacity by applying a logarithmic function and a power function to the original score. The algorithm prioritizes assigning items to bins with larger remaining capacity while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * (1/(remaining_capacity / total_capacity))\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New Algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the square root of the item's size divided by the bin's capacity, multiplied by the logarithm of the bin's capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (np.sqrt(item) / bins) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the product of the inverse of the difference between the bin capacity and the item size, modified by adding the square of the item size divided by the bin capacity, and multiplying it by the square root of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item)) * ((item ** 2) / bins) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n scores = c * item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 4.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 4)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus 2.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, updates the rest capacity of the bin accordingly, and penalizes bins with lower remaining capacity by adding a logarithmic term to the score. The score for each bin is calculated as the ratio of the bin's current capacity to the item's size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 5.",
"code": "def score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(5 * np.arange(len(bins)) + 5)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity cubed.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**3)\n scores = bins * ((np.sqrt(bins)/np.sqrt(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_16.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 3.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 3)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the item size and the rest capacities of the feasible bins, using a modified formula, and returns the scores for assignment.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "\nAlgorithm description: The new algorithm calculates the scores based on the remaining capacity of the bins and the total capacity. It penalizes the bins with smaller remaining capacity by applying a logarithmic function and a power function to the original score. The algorithm prioritizes assigning items to bins with larger remaining capacity while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * (1/(remaining_capacity / total_capacity))\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * (1 / (remaining_capacity**2))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New Algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the square root of the item's size divided by the bin's capacity, multiplied by the logarithm of the bin's capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = np.sqrt(item) / bins * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the product of the inverse of the difference between the bin capacity and the item size, modified by adding the square of the item size divided by the bin capacity, and multiplying it by the square root of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item)) * ((item ** 2) / bins) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n scores = c * item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 4.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 4)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus 2.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "\nAlgorithm description:\ndef score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\nNew algorithm:\n\nThe new algorithm score(item, bins) takes in the size of the current item and the rest capacities of feasible bins as input and returns an array of scores for the bins for assignment. The calculation of scores is modified by introducing a new parameter p, which is the power exponent used in the computation.\n\nCode:\nimport numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 5.",
"code": "def score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(5 * np.arange(len(bins)) + 5)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity cubed.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**3)\n scores = bins * ((np.sqrt(bins)/np.sqrt(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_17.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 3.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 3)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the item size and the rest capacities of the feasible bins, using a modified formula, and returns the scores for assignment.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Create a new algorithm that assigns a score to each bin based on their capacity and the size of the current item, and returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (np.sqrt(bins) + item)) * ((np.log(bins) / np.log(2))**(2*np.arange(len(bins))+3)) * (bins / (bins - item))**2\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm is as follows: \n\nFor each bin in the set of bins,\n1. Calculate the remaining capacity of the bin after assigning the item to it.\n2. Calculate the score of the bin using the formula: bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * (1 / (remaining_capacity**2))\n3. Assign the score to the bin.\n4. Return the scores for all bins.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * (1 / (remaining_capacity**2))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New Algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the square root of the item's size divided by the bin's capacity, multiplied by the logarithm of the bin's capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = np.sqrt(item) / bins * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the product of the inverse of the difference between the bin capacity and the item size, modified by adding the square of the item size divided by the bin capacity, and multiplying it by the square root of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 / (bins - item)) * ((item ** 2) / bins) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n scores = c * item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 4.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 4)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus 2.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "\nAlgorithm description:\ndef score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\nNew algorithm:\n\nThe new algorithm score(item, bins) takes in the size of the current item and the rest capacities of feasible bins as input and returns an array of scores for the bins for assignment. The calculation of scores is modified by introducing a new parameter p, which is the power exponent used in the computation.\n\nCode:\nimport numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 5.",
"code": "def score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(5 * np.arange(len(bins)) + 5)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the square root of the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' and a constant exponent 'e' to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n e = 1 # Constant exponent\n scores = c * item**e / np.sqrt(bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity cubed.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**3)\n scores = bins * ((np.sqrt(bins)/np.sqrt(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_18.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "Algorithm description:\n\nThe new algorithm assigns a score to each bin based on a combination of its rest capacity, the size of the current item, and the index of the bin in the array. The score considers the rest capacity of the bin, with a higher score given to bins with larger capacities. Additionally, the score is multiplied by a factor that increases exponentially with the index of the bin, promoting the assignment of items to bins with lower indexes. Finally, the score is squared to ensure the final scores remain positive.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins**2) / (np.sqrt(bins) + item)) * ((np.log(bins) / np.log(2))**(2*np.arange(len(bins))+3)) * (bins / (bins - item))**2\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 3.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 3)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the item size and the rest capacities of the feasible bins, using a modified formula, and returns the scores for assignment.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / (np.sqrt(bins) + item)) * ((np.log(bins) / np.log(2))**(2*np.arange(len(bins))+3)) * (bins / (bins - item))**2\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm is as follows: \n\nFor each bin in the set of bins,\n1. Calculate the remaining capacity of the bin after assigning the item to it.\n2. Calculate the score of the bin using the formula: bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * (1 / (remaining_capacity**2))\n3. Assign the score to the bin.\n4. Return the scores for all bins.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * (1 / (remaining_capacity**2))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The main algorithm parameters for the new algorithm are the item size ('item') and the rest capacities of feasible bins ('bins'). \n\nNew algorithm description: \n\nThe new algorithm calculates the score of each bin based on their remaining capacity after assigning the item to it, using a different parameter setting for the score function. The new algorithm uses the formula: bins * ((np.log(bins)/np.log(3))**(3*np.arange(len(bins))+1)) * (1 / (remaining_capacity**3)) to calculate the scores. It then returns the scores for all bins.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = bins * ((np.log(bins)/np.log(3))**(3*np.arange(len(bins))+1)) * (1 / (remaining_capacity**3))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The new algorithm step: we calculate the scores for the bins based on the formula: scores = item / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 1)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n scores = c * item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 4.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 4)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus 2.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "\nAlgorithm description:\ndef score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\nNew algorithm:\n\nThe new algorithm score(item, bins) takes in the size of the current item and the rest capacities of feasible bins as input and returns an array of scores for the bins for assignment. The calculation of scores is modified by introducing a new parameter p, which is the power exponent used in the computation.\n\nCode:\nimport numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 5.",
"code": "def score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(5 * np.arange(len(bins)) + 5)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the square root of the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' and a constant exponent 'e' to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n e = 1 # Constant exponent\n scores = c * item**e / np.sqrt(bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_19.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "Algorithm description:\n\nThe new algorithm assigns a score to each bin based on a combination of its rest capacity, the size of the current item, and the index of the bin in the array. The score considers the rest capacity of the bin, with a higher score given to bins with larger capacities. Additionally, the score is multiplied by a factor that increases exponentially with the index of the bin, promoting the assignment of items to bins with lower indexes. Finally, the score is squared to ensure the final scores remain positive.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins**2) / (np.sqrt(bins) + item)) * ((np.log(bins) / np.log(2))**(2*np.arange(len(bins))+3)) * (bins / (bins - item))**2\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 3.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 3)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the item size and the rest capacities of the feasible bins, using a modified formula, and returns the scores for assignment.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / (np.sqrt(bins) + item)) * ((np.log(bins) / np.log(2))**(2*np.arange(len(bins))+3)) * (bins / (bins - item))**2\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 10.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 10)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The main algorithm parameters for the new algorithm are the item size ('item') and the rest capacities of feasible bins ('bins'). \n\nNew algorithm description: \n\nThe new algorithm calculates the score of each bin based on their remaining capacity after assigning the item to it, using a different parameter setting for the score function. The new algorithm uses the formula: bins * ((np.log(bins)/np.log(3))**(3*np.arange(len(bins))+1)) * (1 / (remaining_capacity**3)) to calculate the scores. It then returns the scores for all bins.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = bins * ((np.log(bins)/np.log(3))**(3*np.arange(len(bins))+1)) * (1 / (remaining_capacity**3))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The new algorithm step: we calculate the scores for the bins based on the formula: scores = item / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 1)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 5.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 5)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 4.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 4)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus 2.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "\nAlgorithm description:\ndef score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\nNew algorithm:\n\nThe new algorithm score(item, bins) takes in the size of the current item and the rest capacities of feasible bins as input and returns an array of scores for the bins for assignment. The calculation of scores is modified by introducing a new parameter p, which is the power exponent used in the computation.\n\nCode:\nimport numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 5.",
"code": "def score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(5 * np.arange(len(bins)) + 5)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin based on their remaining capacity after assigning the item to it, using a different parameter setting for the score function. The new algorithm uses the formula: bins * ((np.log(bins)/np.log(2))**(2+np.arange(len(bins)))) * (1 / (remaining_capacity**2)) to calculate the scores. It then returns the scores for all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = bins * ((np.log(bins)/np.log(2))**(2+np.arange(len(bins)))) * (1 / (remaining_capacity**2))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the square root of the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' and a constant exponent 'e' to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n e = 1 # Constant exponent\n scores = c * item**e / np.sqrt(bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_2.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account these parameters.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.power(item, 2) / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n scores[bins != bins.max()] = scores[bins != bins.max()] / np.power(2, bins[bins != bins.max()] - item)\n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "Algorithm: \n\nThe new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account both these parameters.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n scores[bins != bins.max()] = scores[bins != bins.max()] / np.power(2, bins[bins != bins.max()] - item)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, the number of items already assigned to the bin, and a weighting factor determined by the ratio of the rest capacity to the square of the number of items already assigned to the bin. It aims to assign the item to bins that have a larger rest capacity and fewer items already assigned.\n\nNew code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()]\n num_items = bins[bins != bins.max()] - item + 1\n scores[bins != bins.max()] = (item**2 + rest_capacity**2) / (rest_capacity * num_items**2)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "New algorithm description:\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a combination of the bin's current capacity divided by the difference between the bin's capacity and the item size, the number of times the bin has been used, and a penalty term based on the bin's remaining capacity to promote efficient usage of bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) + (bins / np.sum(bins))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New Algorithm: \n\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the ratio of the bin's current capacity to a power of the difference between the bin's capacity and the item size, plus the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.power((bins - item), 2)) + np.arange(len(bins))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, and taking into account the square root of the ratio of the item size to the rest capacity plus 1, in order to minimize the number of used bins.\n\nHere's the implementation of the new score function in Python:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()] - item\n scores[bins != bins.max()] = np.sqrt(item / (rest_capacity + 1) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Algorithm description: \n\nThe new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The scoring method is modified by incorporating both the rest capacity and the number of items of each bin. \n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1)) + (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1)) * (np.sum(bins != 0) / (np.sum(bins != 0) + 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and also taking into account a penalty factor based on the distance between the current item size and the average bin size, in order to minimize the number of used bins.\n\nNew code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n avg_bin_size = np.mean(bins)\n penalty_factor = np.abs(item - avg_bin_size) / max_capacity\n \n scores[bins != max_capacity] = (item / (bins[bins != max_capacity] - item + 1)) * penalty_factor\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Algorithm description: \n\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. The new algorithm modifies the scoring method by taking into account both the rest capacity of the bin and the number of items already assigned to the bin.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, where the score for each bin is calculated as the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt(bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering both the rest capacity of each bin and the number of items already assigned to the bin. The scoring function is adjusted by incorporating a weighting factor that is determined based on the product of the rest capacity and the number of items already assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 - ((bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))) * (bins[bins != bins.max()] * (bins[bins != bins.max()] != 0))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm assigns a score to each bin based on the ratio of the item size to the rest capacity of each bin multiplied by a weight, and returns the scores for the bins for assignment.\n\nNew Algorithm Code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()] - item\n scores[bins != bins.max()] = (item / (rest_capacity + 1)) * 10 # Increase weight to promote performance\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the bin with the maximum capacity, and assigns the item to this bin, considering the ratio of item size to the rest capacity of each bin raised to the power of 2, in order to prioritize bins with larger capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()] - item\n scores[bins != bins.max()] = (item / (rest_capacity + 1)) ** 2\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering both the rest capacity of each bin and the cost of assigning the item to the bin, in order to minimize the number of used bins. The cost of assigning the item to a bin is calculated as the product of the item size and the ratio of the item size to the bin capacity, and a smaller cost indicates a better fit.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n ratios = item / bins.astype(float)\n costs = item * ratios\n scores[bins != bins.max()] = costs[bins != bins.max()]\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, the number of items already assigned to the bin, and a weighting factor determined by the sum of the rest capacity and the number of items already assigned to the bin. It aims to assign the item to bins that have a larger rest capacity and fewer items already assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = ((item**2 + bins[bins != bins.max()]**2) / (bins[bins != bins.max()] - item + 1)) * (1 - ((bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))) * (bins[bins != bins.max()] + (bins[bins != bins.max()] > 0))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: \nThe new algorithm assigns an item to the bin with the maximum score, considering both the rest capacity of each bin and the cost of assigning the item to the bin, in order to minimize the number of used bins. The cost of assigning the item to a bin is calculated as the product of the item size and the ratio of the item size to the bin capacity, and a smaller cost indicates a better fit. The new algorithm also takes into account a penalty factor for assigning an item to a bin with high rest capacity, to encourage filling up bins with lower rest capacity.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n ratios = item / bins.astype(float)\n costs = item * ratios + (1 - ratios)\n scores[bins != bins.max()] = costs[bins != bins.max()]\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, the number of items already assigned to the bin, and a weighting factor determined by the product of the rest capacity and the number of items already assigned to the bin. It aims to assign the item to bins that have a larger rest capacity and fewer items already assigned.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = ((item**2 + bins[bins != bins.max()]**2) / (bins[bins != bins.max()] - item + 1)) * (1 - ((bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))) * (bins[bins != bins.max()] * (bins[bins != bins.max()] != 0))\n return scores",
"objective": 0.04035,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_20.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "Algorithm description:\n\nThe new algorithm assigns a score to each bin based on a combination of its rest capacity, the size of the current item, and the index of the bin in the array. The score considers the rest capacity of the bin, with a higher score given to bins with larger capacities. Additionally, the score is multiplied by a factor that increases exponentially with the index of the bin, promoting the assignment of items to bins with lower indexes. Finally, the score is squared to ensure the final scores remain positive.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins**2) / (np.sqrt(bins) + item)) * ((np.log(bins) / np.log(2))**(2*np.arange(len(bins))+3)) * (bins / (bins - item))**2\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 3.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 3)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the item size and the rest capacities of the feasible bins, using a modified formula, and returns the scores for assignment.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / (np.sqrt(bins) + item)) * ((np.log(bins) / np.log(2))**(2*np.arange(len(bins))+3)) * (bins / (bins - item))**2\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 10.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 10)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The main algorithm parameters for the new algorithm are the item size ('item') and the rest capacities of feasible bins ('bins'). \n\nNew algorithm description: \n\nThe new algorithm calculates the score of each bin based on their remaining capacity after assigning the item to it, using a different parameter setting for the score function. The new algorithm uses the formula: bins * ((np.log(bins)/np.log(3))**(3*np.arange(len(bins))+1)) * (1 / (remaining_capacity**3)) to calculate the scores. It then returns the scores for all bins.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = bins * ((np.log(bins)/np.log(3))**(3*np.arange(len(bins))+1)) * (1 / (remaining_capacity**3))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The new algorithm step: we calculate the scores for the bins based on the formula: scores = item / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 1)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 5.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(3 * np.arange(len(bins)) + 5)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(2 * np.arange(len(bins)) + 3)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus 1.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 4.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(3 * np.arange(len(bins)) + 4)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nIn the new algorithm, the score for each bin will be calculated based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus 2.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(2 * np.arange(len(bins)) + 2)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "\nAlgorithm description:\ndef score(item, bins):\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\nNew algorithm:\n\nThe new algorithm score(item, bins) takes in the size of the current item and the rest capacities of feasible bins as input and returns an array of scores for the bins for assignment. The calculation of scores is modified by introducing a new parameter p, which is the power exponent used in the computation.\n\nCode:\nimport numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n p = 4 # New parameter p\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(p*np.arange(len(bins))+3) * (np.sum(bins) / (bins - item))**2\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm will calculate the score for each bin based on the inverse of the difference between the bin capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of the index of the bin in the list of bins, plus a constant value of 5.",
"code": "def score(item, bins):\n scores = 1 / (bins - item) * np.log(bins)**(5 * np.arange(len(bins)) + 5)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin based on their remaining capacity after assigning the item to it, using a different parameter setting for the score function. The new algorithm uses the formula: bins * ((np.log(bins)/np.log(2))**(2+np.arange(len(bins)))) * (1 / (remaining_capacity**2)) to calculate the scores. It then returns the scores for all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = bins * ((np.log(bins)/np.log(2))**(2+np.arange(len(bins)))) * (1 / (remaining_capacity**2))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the square root of the product of the item size and the inverse of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' and a constant exponent 'e' to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 2.0 # Constant multiplier\n e = 1 # Constant exponent\n scores = c * item**e / np.sqrt(bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_3.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account these parameters.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.power(item, 2) / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n scores[bins != bins.max()] = scores[bins != bins.max()] / np.power(2, bins[bins != bins.max()] - item)\n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "Algorithm: \n\nThe new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account both these parameters.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n scores[bins != bins.max()] = scores[bins != bins.max()] / np.power(2, bins[bins != bins.max()] - item)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account both these parameters. The new score function penalizes bins that have a high number of items already assigned and a low rest capacity.",
"code": "def score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n scores[bins != bins.max()] = scores[bins != bins.max()] / np.power(2, bins[bins != bins.max()] - item)\n \n # New modification to the score function\n scores[bins >= bins.max()/2] = scores[bins >= bins.max()/2] * (1 - (bins[bins >= bins.max()/2] - bins.max()/2) / bins.max())\n scores[bins < bins.max()/2] = scores[bins < bins.max()/2] * (1 - (bins.max()/2 - bins[bins < bins.max()/2]) / bins.max())\n \n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, the number of items already assigned to the bin, and a weighting factor determined by the ratio of the rest capacity to the cube of the number of items already assigned to the bin. It aims to assign the item to bins that have a larger rest capacity and fewer items already assigned.\n\nNew code:\n\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()]\n num_items = bins[bins != bins.max()] - item + 1\n scores[bins != bins.max()] = (item**2 + rest_capacity**3) / (rest_capacity * num_items**3)\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the bin with the maximum capacity, and assigns the item to this bin, considering the difference between the item size and the rest capacity of each bin raised to the power of 3, in order to prioritize bins with larger differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()] - item\n scores[bins != bins.max()] = (item - rest_capacity) ** 3\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, the number of items already assigned to the bin, and a weighting factor determined by the ratio of the rest capacity to the square of the number of items already assigned to the bin. It aims to assign the item to bins that have a larger rest capacity and fewer items already assigned.\n\nNew code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()]\n num_items = bins[bins != bins.max()] - item + 1\n scores[bins != bins.max()] = (item**2 + rest_capacity**2) / (rest_capacity * num_items**2)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "New algorithm description:\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a combination of the bin's current capacity divided by the difference between the bin's capacity and the item size, the number of times the bin has been used, and a penalty term based on the bin's remaining capacity to promote efficient usage of bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) + (bins / np.sum(bins))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The scoring method takes into account both the rest capacity of the bin, the number of items already assigned to the bin, and a scaling factor.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scaling_factor = 0.5\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))) + scaling_factor * (1 - bins[bins != bins.max()] / (bins[bins != bins.max()] + item))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New Algorithm: \n\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the ratio of the bin's current capacity to a power of the difference between the bin's capacity and the item size, plus the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.power((bins - item), 2)) + np.arange(len(bins))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, and taking into account the square root of the ratio of the item size to the rest capacity plus 1, in order to minimize the number of used bins.\n\nHere's the implementation of the new score function in Python:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()] - item\n scores[bins != bins.max()] = np.sqrt(item / (rest_capacity + 1) + 1)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New Algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the logarithm of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used multiplied by a constant factor.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / (bins - item) + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Algorithm description: \nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the number of times the bin has been used, the square root of the bin's remaining capacity, and the natural logarithm of the bin's remaining capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.arange(len(bins)) + (bins / np.sum(bins)) + np.sqrt(bins) + np.log(bins)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Algorithm description: \n\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. The new algorithm modifies the scoring method by taking into account both the rest capacity of the bin and the number of items already assigned to the bin.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\n The algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used. The algorithm then updates the rest capacity of the bin accordingly, until all items are assigned.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm: \n\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering both the rest capacity of each bin and the number of items already assigned to the bin. The scoring function is adjusted by incorporating a weighting factor that is determined based on the product of the rest capacity and the number of items already assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 - ((bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))) * (bins[bins != bins.max()] * (bins[bins != bins.max()] != 0))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New Algorithm: \nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the ratio of the bin's current capacity to a power of the difference between the bin's capacity and the item size, plus the square root of the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.power((bins - item), 2)) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the bin with the maximum capacity, and assigns the item to this bin, considering the ratio of item size to the rest capacity of each bin raised to the power of 2, in order to prioritize bins with larger capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()] - item\n scores[bins != bins.max()] = (item / (rest_capacity + 1)) ** 2\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_4.json
================================================
[
{
"algorithm": "New algorithm description: \nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.power(bins, np.arange(len(bins))) * penalty\n return scores",
"objective": 0.01368,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin will be calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's remaining capacity squared, and the natural logarithm of the bin's remaining capacity squared.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.arange(len(bins)) + np.sqrt(bins**2) + np.log(bins**2)\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The new algorithm will assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin will be calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's remaining capacity squared, the natural logarithm of the bin's remaining capacity squared, and the cosine of the bin's remaining capacity.\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.arange(len(bins)) + np.sqrt(bins**2) + np.log(bins**2) + np.cos(bins)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The scoring method takes into account both the rest capacity of the bin, the number of items already assigned to the bin, a scaling factor, and a penalty factor.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scaling_factor = 0.5\n penalty_factor = 0.2\n \n bins_with_space = bins[bins != bins.max()]\n num_items_assigned = item - bins_with_space + 1\n \n scores[bins != bins.max()] = (item / num_items_assigned * (1 - (bins_with_space != 0) / (bins_with_space + 1))) + scaling_factor * (1 - bins_with_space / (bins_with_space + item)) - penalty_factor * num_items_assigned\n return scores",
"objective": 0.02203,
"other_inf": null
},
{
"algorithm": "The new algorithm will assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin will be calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's remaining capacity squared, and the natural logarithm of the bin's remaining capacity squared, with different weightings for each component.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.arange(len(bins)) + 2*np.sqrt(bins**2) + 0.5*np.log(bins**2)\n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "New algorithm: \n\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the logarithm of the bin's current capacity divided by the difference between the bin's capacity and the item size, multiplied by the square root of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = remaining_capacity / total_capacity\n scores = np.log(bins / (bins - item)) * np.sqrt(np.power(bins, np.arange(len(bins)))) * penalty\n return scores",
"objective": 0.0326,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account these parameters.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.power(item, 2) / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n scores[bins != bins.max()] = scores[bins != bins.max()] / np.power(2, bins[bins != bins.max()] - item)\n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "Algorithm: \n\nThe new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account both these parameters.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n scores[bins != bins.max()] = scores[bins != bins.max()] / np.power(2, bins[bins != bins.max()] - item)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account both these parameters. The new score function penalizes bins that have a high number of items already assigned and a low rest capacity.",
"code": "def score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 - (bins[bins != bins.max()] != 0) / (bins[bins != bins.max()] + 1))\n scores[bins != bins.max()] = scores[bins != bins.max()] / np.power(2, bins[bins != bins.max()] - item)\n \n # New modification to the score function\n scores[bins >= bins.max()/2] = scores[bins >= bins.max()/2] * (1 - (bins[bins >= bins.max()/2] - bins.max()/2) / bins.max())\n scores[bins < bins.max()/2] = scores[bins < bins.max()/2] * (1 - (bins.max()/2 - bins[bins < bins.max()/2]) / bins.max())\n \n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "New algorithm description:\nThe new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The score function is modified to take into account these parameters as well as the maximum capacity of the bins.\n\nNew algorithm implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n \n mask = bins != max_capacity\n rest_capacity = bins[mask]\n num_items = max_capacity - rest_capacity + 1\n \n scores[mask] = np.power(item, 2) / num_items * (1 - (rest_capacity != 0) / (rest_capacity + 1))\n scores[mask] = scores[mask] / np.power(2, rest_capacity - item)\n \n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, the number of items already assigned to the bin, and the maximum capacity of the bins, in order to minimize the number of used bins. The score function is modified to take into account these parameters as well as the size of the current item and the rest capacities of feasible bins.\n\nNew algorithm implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = bins.max()\n \n mask = bins != max_capacity\n rest_capacity = bins[mask]\n num_items = max_capacity - rest_capacity + 1\n \n scores[mask] = (np.power(num_items, 2) / np.power(item, 2)) * (1 - (rest_capacity != 0) / (rest_capacity + 1))\n scores[mask] = scores[mask] / np.power(2, rest_capacity - item)\n \n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used multiplied by a constant factor.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) + np.arange(len(bins)) * 0.25\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the bin with the maximum capacity, and assigns the item to this bin, considering the difference between the item size and the rest capacity of each bin raised to the power of 3, in order to prioritize bins with larger differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rest_capacity = bins[bins != bins.max()] - item\n scores[bins != bins.max()] = (item - rest_capacity) ** 3\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New Algorithm: \n\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the ratio of the bin's current capacity to a power of the difference between the bin's capacity and the item size, plus the number of times the bin has been used multiplied by a constant factor.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.power((bins - item), 2)) + np.arange(len(bins)) * 0.5\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm assigns an item to the bin with the maximum score, considering both the rest capacity of each bin and the number of items already assigned to the bin. The scoring function is adjusted by incorporating a weighting factor that is determined based on the product of the rest capacity and the number of items already assigned to the bin. In addition, a penalty term is introduced to discourage assigning an item to a nearly full bin.\n\nPython Implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin_capacity = bins.max()\n num_items_assigned = bins[bins != max_bin_capacity] \n\n scores = np.zeros_like(bins)\n mask = bins != max_bin_capacity\n\n capacity_penalty = 1 / (bins[mask] - item + 1) * (1 - (num_items_assigned / (bins[mask] + 1)))\n items_penalty = bins[mask] * (bins[mask] != 0)\n\n scores[mask] = (item / (bins[mask] - item + 1)) * (1 - ((bins[mask] != 0) / (bins[mask] + 1))) * capacity_penalty * items_penalty\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "New algorithm description:\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a combination of the bin's current capacity divided by the difference between the bin's capacity and the item size, the number of times the bin has been used, and a penalty term based on the bin's remaining capacity to promote efficient usage of bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) + (bins / np.sum(bins))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used multiplied by a constant factor.\n\nNew algorithm implementation in Python:\n```",
"code": "import numpy as np\n\n# Main algorithm parameters\nconstant_factor = 0.5\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(bins) / (bins - item) + np.arange(len(bins)) * constant_factor\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New Algorithm: \n\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the ratio of the bin's current capacity to a power of the difference between the bin's capacity and the item size, plus the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.power((bins - item), 2)) + np.arange(len(bins))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the ratio of the bin's current capacity to the square root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used multiplied by a constant factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt(bins - item)) + np.arange(len(bins)) * 0.25\n return scores",
"objective": 0.03884,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_5.json
================================================
[
{
"algorithm": "New algorithm: The adjusted algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nHere is the Python implementation of the score function for the new algorithm:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.log(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins. The penalty term is squared before being added to the score.\n\nCode implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = (remaining_capacity / total_capacity) ** 2\n scores = (bins / (bins - item)) * np.power(bins, np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the cube root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.cbrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00936,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared.\n\nCode implementation:\n``` ",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / (bins + item)) * np.sqrt(bins)**(np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score for each bin is calculated as the square root of the bin's current capacity raised to the power of the bin's index, divided by the difference between the bin's capacity and the item size, multiplied by a penalty term based on the inverse of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (np.sqrt(bins) ** np.arange(len(bins))) / (bins - item) * (1 / remaining_capacity)\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.sqrt(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.01137,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the bin's current capacity multiplied by a weight factor based on a new parameter 'alpha', divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n alpha = 2 # New parameter 'alpha' for adjusting the weight factor\n scores = ((alpha * bins * item) / (bins - item)) * np.sqrt(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity multiplied by the item size, divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nHere's the implementation in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins - item)) * np.sqrt(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "New algorithm description: \nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.power(bins, np.arange(len(bins))) * penalty\n return scores",
"objective": 0.01368,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n \"\"\"\n This algorithm calculates the score for each bin based on the following steps:\n - Calculate the remaining capacity of each bin after assigning the item.\n - Calculate the scores as the logarithm of the bin's current capacity raised to the power of the bin's index, divided by the logarithm of the difference between the bin's capacity and the item size, multiplied by a penalty term based on the inverse of the bin's remaining capacity.\n \"\"\"\n remaining_capacity = bins - item\n scores = (np.log(bins) ** np.arange(len(bins))) / (np.log(bins - item)) * (1 / remaining_capacity)\n return scores",
"objective": 0.01529,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin will be calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the cube root of the bin's remaining capacity cubed, and the base-10 logarithm of the bin's remaining capacity squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.arange(len(bins)) + np.cbrt(bins**3) + np.log10(bins**2)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The scoring method takes into account both the rest capacity of the bin, the number of items already assigned to the bin, a scaling factor, and a penalty factor. The new algorithm will tweak the parameter settings in the scoring function.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scaling_factor = 0.8 # Changed scaling factor to 0.8\n penalty_factor = 0.1 # Changed penalty factor to 0.1\n \n bins_with_space = bins[bins != bins.max()]\n num_items_assigned = item - bins_with_space + 1\n \n scores[bins != bins.max()] = (item / num_items_assigned * (1 - (bins_with_space != 0) / (bins_with_space + 1))) + scaling_factor * (1 - bins_with_space / (bins_with_space + item)) - penalty_factor * num_items_assigned\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the number of items already assigned to the bin, in order to minimize the number of used bins. The scoring method takes into account both the rest capacity of the bin, the number of items already assigned to the bin, a scaling factor, and a penalty factor.\n\n",
"code": "def score(item, bins):\n scores = np.zeros_like(bins)\n scaling_factor = 0.7\n penalty_factor = 0.1\n \n bins_with_space = bins[bins != bins.max()]\n num_items_assigned = item - bins_with_space + 1\n \n scores[bins != bins.max()] = (item / num_items_assigned * (1 - (bins_with_space != 0) / (bins_with_space + 1))) + scaling_factor * (1 - bins_with_space / (bins_with_space + item)) - penalty_factor * num_items_assigned\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Algorithm Description: My new algorithm will assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin will be calculated as the sum of the bin's current capacity divided by the exponential of the difference between the bin's capacity and the item size, the square root of the bin's remaining capacity squared, and the natural logarithm of the bin's remaining capacity.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.exp(bins - item)) + np.arange(len(bins)) + np.sqrt(bins**2) + np.log(bins)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "New Algorithm: The new algorithm will assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin will be calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's remaining capacity squared, the natural logarithm of the bin's remaining capacity squared, and the sine of the bin's remaining capacity multiplied by the cosine of the bin's remaining capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.arange(len(bins)) + np.sqrt(bins**2) + np.log(bins**2) + np.sin(bins) * np.cos(bins)\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "Algorithm Description: My new algorithm will assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin will be calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's remaining capacity squared, and the natural logarithm of the bin's remaining capacity squared.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.arange(len(bins)) + np.sqrt(bins**2) + np.log(bins**2)\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The new algorithm will assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin will be calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's remaining capacity squared, the natural logarithm of the bin's remaining capacity squared, and the cosine of the bin's remaining capacity.\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.arange(len(bins)) + np.sqrt(bins**2) + np.log(bins**2) + np.cos(bins)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse logarithm of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / np.log(remaining_capacity) / total_capacity\n scores = (bins / (bins + item)) * np.sqrt(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.01761,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_6.json
================================================
[
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the difference between the bin's current capacity and the item's size, multiplied by the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins - item) * np.sqrt(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of a weighted ratio of the bin's current capacity to the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins / (bins - item))**(1/3)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / (bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The adjusted algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nHere is the Python implementation of the score function for the new algorithm:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.log(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The modified algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, the natural logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / np.sqrt(bins - item)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Algorithm description: \n\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) + np.sqrt(bins) ** (2 * np.arange(len(bins))) + penalty\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins. The penalty term is squared before being added to the score.\n\nCode implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = (remaining_capacity / total_capacity) ** 2\n scores = (bins / (bins - item)) * np.power(bins, np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.sqrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the cube root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.cbrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00936,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared.\n\nCode implementation:\n``` ",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / (bins + item)) * np.sqrt(bins)**(np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.sqrt(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.01077,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins to the power of 4, with different values for the penalty term and the exponent in the square root function.\n\nHere's the implementation of the new algorithm:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "In the new algorithm, the score for each bin is calculated as the square root of the bin's current capacity raised to the power of the bin's index, divided by the difference between the bin's capacity and the item size, multiplied by a penalty term based on the inverse of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n scores = (np.sqrt(bins) ** np.arange(len(bins))) / (bins - item) * (1 / remaining_capacity)\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.sqrt(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode implementation:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.log(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins to the power of 4.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**4\n scores = (bins / (bins + item)) * np.sqrt(bins)**(np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.01137,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the bin's current capacity multiplied by a weight factor based on a new parameter 'alpha', divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n alpha = 2 # New parameter 'alpha' for adjusting the weight factor\n scores = ((alpha * bins * item) / (bins - item)) * np.sqrt(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the bin's current capacity raised to the power of the bin's index, the square root of the bin's capacity, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.power(bins, np.arange(len(bins))) * np.sqrt(bins) * penalty\n return scores",
"objective": 0.01157,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_7.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the ratio of the bin's current capacity to the item's size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of a weighted ratio of the bin's current capacity to the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins / (bins - item))**(1/3)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the cube root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Score function:\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / (bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.sqrt(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, where the score for each bin is calculated as the ratio between the item's size and the difference between the bin's current capacity and the item's size, multiplied by the square root of the bin's current capacity raised to the power of the bin's index plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2*np.arange(len(bins))+1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: The modified algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, the natural logarithm of the bin's current capacity raised to the power of three times the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / np.sqrt(bins - item)) * np.log(bins) ** (3 * np.arange(len(bins)) + 1) * penalty\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, all raised to a power determined by the index of the bin.",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) + np.sqrt(bins) ** (2 * np.arange(len(bins))) + penalty\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of a weighted ratio of the bin's current capacity to the difference between the bin's capacity and the item size, multiplied by the natural logarithm of the bin's current capacity raised to the power of two times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item))**(1/2) * np.log(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins. The penalty term is squared before being added to the score.\n\nCode implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = (remaining_capacity / total_capacity) ** 2\n scores = (bins / (bins - item)) * np.power(bins, np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the square root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.sqrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, divided by the sum of the bin's capacity and the item size, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * np.log2(bins) ** np.arange(len(bins))) / (bins + item)) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the cube root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.cbrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00916,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_8.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the ratio of the bin's current capacity to the item's size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of a weighted ratio of the bin's current capacity to the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins / (bins - item))**(1/3)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the cube root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Score function:\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / (bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.sqrt(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: The modified algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, the natural logarithm of the bin's current capacity raised to the power of three times the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / np.sqrt(bins - item)) * np.log(bins) ** (3 * np.arange(len(bins)) + 1) * penalty\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, all raised to a power determined by the index of the bin.",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) + np.sqrt(bins) ** (2 * np.arange(len(bins))) + penalty\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus two, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins raised to the power of four, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**4\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins. The penalty term is squared before being added to the score.\n\nCode implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = (remaining_capacity / total_capacity) ** 2\n scores = (bins / (bins - item)) * np.power(bins, np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the square root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / np.sqrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.sqrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different coefficient values.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (2 * bins / np.sqrt(bins - item)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00805,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run1/population_generation_9.json
================================================
[
{
"algorithm": "1. My new algorithm assigns an item to the bin with the maximum score by calculating the score for each bin based on the bin's capacity, the item size, and a penalty term.\n\nHere is the updated code for the score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(3*np.arange(len(bins))+3) * penalty\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * ((np.log(bins)/np.log(2))**(2*np.arange(len(bins))+1)) * penalty\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the square root of the difference between the bin capacity and the item size, with an additional term that increases exponentially with the bin index. The formula can be modified by adding a constant multiplier 'c' to the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n c = 0.5 # Constant multiplier\n scores = c * item / (np.sqrt(bins - item)) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of a weighted ratio of the bin's current capacity to the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins / (bins - item))**(1/3)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the cube root of the sum of the bin's capacity and the item size, the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / np.cbrt(bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Score function:\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / (bins + item)) * np.log(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)\n scores = bins * np.sqrt(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = item / (bins - item) * np.sqrt(bins)**(2 * np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, multiplied by the logarithm of the bin's current capacity raised to the power of three times the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.log(bins) ** (3 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: The modified algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, the natural logarithm of the bin's current capacity raised to the power of three times the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / np.sqrt(bins - item)) * np.log(bins) ** (3 * np.arange(len(bins)) + 1) * penalty\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, all raised to a power determined by the index of the bin.",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) + np.sqrt(bins) ** (2 * np.arange(len(bins))) + penalty\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus two, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins raised to the power of four, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**4\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the bin's current capacity raised to the power of the bin's index, and a penalty term based on the bin's remaining capacity divided by the total remaining capacity of all bins. The penalty term is squared before being added to the score.\n\nCode implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = (remaining_capacity / total_capacity) ** 2\n scores = (bins / (bins - item)) * np.power(bins, np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, updates the rest capacity of the bin accordingly, and penalizes bins with lower remaining capacity by adding a logarithmic term to the score. The score for each bin is calculated as the ratio of the bin's current capacity to the item's size, multiplied by the logarithm of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity squared, with different parameter settings.",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity**2)\n scores = (bins / item) * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of twice the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = (bins / (bins - item)) * np.sqrt(bins) ** (2 * np.arange(len(bins))) * penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm:\nAssign an item to the bin with the maximum score, where the score for each bin is calculated as the product of the bin's current capacity, the natural logarithm of the bin's current capacity raised to the power of twice the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins, with different parameter settings for the penalty term.\n\nUpdated code:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = bins * np.log(bins)**(2*np.arange(len(bins))+1) * penalty\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins cubed, with different parameter settings.\n\n",
"code": "def score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**3\n scores = (bins / (bins + item)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity multiplied by the item size, divided by the sum of the bin's capacity and the item size, the logarithm base 2 of the bin's current capacity raised to the power of the bin's index, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / remaining_capacity / total_capacity\n scores = ((bins * item) / (bins + item)) * np.log2(bins) ** np.arange(len(bins)) * penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the product of the bin's current capacity divided by the sum of the bin's capacity and the item size, the square root of the bin's current capacity raised to the power of the bin's index plus one, and a penalty term based on the inverse of the bin's remaining capacity divided by the total remaining capacity of all bins squared, with different parameter settings.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n total_capacity = np.sum(bins)\n remaining_capacity = bins - item\n penalty = 1 / (remaining_capacity / total_capacity)**2\n scores = (bins / ((bins + item)**2)) * np.sqrt(bins)**(2*np.arange(len(bins))+2) * penalty\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin, while avoiding using bins with the maximum rest capacity. The goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item)\n\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, calculated by subtracting the item size from the bin capacity, and avoids using bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin based on its current rest capacity and the size of the item, where the score is equal to the absolute value of the difference between the rest capacity and the item size, multiplied by -1 if the bin is empty, to prioritize filling the empty bins first, or multiplied by 1 if the bin is not empty.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(bins - item) * np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))\n return scores",
"objective": 0.13281,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = bins[i] - item\n else:\n scores[i] = -1000\n \n return scores",
"objective": 0.14418,
"other_inf": null
},
{
"algorithm": "The algorithm first calculates the score for each bin by dividing the rest capacity of the bin by the item size, then subtracting 1 if the rest capacity equals the maximum capacity. Next, it sets the score to 0 if the rest capacity is less than the item size. Finally, it returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(bins, item)\n scores[bins == np.max(bins)] -= 1\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, considering the rest capacity of the bin, and returns the scores for all bins after the assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize an array of scores with zeros\n\n # Calculate the score for each bin based on their rest capacity\n scores = np.where(bins == np.max(bins), 0, bins - np.max(bins) + item + 1)\n \n return scores",
"objective": 0.32971,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Calculate the ratio of the capacity remaining in each bin to the size of the current item.\n2. Assign a score of 0 to bins that have the same capacity as their maximum capacity.\n3. Assign a score of 1 to bins whose remaining capacity is 1 larger than the size of the current item.\n4. Assign a score of 2 to bins whose remaining capacity is 2 larger than the size of the current item.\n5. Assign a score of 3 to bins whose remaining capacity is 3 larger than the size of the current item.\n6. Continue this pattern and assign scores in increasing order to bins with increasing available capacity.\n7. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item) # Assign scores based on ratio\n return scores",
"objective": 0.36543,
"other_inf": null
},
{
"algorithm": "The algorithm scores each bin based on a score function that takes into account both the remaining capacity of the bin and the size of the item being assigned. The main steps of the algorithm are: \n1. Initialize an empty Numpy array 'scores' with the same size as 'bins' to store the scores for each bin.\n2. Calculate the score for each bin by dividing the remaining capacity of the bin by the size of the item, and store the result in the corresponding index of 'scores'.\n3. Return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = bins[bins > item] / item\n return scores",
"objective": 0.3763,
"other_inf": null
},
{
"algorithm": "\nThe algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment.\nThe main steps of the algorithm are as follows:\n1. Calculate the available capacities of all bins by subtracting 'item' from 'bins'.\n2. Filter out the bins with available capacity equal to the maximum capacity ('bins_max') using a mask.\n3. Assign a score of 0 to all bins that have 'bins_max' capacity.\n4. For the remaining bins, calculate the score by dividing the available capacity by the difference between 'bins_max' and the available capacity.\n5. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score for each bin is calculated as the difference between the rest capacity and twice the size of the item, with a lower bound of zero, and the final scores are stored in a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - 2 * item, 0)\n return scores",
"objective": 0.86699,
"other_inf": null
},
{
"algorithm": "The novel score function assigns an item to the bin with the maximum score, taking into account the rest capacity of each bin, and aims to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = item - bins[mask]\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "We first calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, and then subtract 1 from the score of the bin with the maximum capacity. Finally, we return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n max_index = np.argmax(bins)\n scores[max_index] -= 1\n return scores",
"objective": 1.51484,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin by dividing the rest capacity of the bin by the size of the item and subtracting it from the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins) / item\n scores = (bins / item) - max_score\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_1.json
================================================
[
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 1.5.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 1.5\n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the logarithm of the difference between the bin's capacity and the item size, plus the square root of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.log1p(bins - item) + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 1.2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 1.2\n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 0.8.\n\nNew Algorithm Implementation in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 0.8\n return scores",
"objective": 0.03642,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nAssign an item to the bin with the maximum score, which is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, raised to the power of 1.2, plus the number of times the bin has been used, multiplied by a constant factor of 2.0.\n\nNew code:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) ** 1.2 + np.arange(len(bins)) * 2.0\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score, which is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the square root of the bin's current capacity, plus the number of times the bin has been used, multiplied by a constant factor. The constant factor is set to 3.\n\nNew code:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.sqrt(bins) + np.arange(len(bins)) * 3\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score, which is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor. The constant factor is set to 1.5.\n\nNew code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.arange(len(bins)) * 1.5\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) + item / bins\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor.\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) * 0.5\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the logarithm base 2 of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 0.5.\n\nNew Algorithm Implementation in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.log2(bins - item) + 1) + np.arange(len(bins)) * 0.5\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 0.7.\n\nNew Algorithm Implementation in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(bins - item) + np.arange(len(bins)) * 0.7\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New Algorithm description: The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(bins - item) + np.arange(len(bins)) * 0.5\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score, which is calculated as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the square root of the bin's current capacity, plus the number of times the bin has been used, multiplied by a constant factor. The constant factor is set to 2.\n\nNew code:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.sqrt(bins) + np.arange(len(bins)) * 2\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm (with different parameter settings):\n\nThe new algorithm assigns an item to the bin with the maximum score, which is calculated as the logarithm of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the square root of the number of times the bin has been used, multiplied by 3.\n\nNew code:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins / (bins - item)) + np.sqrt(np.arange(len(bins))) * 3\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores. The score is calculated using a formula that takes into account the difference in capacity between each bin and the maximum capacity, as well as the size of the item. The formula is as follows: scores = (bins.max() - bins) - item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.max() - bins) - item\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score calculated using a different parameter setting, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n \n # New parameter setting\n scores[bins != max_capacity] = (item**2) / bins[bins != max_capacity]\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score, which is calculated as the logarithm of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 2.\n\nNew code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins / (bins - item)) + np.arange(len(bins)) * 2\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_10.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new set of parameters: the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nHere is the implementation of the new score function in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.log(bins) * item - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: \nThe new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the item size, plus the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the cube root of the logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(item)) + (bins / np.cbrt(np.abs(bins - item))) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cube root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere's the updated implementation of the score function:\n\n```",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Algorithm description: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the natural logarithm of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.cbrt(item) + np.log(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / np.log(bins+2))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its natural logarithm, plus the sine of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.log(item) + np.sin(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the logarithm of the item size, plus the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the cube root of the natural logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2.0\n scores = (bins / np.log(item)) + (bins / np.sqrt(np.abs(bins - item))) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+3))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the natural logarithm of the bin's current capacity divided by the square root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) + np.cbrt(bins) * item / (item**(1/3)) + np.log(bins) / math.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 10.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+10))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square of the item size, plus the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the cube root of the natural logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the natural logarithm of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 3.0\n scores = (bins / (item * item)) + (bins / np.cbrt(bins - item)) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.log(bins)) + (k * bins)\n return scores",
"objective": 0.00885,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_11.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new set of parameters: the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nHere is the implementation of the new score function in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.log(bins) * item - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin by taking into account the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cube root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere's the updated implementation of the score function:\n\n```",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Algorithm description: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the natural logarithm of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.cbrt(item) + np.log(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / np.log(bins+1))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its natural logarithm, plus the sine of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.log(item) + np.sin(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+3))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm of the bin's current capacity divided by the square root of the item size, minus the number of times the bin has been used.\n\nCode:\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) + np.cbrt(bins) * item / (item**(1/3)) + np.log(bins) / np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 10.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+10))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square of the item size, plus the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the cube root of the natural logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the natural logarithm of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 3.0\n scores = (bins / (item * item)) + (bins / np.cbrt(bins - item)) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.log(bins)) + (k * bins)\n return scores",
"objective": 0.00885,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_12.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm: Modified New Algorithm\n\nIn the modified new algorithm, the score for each bin will be calculated based on the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its square root, plus the cube root of the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.7\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.sqrt(item)) + (np.cbrt(np.log(bins))) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new set of parameters: the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nHere is the implementation of the new score function in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.log(bins) * item - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin by taking into account the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm base 2 of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.cbrt(item) + np.log2(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere's the updated implementation of the score function:\n\n```",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the score for each bin by taking into account the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size divided by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / np.log(bins+1))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its natural logarithm, plus the sine of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.log(item) + np.sin(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+3))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm of the bin's current capacity divided by the square root of the item size, minus the number of times the bin has been used.\n\nCode:\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) + np.cbrt(bins) * item / (item**(1/3)) + np.log(bins) / np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 10.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+10))\n return scores",
"objective": 0.00865,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_13.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm: Modified New Algorithm\n\nIn the modified new algorithm, the score for each bin will be calculated based on the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its square root, plus the cube root of the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.7\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.sqrt(item)) + (np.cbrt(np.log(bins))) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new set of parameters: the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nHere is the implementation of the new score function in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.log(bins) * item - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin by taking into account the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm base 2 of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.cbrt(item) + np.log2(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere's the updated implementation of the score function:\n\n```",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the score for each bin by taking into account the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size divided by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / np.log(bins+1))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the cube root of the bin's current capacity divided by the squared difference between the bin's capacity and the item size, plus the base 10 logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / (bins - item)**2) + (np.log10(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+3))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm of the bin's current capacity divided by the square root of the item size, minus the number of times the bin has been used.\n\nCode:\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) + np.cbrt(bins) * item / (item**(1/3)) + np.log(bins) / np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 10.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+10))\n return scores",
"objective": 0.00865,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_14.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm: Modified New Algorithm\n\nIn the modified new algorithm, the score for each bin will be calculated based on the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its square root, plus the cube root of the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.7\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.sqrt(item)) + (np.cbrt(np.log(bins))) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new set of parameters: the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nHere is the implementation of the new score function in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.log(bins) * item - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin by taking into account the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm base 2 of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.cbrt(item) + np.log2(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere's the updated implementation of the score function:\n\n```",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the score for each bin by taking into account the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size divided by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / np.log(bins+1))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the cube root of the bin's current capacity divided by the squared difference between the bin's capacity and the item size, plus the base 10 logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / (bins - item)**2) + (np.log10(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size.\n\nPython Code:\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+3))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm of the bin's current capacity divided by the square root of the item size, minus the number of times the bin has been used.\n\nCode:\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) + np.cbrt(bins) * item / (item**(1/3)) + np.log(bins) / np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "1. New algorithm description: \nMy new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.\n\n2. Implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 10.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+10))\n return scores",
"objective": 0.00865,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_15.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm: Modified New Algorithm\n\nIn the modified new algorithm, the score for each bin will be calculated based on the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its square root, plus the cube root of the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.7\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.sqrt(item)) + (np.cbrt(np.log(bins))) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new set of parameters: the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nHere is the implementation of the new score function in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.log(bins) * item - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin by taking into account the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm base 2 of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.cbrt(item) + np.log2(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the score for each bin by taking into account the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size divided by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / np.log(bins+1))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the cube root of the bin's current capacity divided by the squared difference between the bin's capacity and the item size, plus the base 10 logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / (bins - item)**2) + (np.log10(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.cbrt(np.abs(bins - item)))) + (np.cbrt(item) * np.log1p(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size.\n\nPython Code:\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+3))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2, with a different parameter setting for the score function provided.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item+1) / np.log(bins+3))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "1. New algorithm description: \nMy new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.\n\n2. Implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.exp(np.tan(item+1) / np.log(bins+3))\n return scores",
"objective": 0.00865,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_16.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size divided by its cube root, plus the square root of the item size divided by the natural logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.\n\nImplementation:\n``` ",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.sqrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.cbrt(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin by taking into account the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm base 2 of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.cbrt(item) + np.log2(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the score for each bin by taking into account the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size divided by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, minus the number of times the bin has been used, plus the square root of four times the item size.\n\nPython Code:\n\n```\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) - np.arange(len(bins)) + np.sqrt(4*item)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the cube root of the bin's current capacity divided by the squared difference between the bin's capacity and the item size, plus the base 10 logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / (bins - item)**2) + (np.log10(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.cbrt(np.abs(bins - item)))) + (np.cbrt(item) * np.log1p(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size.\n\nPython Code:\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of twice the item size.\n\nPython Code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.sqrt(2*item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nMy new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "1. New algorithm description: \nMy new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.\n\n2. Implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.exp(np.tan(item+1) / np.log(bins+3))\n return scores",
"objective": 0.00865,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_17.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size divided by its cube root, plus the square root of the item size divided by the natural logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.\n\nImplementation:\n``` ",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.sqrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.cbrt(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin by taking into account the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm base 2 of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.cbrt(item) + np.log2(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the score for each bin by taking into account the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size divided by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a modified parameter setting: the square root of the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the cube root of the bin's current capacity divided by the squared difference between the bin's capacity and the item size, plus the base 10 logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / (bins - item)**2) + (np.log10(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.cbrt(np.abs(bins - item)))) + (np.cbrt(item) * np.log1p(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, minus the square of the item size.\n\nPython Code:\n\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) - (item**2)\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of twice the item size.\n\nPython Code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.sqrt(2*item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nMy new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "1. New algorithm description: \nMy new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.\n\n2. Implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.exp(np.tan(item+1) / np.log(bins+3))\n return scores",
"objective": 0.00865,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_18.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size divided by its cube root, plus the square root of the item size divided by the natural logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.\n\nImplementation:\n``` ",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.sqrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.cbrt(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin by taking into account the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its cube root, plus the logarithm base 2 of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.cbrt(item) + np.log2(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the cube of the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, minus the square root of twice the item size.\n\nPython Code:\n\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (np.abs(bins - item)**3)) + (bins / np.log(item+1)) + np.arange(len(bins)) - np.sqrt(2*item)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a modified parameter setting: the square root of the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the cube root of the bin's current capacity divided by the squared difference between the bin's capacity and the item size, plus the base 10 logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / (bins - item)**2) + (np.log10(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.cbrt(np.abs(bins - item)))) + (np.cbrt(item) * np.log1p(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, minus the square of the item size.\n\nPython Code:\n\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) - (item**2)\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of twice the item size.\n\nPython Code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.sqrt(2*item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nMy new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + bins / np.log(item) + np.arange(len(bins)) + np.sqrt(item) / (np.log(bins + 1))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the natural logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, multiplied by the square root of the item size, plus the base 2 logarithm of the bin's capacity multiplied by the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.log(bins) / np.abs(bins - item)) * np.sqrt(item) + (np.log2(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.exp(np.tan(item+1) / np.log(bins+3))\n return scores",
"objective": 0.00865,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_19.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size divided by its cube root, plus the square root of the item size divided by the natural logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.\n\nImplementation:\n``` ",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.sqrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.cbrt(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the square of the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.square(np.abs(bins - item)) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its square root, plus the square root of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.sqrt(item) + np.sqrt(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the cube of the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, minus the square root of twice the item size.\n\nPython Code:\n\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (np.abs(bins - item)**3)) + (bins / np.log(item+1)) + np.arange(len(bins)) - np.sqrt(2*item)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a modified parameter setting: the square root of the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the cube root of the bin's current capacity divided by the squared difference between the bin's capacity and the item size, plus the base 10 logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / (bins - item)**2) + (np.log10(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.cbrt(np.abs(bins - item)))) + (np.cbrt(item) * np.log1p(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, minus the square of the item size.\n\nPython Code:\n\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) - (item**2)\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of twice the item size.\n\nPython Code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.sqrt(2*item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nMy new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + bins / np.log(item) + np.arange(len(bins)) + np.sqrt(item) / (np.log(bins + 1))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the natural logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, multiplied by the square root of the item size, plus the base 2 logarithm of the bin's capacity multiplied by the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.log(bins) / np.abs(bins - item)) * np.sqrt(item) + (np.log2(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.exp(np.tan(item+1) / np.log(bins+3))\n return scores",
"objective": 0.00865,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_2.json
================================================
[
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(np.abs(bins - item))) + bins * np.sqrt(item) / item + np.arange(len(bins))\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - (np.cbrt(item) * np.sqrt(bins))\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "Algorithm description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity multiplied by the log of the sum of the item size and the bin's capacity, divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins * np.log(item + bins)) / np.sqrt(np.abs(bins - item)) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.02737,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 0.5.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 0.5\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 1.5.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 1.5\n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 0.7.\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 0.7\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 1.2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 1.2\n return scores",
"objective": 0.03612,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 0.8.\n\nNew Algorithm Implementation in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 0.8\n return scores",
"objective": 0.03642,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the highest score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the logarithm of the difference between the bin's capacity and the item size, minus the square root of the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.log1p(bins - item) - np.sqrt(np.arange(len(bins)))**2)\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, raised to the power of 1.2, minus the number of times the bin has been used, multiplied by a constant factor of 2.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) ** 1.2 - np.arange(len(bins)) * 2\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = bins / (bins - item)**(2/3) + np.arange(len(bins)) * 1.5\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nAssign an item to the bin with the maximum score, which is calculated as the product of the bin's current capacity divided by the difference between the bin's capacity and the item size, raised to the power of 1.2, plus the number of times the bin has been used, multiplied by a constant factor of 2.5.\n\nNew code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) ** 1.2 + np.arange(len(bins)) * 2.5\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "```\n",
"code": "def score(item, bins):\n scores = (bins / (bins - item)) ** 1.5 + np.arange(len(bins)) * 3.0\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) + item / bins\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score, which is calculated as the sum of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the natural log of the bin's current capacity, plus the number of times the bin has been used, multiplied by a constant factor of 3.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.abs(bins - item)) + np.log(bins) + np.arange(len(bins)) * 3\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 0.6.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(bins - item) + np.arange(len(bins)) * 0.6\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor.\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) * 0.5\n return scores",
"objective": 0.03884,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_20.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score to each bin based on the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size divided by its cube root, plus the square root of the item size divided by the natural logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.\n\nImplementation:\n``` ",
"code": "def score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.sqrt(item) / np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.cbrt(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the square of the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, plus the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.square(np.abs(bins - item)) + np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its square root, plus the square root of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.sqrt(item) + np.sqrt(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / (bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "\nDescription: Assign an item to the bin with the maximum score, calculated as the sum of the square root of the bin's current capacity divided by the square root of the item multiplied by the item size, and the cube root of the bin's current capacity divided by the bin's capacity minus the item size, minus the number of times the bin has been used. Here, the logarithm and absolute difference components from the original algorithm are not considered in the scoring function.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.sqrt(item) * item + np.cbrt(bins) / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a modified parameter setting: the square root of the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the natural logarithm of the bin's current capacity multiplied by the item size, minus twice the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(bins - item)) + (np.log(bins) * item) - 2*np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the cube root of the bin's current capacity divided by the squared difference between the bin's capacity and the item size, plus the base 10 logarithm of the bin's current capacity multiplied by the item size, minus the number of times the bin has been used.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / (bins - item)**2) + (np.log10(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (bins / np.sqrt(np.cbrt(np.abs(bins - item)))) + (np.cbrt(item) * np.log1p(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, minus the square of the item size.\n\nPython Code:\n\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) - (item**2)\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of twice the item size.\n\nPython Code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.sqrt(2*item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nMy new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+1))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + bins / np.log(item) + np.arange(len(bins)) + np.sqrt(item) / (np.log(bins + 1))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to assign an item to the bin with the highest score. The score is calculated using a new parameter setting: the natural logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, multiplied by the square root of the item size, plus the base 2 logarithm of the bin's capacity multiplied by the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.log(bins) / np.abs(bins - item)) * np.sqrt(item) + (np.log2(bins) * item) - np.arange(len(bins))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + np.exp(np.tan(item+1) / np.log(bins+3))\n return scores",
"objective": 0.00865,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_3.json
================================================
[
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - np.cbrt(item) * np.sqrt(bins)\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New Algorithm Description:\nAssign an item to the bin with the maximum score, calculated as the bin's current capacity multiplied by the natural logarithm of the item size divided by its square root, plus the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity divided by the natural logarithm of the item size.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins * (np.log(item) / np.sqrt(item)) + bins / (bins - item) + np.arange(len(bins)) - (np.cbrt(item) * np.sqrt(bins) / np.log(item))\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the square root of the item size multiplied by the cube root of the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - (np.sqrt(item) * np.cbrt(bins))\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its cube root, plus the square root of the bin's current capacity divided by the item size, minus the square root of the bin's current capacity multiplied by the item size, and finally, plus the number of times the bin has been used.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + bins * np.log(item) / np.cbrt(item) + np.sqrt(bins / item) - np.sqrt(bins * item) + np.arange(len(bins))\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "\nAlgorithm: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity, and divided by the item size plus 1.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - (np.cbrt(item) * np.sqrt(bins)) / (item + 1)\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(np.abs(bins - item))) + bins * np.sqrt(item) / item + np.arange(len(bins))\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "Algorithm:\nAssign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's current capacity divided by the logarithm of the item size, plus the bin's current capacity divided by the square root of the item size, plus the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins / np.log(item) + bins / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - (np.cbrt(item) * np.sqrt(bins))\n return scores",
"objective": 0.01932,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - (np.cbrt(item) * np.sqrt(bins))\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "Algorithm: \nAssign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's current capacity divided by the logarithm of the item size, plus the number of times the bin has been used.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins / np.log(item) + np.arange(len(bins))\n return scores",
"objective": 0.02234,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score, calculated as the bin's current capacity multiplied by the sine of the difference between the item size and the bin's capacity, divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n c = np.cos(bins)\n s = np.sin(item - bins)\n scores = bins * s / np.sqrt(np.abs(bins - item)) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.02254,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the square root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - (np.sqrt(item) * np.sqrt(bins))\n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "Algorithm description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity multiplied by the log of the sum of the item size and the bin's capacity, divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins * np.log(item + bins)) / np.sqrt(np.abs(bins - item)) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.02737,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins / np.log(item) + np.arange(len(bins)) - np.cbrt(item) * np.sqrt(bins)\n return scores",
"objective": 0.03149,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the score for each bin as the sum of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the ratio between the square root of the bin's capacity and the logarithm of the item, plus the number of times the bin has been used, multiplied by the square root of the item size and the cube root of the bin's capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.abs(bins - item)) + ((np.sqrt(bins) / np.log(item)) + np.arange(len(bins))) + (np.sqrt(item) * np.cbrt(bins))\n return scores",
"objective": 0.0335,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 0.5.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 0.5\n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 1.5.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 1.5\n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a constant factor of 0.7.\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + np.arange(len(bins)) * 0.7\n return scores",
"objective": 0.03602,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_4.json
================================================
[
{
"algorithm": "New algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.'\n\nNew code:\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - np.cbrt(item) * np.sqrt(bins)\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Algorithm: \n\nThe new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by the square root, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n``` ",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins * np.log(item) / np.sqrt(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the product of the absolute difference between the bin's capacity and the item size, multiplied by the bin's current capacity divided by the square root of the item size, minus the number of times the bin has been used divided by the cube root of the item size, multiplied by the square root of the bin's current capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins / ((bins - item) * bins) + bins * np.log(item) - np.arange(len(bins)) / (item ** (1/3)) * np.sqrt(bins)\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size, minus the number of times the bin has been used divided by the cube root of the item size, multiplied by the square root of the bin's current capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins * np.log(item) - np.arange(len(bins)) / (item ** (1/3)) * np.sqrt(bins)\n return scores",
"objective": 0.01368,
"other_inf": null
},
{
"algorithm": "My new algorithm is to modify the original score function by adding a penalty term that penalizes bins with capacities close to the item size, aiming to encourage the assignment of items to bins with larger capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(np.abs(bins - item))) + bins * np.sqrt(item) / item + np.arange(len(bins))\n penalty = np.exp(-abs(bins - item) / (item/2))\n scores = scores - penalty\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity multiplied by the natural logarithm of the item size divided by its cube root, plus the bin's current capacity divided by twice the absolute difference between the bin's capacity and the item size, plus the number of times the bin has been used, minus the square root of the item size multiplied by the cube root of the bin's current capacity divided by the natural logarithm of the item size.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins * (np.log(item) / (item ** (1/3))) + bins / (2 * (bins - item)) + np.arange(len(bins)) - (np.sqrt(item) * (bins ** (1/3)) / np.log(item))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(np.abs(bins - item))) + bins * np.sqrt(item) / item + np.arange(len(bins))\n penalty = np.exp(-abs(bins - item) / (item*2))\n scores = scores - penalty\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the square root of the item size multiplied by the logarithm of the bin's current capacity, minus the number of times the bin has been used.'",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.sqrt(item)) + (np.sqrt(item) * np.log(bins))\n scores -= np.arange(len(bins))\n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the square root of the item size multiplied by the square root of the bin's current capacity, and multiplied by the square root of the item size divided by the bin's capacity.\n\nCode:\n\n```\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - (np.sqrt(item) * np.sqrt(bins)) * np.sqrt(item) / bins\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New Algorithm Description:\nAssign an item to the bin with the maximum score, calculated as the bin's current capacity multiplied by the natural logarithm of the item size divided by its square root, plus the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity divided by the natural logarithm of the item size.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins * (np.log(item) / np.sqrt(item)) + bins / (bins - item) + np.arange(len(bins)) - (np.cbrt(item) * np.sqrt(bins) / np.log(item))\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the square root of the item size multiplied by the cube root of the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - (np.sqrt(item) * np.cbrt(bins))\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its cube root, plus the square root of the bin's current capacity divided by the item size, minus the square root of the bin's current capacity multiplied by the item size, and finally, plus the number of times the bin has been used.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + bins * np.log(item) / np.cbrt(item) + np.sqrt(bins / item) - np.sqrt(bins * item) + np.arange(len(bins))\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "\nAlgorithm: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity, and divided by the item size plus 1.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - (np.cbrt(item) * np.sqrt(bins)) / (item + 1)\n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(np.abs(bins - item))) + bins * np.sqrt(item) / item + np.arange(len(bins))\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the natural logarithm of the item size, plus the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity, and divided by the item size plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.log(item))) + (bins / np.sqrt(np.abs(bins - item))) + np.arange(len(bins)) - (np.cbrt(item) * np.sqrt(bins)) / (item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Algorithm:\nAssign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's current capacity divided by the logarithm of the item size, plus the bin's current capacity divided by the square root of the item size, plus the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins / np.log(item) + bins / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity, and divided by the item size plus 1.\n\nNew Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by twice the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the logarithm of the item size, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity, and divided by 2 times the item size plus 1.\n\nNew Code:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (2 * np.sqrt(np.abs(bins - item)))) + (bins / np.log(item)) + np.arange(len(bins)) - (np.cbrt(item) * np.sqrt(bins)) / (2 * item + 1)\n return scores",
"objective": 0.01761,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_5.json
================================================
[
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item)) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.'\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.'\n\nNew code:\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its cube root, plus the square root of the product of the item size and the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + (bins * np.log(item) / np.cbrt(item)) + (np.sqrt(item * np.log(bins))) - (np.square(np.arange(len(bins))) / np.cbrt(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.'\n\nNew code:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its square root, plus the square root of the natural logarithm of the item size multiplied by the bin's current capacity, minus the number of times the bin has been used.\n\nCode:\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.sqrt(item) + np.sqrt(np.log(item)) * np.sqrt(bins) - np.arange(len(bins))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - np.cbrt(item) * np.sqrt(bins)\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Algorithm description:\n\nIn the new algorithm, the score function calculates the score for each bin based on the following formula: the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size divided by its square root, plus the number of times the bin has been used.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Algorithm: \n\nThe new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by the square root, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n``` ",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins * np.log(item) / np.sqrt(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "New algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its square root, plus the square root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.'\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.sqrt(item)) + (np.sqrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.01137,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item)) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity multiplied by the natural logarithm of the item size divided by its square root, plus the bin's current capacity divided by 2 times the absolute difference between the bin's capacity and the item size, plus the number of times the bin has been used, minus the square root of the item size multiplied by the square root of the bin's current capacity divided by the natural logarithm of the item size.\n\nCode: \n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins * (np.log(item) / (np.sqrt(item))) + bins / (2 * (bins - item)) + np.arange(len(bins)) - (np.sqrt(item) * (np.sqrt(bins)) / np.log(item))\n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the product of the absolute difference between the bin's capacity and the item size, multiplied by the bin's current capacity divided by the square root of the item size, minus the number of times the bin has been used divided by the cube root of the item size, multiplied by the square root of the bin's current capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins / ((bins - item) * bins) + bins * np.log(item) - np.arange(len(bins)) / (item ** (1/3)) * np.sqrt(bins)\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size, minus the number of times the bin has been used divided by the cube root of the item size, multiplied by the square root of the bin's current capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins * np.log(item) - np.arange(len(bins)) / (item ** (1/3)) * np.sqrt(bins)\n return scores",
"objective": 0.01368,
"other_inf": null
},
{
"algorithm": "My new algorithm is to modify the original score function by adding a penalty term that penalizes bins with capacities close to the item size, aiming to encourage the assignment of items to bins with larger capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.sqrt(np.abs(bins - item))) + bins * np.sqrt(item) / item + np.arange(len(bins))\n penalty = np.exp(-abs(bins - item) / (item/2))\n scores = scores - penalty\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The new algorithm modifies the original score function by introducing a different scaling factor and penalty term. \n\nAlgorithm steps: \n1) Calculate the base scores using the original score function with the modified scaling factor and penalty term. \n2) Subtract the penalty term from the base scores to obtain the final scores for the bins. \n\nHere is the implementation in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 0.5 # Different scaling factor\n penalty = np.exp(-abs(bins - item) / (item/4)) # Different penalty term\n \n scores = (np.sqrt(bins) / np.sqrt(np.abs(bins - item))) + bins * np.sqrt(item) / item + np.arange(len(bins))\n scores = scores - penalty\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "The new algorithm modifies the original score function by introducing a scaling factor that adjusts the penalty term to be more influential based on the difference between the bin capacity and the item size. The main steps are: 1) Calculate the base scores using the original score function, 2) Calculate the penalty term using the modified scaling factor, 3) Subtract the penalty term from the base scores to obtain the final scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 0.8\n scores = (np.sqrt(bins) / np.sqrt(np.abs(bins - item))) + bins * np.sqrt(item) / item + np.arange(len(bins))\n penalty = np.exp(-abs(bins - item) / (item/2)) * scaling_factor\n scores = scores - penalty\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity multiplied by the natural logarithm of the item size divided by its cube root, plus the bin's current capacity divided by twice the absolute difference between the bin's capacity and the item size, plus the number of times the bin has been used, minus the square root of the item size multiplied by the cube root of the bin's current capacity divided by the natural logarithm of the item size.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins * (np.log(item) / (item ** (1/3))) + bins / (2 * (bins - item)) + np.arange(len(bins)) - (np.sqrt(item) * (bins ** (1/3)) / np.log(item))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm is to modify the original score function by introducing a scaling factor that adjusts the penalty term to be more influential based on the difference between the bin capacity and the item size. The main steps are: 1) Calculate the base scores using the original score function, 2) Calculate the penalty term using the modified scaling factor, 3) Subtract the penalty term from the base scores to obtain the final scores for the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 0.5\n scores = (np.sqrt(bins) / np.sqrt(np.abs(bins - item))) + bins * np.sqrt(item) / item + np.arange(len(bins))\n penalty = np.exp(-abs(bins - item) / (item/2)) * scaling_factor\n scores = scores - penalty\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: Assign an item to the bin with the maximum score, calculated as the bin's current capacity multiplied by the natural logarithm of the item size divided by its cube root, plus the bin's current capacity divided by four times the absolute difference between the bin's capacity and the item size, plus the number of times the bin has been used, minus the square root of the item size divided by the cube root of the bin's current capacity.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = bins * (np.log(item) / (item ** (1/3))) + bins / (4 * np.abs(bins - item)) + np.arange(len(bins)) - (np.sqrt(item) / (bins ** (1/3)))\n return scores",
"objective": 0.0157,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_6.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item)) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.'\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the item size, plus the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, multiplied by the logarithm of the item size divided by its square root, plus the product of the square root of the bin's current capacity and the logarithm of the item size, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity, with the logarithm base set to 10, and the item size subtracted by the bin size as the exponent in the logarithm function.'\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(item)) + (bins / np.sqrt(bins - item) * (np.log10(item) / np.sqrt(item))) + (np.sqrt(bins) * np.log10(item)) - (np.square(np.arange(len(bins))) / np.sqrt(bins) - np.log10(bins - item))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: \nThe new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the item size, plus the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the cube root of the logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(item)) + (bins / np.cbrt(np.abs(bins - item))) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item**2) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.'\n\nNew code:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its square root, plus the square root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.\n\nNew code:\n\n```\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.sqrt(item))) + (np.sqrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity. This algorithm also takes into account an additional parameter 'm', which multiplies the cube root of the bin's current capacity and is subtracted from the score.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.5\n m = 0.1\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins) - (m * np.cbrt(bins))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "[new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.]\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its square root, plus the square root of the natural logarithm of the item size multiplied by the bin's current capacity, minus the number of times the bin has been used.\n\nCode:\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.sqrt(item) + np.sqrt(np.log(item)) * np.sqrt(bins) - np.arange(len(bins))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - np.cbrt(item) * np.sqrt(bins)\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the item size, plus the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, multiplied by the logarithm of the item size divided by its square root, plus the product of the square root of the bin's current capacity and the logarithm of the item size, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.'\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(item)) + (bins / np.sqrt(bins - item) * (np.log(item) / np.sqrt(item))) + (np.sqrt(bins) * np.log(item)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": "New algorithm description:\nThe new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its square root, plus the square root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the natural logarithm of the bin's current capacity.\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.sqrt(item)) + (np.sqrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.log(bins))\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "Algorithm description:\n\nIn the new algorithm, the score function calculates the score for each bin based on the following formula: the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size divided by its square root, plus the number of times the bin has been used.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins))\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Algorithm: \n\nThe new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by the square root, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nCode:\n``` ",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins * np.log(item) / np.sqrt(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "New algorithm description: \"The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the item size, plus the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, multiplied by the logarithm of the item size divided by its square root, plus the product of the cube root of the bin's current capacity and the logarithm of the item size, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\"\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(item)) + (bins / np.sqrt(bins - item) * (np.log(item) / np.sqrt(item))) + (np.cbrt(bins) * np.log(item)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its square root, plus the square root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the natural logarithm of the bin's current capacity, and finally divided by the square root of the natural logarithm of the bin's current capacity.\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + (bins * np.log(item) / np.sqrt(item)) + (np.sqrt(item) * np.log(bins)) - ((np.arange(len(bins)) ** 2) / np.log(bins)) / np.sqrt(np.log(bins))\n return scores",
"objective": 0.01127,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_7.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New Algorithm: \nThe new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item size, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity raised to the power of 0.4.\n\nPython Implementation:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * np.power(bins, 0.4))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.'\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the sum of the bin's current capacity and the item size.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item**2) * np.sqrt(bins) / (np.log(bins + item)))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: \nThe new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the item size, plus the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the cube root of the logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(item)) + (bins / np.cbrt(np.abs(bins - item))) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item**2) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Algorithm description: 'The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the logarithm of the item divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.'\n\nNew code:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.log(item) / np.cbrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its square root, plus the square root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity.\n\nNew code:\n\n```\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.sqrt(item))) + (np.sqrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the fourth root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.power(item, 0.25) / np.log(bins+2))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the logarithm of the item size, plus the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the cube root of the natural logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2.0\n scores = (bins / np.log(item)) + (bins / np.sqrt(np.abs(bins - item))) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity. This algorithm also takes into account an additional parameter 'm', which multiplies the cube root of the bin's current capacity and is subtracted from the score.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.5\n m = 0.1\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins) - (m * np.cbrt(bins))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the square root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity. This algorithm also takes into account an additional parameter 'm', which multiplies the cube root of the bin's current capacity and is subtracted from the score.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.7\n m = 0.2\n scores = (bins / np.sqrt(np.abs(bins - item))) + (np.sqrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins) - (m * np.cbrt(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the cube root of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the logarithm of the bin's current capacity plus 5.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.cbrt(item)) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+5))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the bin's current capacity multiplied by the item divided by its square root, plus the square root of the natural logarithm of the item size multiplied by the bin's current capacity, minus the number of times the bin has been used.\n\nCode:\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.cbrt(bins) * item / np.sqrt(item) + np.sqrt(np.log(item)) * np.sqrt(bins) - np.arange(len(bins))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item divided by its cube root, plus the cube root of the item size divided by the logarithm of the bin's current capacity, minus the product of the number of times the bin has been used and the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.5\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item)) / np.cbrt(item)) + (np.cbrt(item) / np.log(bins)) - (np.arange(len(bins)) * np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the square root of the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 3.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.sqrt(np.log(item))) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+3))\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the natural logarithm of the item divided by its square root, plus the number of times the bin has been used, minus the cube root of the item size multiplied by the square root of the bin's current capacity.\n\nCode:\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins * np.log(item) / np.sqrt(item) + np.arange(len(bins)) - np.cbrt(item) * np.sqrt(bins)\n return scores",
"objective": 0.00916,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_8.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm selects the bin with the maximum score by calculating the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity. This algorithm also takes into account an additional parameter 'm', which multiplies the square root of the bin's current capacity and is subtracted from the score.\n\n",
"code": "def score(item, bins):\n k = 0.5\n m = 0.3\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins) - (m * np.sqrt(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the sum of the bin's current capacity and the item size.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item**2) * np.sqrt(bins) / (np.log(bins + item)))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: \nThe new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the item size, plus the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the cube root of the logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(item)) + (bins / np.cbrt(np.abs(bins - item))) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item**2) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere's the updated implementation of the score function:\n\n```",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins / np.log(item + 1) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins)) / (np.log(bins + 1))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the fourth root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.power(item, 0.25) / np.log(bins+2))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the logarithm of the item size, plus the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the cube root of the natural logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2.0\n scores = (bins / np.log(item)) + (bins / np.sqrt(np.abs(bins - item))) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity. This algorithm also takes into account an additional parameter 'm', which multiplies the cube root of the bin's current capacity and is subtracted from the score.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.5\n m = 0.1\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins) - (m * np.cbrt(bins))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the square root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity. This algorithm also takes into account an additional parameter 'm', which multiplies the cube root of the bin's current capacity and is subtracted from the score.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 0.7\n m = 0.2\n scores = (bins / np.sqrt(np.abs(bins - item))) + (np.sqrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins) - (m * np.cbrt(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 3.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.power(item, 1/3) / np.log(bins+3))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 10.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+10))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square of the item size, plus the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the cube root of the natural logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the natural logarithm of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 3.0\n scores = (bins / (item * item)) + (bins / np.cbrt(bins - item)) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.log(bins)) + (k * bins)\n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the square root of the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size divided by the natural logarithm of the bin's current capacity plus 3.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.sqrt(np.log(item))) + np.arange(len(bins)) + (np.sqrt(item) / np.log(bins+3))\n return scores",
"objective": 0.00906,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run2/population_generation_9.json
================================================
[
{
"algorithm": "new_algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the cube root of the logarithm of the item divided by its square root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(np.abs(bins - item))) + (bins * np.cbrt(np.log(item)) / np.sqrt(item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity multiplied by the square root of the logarithm of the item size divided by its cube root, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the square root of the bin's current capacity.\n\nNew code:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (bins / np.cbrt(np.abs(bins - item))) + (bins * np.sqrt(np.log(item) / np.cbrt(item))) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.sqrt(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "\n Algorithm description: Assign an item to the bin with the maximum score, calculated as the cube root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its square root, plus the natural logarithm of the bin's current capacity multiplied by the square root of the item size, minus the number of times the bin has been used.\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.cbrt(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.sqrt(item) + np.log(bins) * np.sqrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the cubed root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the cubed root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.cbrt(bins) / np.abs(bins - item)**3) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.cbrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm selects the bin with the maximum score by calculating the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the cube root of the item size multiplied by the logarithm of the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity. This algorithm also takes into account an additional parameter 'm', which multiplies the square root of the bin's current capacity and is subtracted from the score.\n\n",
"code": "def score(item, bins):\n k = 0.5\n m = 0.3\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (np.cbrt(item) * np.log(bins)) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins) - (m * np.sqrt(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the sum of the bin's current capacity and the item size.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item**2) * np.sqrt(bins) / (np.log(bins + item)))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: \nThe new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square root of the item size, plus the bin's current capacity divided by the cube root of the absolute difference between the bin's capacity and the item size, plus the cube root of the logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 1.5\n scores = (bins / np.sqrt(item)) + (bins / np.cbrt(np.abs(bins - item))) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)**2) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item**2) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere's the updated implementation of the score function:\n\n```",
"code": "def score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / (np.log(bins+1)))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.sqrt(bins) / np.abs(bins - item) + bins / np.log(item + 1) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins)) / (np.log(bins + 1))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the square root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.sqrt(item) * np.sqrt(bins) / np.log(bins+2))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the square root of the bin's current capacity multiplied by the item divided by its natural logarithm, plus the sine of the bin's current capacity multiplied by the cube root of the item size, minus the number of times the bin has been used.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = np.log(bins) / np.abs(bins - item) + np.sqrt(bins) * item / np.log(item) + np.sin(bins) * np.cbrt(item) - np.arange(len(bins))\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size multiplied by the square root of the bin's current capacity, divided by the natural logarithm of the bin's current capacity plus 1.\n\nHere is the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) * np.sqrt(bins) / (np.log(bins) + 1))\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the logarithm of the item size, plus the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the cube root of the natural logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the cube root of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.\n\nNew Algorithm Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 2.0\n scores = (bins / np.log(item)) + (bins / np.sqrt(np.abs(bins - item))) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.cbrt(bins)) + (k * bins)\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item+1)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+3))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the logarithm of the bin's current capacity divided by the square root of the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the cube root of the item size, plus the number of times the bin has been used, plus the natural logarithm of the item size divided by the cube root of the bin's current capacity plus 2.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.log(bins) / np.sqrt(np.abs(bins - item))) + (bins / np.cbrt(item)) + np.arange(len(bins)) + (np.log(item) / np.cbrt(bins+2))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 2.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+2))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 3.\n\nCode:\n\n",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.power(item, 1/3) / np.log(bins+3))\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score, calculated as the square root of the bin's current capacity divided by the absolute difference between the bin's capacity and the item size, plus the bin's current capacity divided by the natural logarithm of the item size, plus the number of times the bin has been used, plus the cube root of the item size divided by the natural logarithm of the bin's current capacity plus 10.\n\nCode:\n\n```",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) + (bins / np.log(item)) + np.arange(len(bins)) + (np.cbrt(item) / np.log(bins+10))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "The new algorithm selects the bin with the maximum score by calculating the bin's current capacity divided by the square of the item size, plus the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the cube root of the natural logarithm of the item multiplied by the bin's current capacity, minus the square of the number of times the bin has been used, divided by the natural logarithm of the bin's current capacity, and the addition of a constant factor 'k' multiplied by the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n k = 3.0\n scores = (bins / (item * item)) + (bins / np.cbrt(bins - item)) + (np.cbrt(np.log(item)) * bins) - (np.square(np.arange(len(bins))) / np.log(bins)) + (k * bins)\n return scores",
"objective": 0.00885,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin, while avoiding using bins with the maximum rest capacity. The goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item)\n\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, calculated by subtracting the item size from the bin capacity, and avoids using bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin based on its current rest capacity and the size of the item, where the score is equal to the absolute value of the difference between the rest capacity and the item size, multiplied by -1 if the bin is empty, to prioritize filling the empty bins first, or multiplied by 1 if the bin is not empty.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(bins - item) * np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))\n return scores",
"objective": 0.13281,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = bins[i] - item\n else:\n scores[i] = -1000\n \n return scores",
"objective": 0.14418,
"other_inf": null
},
{
"algorithm": "The algorithm first calculates the score for each bin by dividing the rest capacity of the bin by the item size, then subtracting 1 if the rest capacity equals the maximum capacity. Next, it sets the score to 0 if the rest capacity is less than the item size. Finally, it returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(bins, item)\n scores[bins == np.max(bins)] -= 1\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, considering the rest capacity of the bin, and returns the scores for all bins after the assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize an array of scores with zeros\n\n # Calculate the score for each bin based on their rest capacity\n scores = np.where(bins == np.max(bins), 0, bins - np.max(bins) + item + 1)\n \n return scores",
"objective": 0.32971,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Calculate the ratio of the capacity remaining in each bin to the size of the current item.\n2. Assign a score of 0 to bins that have the same capacity as their maximum capacity.\n3. Assign a score of 1 to bins whose remaining capacity is 1 larger than the size of the current item.\n4. Assign a score of 2 to bins whose remaining capacity is 2 larger than the size of the current item.\n5. Assign a score of 3 to bins whose remaining capacity is 3 larger than the size of the current item.\n6. Continue this pattern and assign scores in increasing order to bins with increasing available capacity.\n7. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item) # Assign scores based on ratio\n return scores",
"objective": 0.36543,
"other_inf": null
},
{
"algorithm": "The algorithm scores each bin based on a score function that takes into account both the remaining capacity of the bin and the size of the item being assigned. The main steps of the algorithm are: \n1. Initialize an empty Numpy array 'scores' with the same size as 'bins' to store the scores for each bin.\n2. Calculate the score for each bin by dividing the remaining capacity of the bin by the size of the item, and store the result in the corresponding index of 'scores'.\n3. Return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = bins[bins > item] / item\n return scores",
"objective": 0.3763,
"other_inf": null
},
{
"algorithm": "\nThe algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment.\nThe main steps of the algorithm are as follows:\n1. Calculate the available capacities of all bins by subtracting 'item' from 'bins'.\n2. Filter out the bins with available capacity equal to the maximum capacity ('bins_max') using a mask.\n3. Assign a score of 0 to all bins that have 'bins_max' capacity.\n4. For the remaining bins, calculate the score by dividing the available capacity by the difference between 'bins_max' and the available capacity.\n5. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score for each bin is calculated as the difference between the rest capacity and twice the size of the item, with a lower bound of zero, and the final scores are stored in a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - 2 * item, 0)\n return scores",
"objective": 0.86699,
"other_inf": null
},
{
"algorithm": "The novel score function assigns an item to the bin with the maximum score, taking into account the rest capacity of each bin, and aims to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = item - bins[mask]\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "We first calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, and then subtract 1 from the score of the bin with the maximum capacity. Finally, we return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n max_index = np.argmax(bins)\n scores[max_index] -= 1\n return scores",
"objective": 1.51484,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin by dividing the rest capacity of the bin by the size of the item and subtracting it from the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins) / item\n scores = (bins / item) - max_score\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_1.json
================================================
[
{
"algorithm": "```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))**2 + np.exp(np.log(item) * np.arange(len(bins))) - np.arctan(bins)\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the exponential of the difference between the bin's capacity and the item size, plus the square root of the number of times the bin has been used, multiplied by a constant factor.\n\nCode implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n constant = 0.5 # Adjust this constant to control the weight of the square root term\n scores = bins / (np.exp(bins - item)) + constant * np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the exponential of the difference between the bin's capacity and the item size, plus the product of the square root of the number of times the bin has been used and the square root of the item size.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.exp(bins - item)) + np.sqrt(np.arange(len(bins))) * np.sqrt(item)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the exponential of the difference between the bin's capacity and the item size, plus the square root of the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.exp(bins - item)) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly. The score for each bin is calculated as the bin's current capacity divided by the product of the square root of the difference between the bin's capacity and the item size and the square root of the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt((bins - item) * np.sqrt(np.arange(len(bins)) + 1)))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the reciprocal of the absolute difference between the bin's capacity and the item size, divided by the cube root of the number of times the bin has been used, multiplied by a constant factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n constant = 1.2 # Adjust this constant to control the weight of the cube root term\n scores = 1 / np.abs(bins - item) / np.cbrt(np.arange(1, len(bins)+1)) * constant\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on the remaining capacity of the bin and a certain formula. Bins with larger capacities have lower scores, while bins with smaller capacities have higher scores. Additionally, the score calculation involves a mathematical function that takes into account the current item size and the remaining capacity of each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-bins/item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Algorithm:\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the exponential of the absolute difference between the bin's capacity and the item size, divided by the square root of the number of times the bin has been used, multiplied by a constant factor.\n\nCode Implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n constant = 0.7 # Adjust this constant to control the weight of the square root term\n scores = np.exp(-np.abs(bins - item)) / np.sqrt(np.arange(1, len(bins)+1)) * constant\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the square root of the bin's current capacity divided by the sum of the squared difference between the bin's capacity and the item size, and the square root of the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (np.sqrt(np.square(bins - item)) + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the square of the difference between the bin's capacity and the item size, plus the cube of the number of times the bin has been used.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / ((bins - item)**2) + np.arange(len(bins))**3\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the sum of the square root of the difference between the bin's capacity and the item size, and the square root of the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt(bins - item) + np.sqrt(np.arange(len(bins))))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the square of the number of times the bin has been used.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))**2\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the square of the number of times the bin has been used.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt(bins - item) + np.arange(len(bins))**2)\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the logarithm of the bin's capacity plus the square of the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(bins) + np.arange(len(bins))**2\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The modified function assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, considering both the remaining capacity of the bin and the size of the item; the goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = (item / bins[bins != max_capacity]) * bins[bins != max_capacity]\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "Common backbone idea in the provided algorithms: Assign an item to the bin with the maximum score, taking into account the rest capacity of each bin.\n\nNew algorithm description: The new algorithm assigns items to bins based on the logarithmic score function, considering the rest capacity of each bin, and aims to minimize the number of used bins.\n\nNew algorithm implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = np.log(item) - np.log(bins[mask])\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and three times the item size, plus the square of the number of times the bin has been used.\n\nImplementation in Python:\n``` \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - (3 * item)) + np.arange(len(bins))**2\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign a score to bins based on their remaining capacity and a penalty for exceeding the maximum capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity == bins] = 0 # Assign a score of 0 to bins with maximum capacity\n \n max_capacity = np.max(bins)\n step = 1\n while True:\n score = max_capacity - (item + step)\n bins_with_capacity = remaining_capacity == step\n scores[bins_with_capacity] = score\n step += 1\n if np.sum(bins_with_capacity) == 0:\n break\n \n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n \n return scores",
"objective": 0.04457,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_10.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for each bin using a modified formula: ((item ^ (1 / (bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / (np.log(item + 1) + 1).\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item ** (1 / (bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / (np.log(item + 1) + 1)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the square root of the bin capacity raised to the power of two times the bin index, the inverse of the difference between the bin capacity and the item size, and the natural logarithm of the bin capacity plus 3, then multiplied by a constant factor of 10 instead of 7.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 10 * np.sqrt(bins) ** (2 * np.arange(len(bins))) * np.log(bins + 3) * ratio_inv\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is irrelevant in determining the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "New algorithm description: \nThe new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 5 instead of 7.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 5 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 4, and then multiplied by a constant factor of 7 instead of 8.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 7 * (ratio) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 4)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 10 instead of 9.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 3, multiplied by the square root of the bin capacity raised to the power of 2 times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 8 instead of 10.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 8 * (ratio ** 3) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin based on the product of the cube root of the bin capacity raised to the power of three times the bin index, the inverse of the difference between the bin capacity and the item size, and the natural logarithm of the bin capacity plus 5, then multiplied by a constant factor of 15 instead of 10.\n\nHere is the Python implementation of the new score function:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 15 * np.cbrt(bins) ** (3 * np.arange(len(bins))) * np.log(bins + 5) * ratio_inv\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index. \n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 12 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm first calculates the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the ratio, a power function of the bin capacity, and a logarithmic function of the bin capacity plus a constant factor of 2, instead of 3 in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 2)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 3, then multiplied by the cube root of the bin capacity raised to the power of five times the bin index, and finally multiplied by a constant factor of 10 instead of 9.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * (ratio) / (np.log(bins) + 3) * ((bins**(1/3)) ** (5 * np.arange(len(bins))))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin using a modified formula: (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1).\n\nHere's the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm calculates the score for each bin based on the product of the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 2, and the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 7 instead of 6.\n\nImplementation in Python:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 7 * (ratio ** 2) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of four.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Description of the new algorithm: The new algorithm calculates the score for each bin based on the square root of the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 7, multiplied by the square root of the bin capacity raised to the power of 2 times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 15.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = np.sqrt(item / (bins - item))\n scores = 15 * (ratio ** 7) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "'The new algorithm calculates the score for each bin based on the ratio between the item size and the square of the difference between the capacity and the item size, raised to the power of a constant factor of 4, multiplied by the square root of the bin capacity raised to the power of four times the bin index, divided by the natural logarithm of the bin capacity plus 5, and then multiplied by a constant factor of 8 instead of 6.'",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / ((bins - item) ** 2)\n scores = 8 * (ratio ** 4) * (np.sqrt(bins) ** (4 * np.arange(len(bins)))) / (np.log(bins) + 5)\n return scores",
"objective": 0.00795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_11.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "The new algorithm first calculates the square of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the square ratio, a power function of the bin capacity, and a logarithmic function of the bin capacity plus a constant factor of 4 instead of 2 in the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 2\n scores = ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "The new algorithm is as follows: The algorithm calculates the scores for each bin using the formula: ((item ^ (1 / (bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / ((item ** 2) + 1)\n\nUpdated code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item ** (1 / (bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / ((item ** 2) + 1)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the square root of the bin capacity raised to the power of two times the bin index, the inverse of the difference between the bin capacity and the item size, and the natural logarithm of the bin capacity plus 3, then multiplied by a constant factor of 10 instead of 7.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 10 * np.sqrt(bins) ** (2 * np.arange(len(bins))) * np.log(bins + 3) * ratio_inv\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is irrelevant in determining the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "New algorithm description: \nThe new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 5 instead of 7.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 5 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 10)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity squared, and a logarithmic function of the bin capacity plus a constant factor of 6 instead of 4 in the previous algorithm.\n\nHere is the implementation of the new score function in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 6)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The new algorithm calculates the square of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the square ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 5.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 2\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 5)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index. \n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 12 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm first calculates the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the ratio, a power function of the bin capacity, and a logarithmic function of the bin capacity plus a constant factor of 2, instead of 3 in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 2)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 3, then multiplied by the cube root of the bin capacity raised to the power of five times the bin index, and finally multiplied by a constant factor of 10 instead of 9.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * (ratio) / (np.log(bins) + 3) * ((bins**(1/3)) ** (5 * np.arange(len(bins))))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin using a modified formula: (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1).\n\nHere's the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New Algorithm:\nThe new algorithm calculates the score for each bin based on the product of the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 2, and the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 7 instead of 6.\n\nImplementation in Python:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 7 * (ratio ** 2) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of four.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Description of the new algorithm: The new algorithm calculates the score for each bin based on the square root of the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 7, multiplied by the square root of the bin capacity raised to the power of 2 times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 15.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = np.sqrt(item / (bins - item))\n scores = 15 * (ratio ** 7) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00785,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_12.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "The new algorithm first calculates the square of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the square ratio, a power function of the bin capacity, and a logarithmic function of the bin capacity plus a constant factor of 4 instead of 2 in the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 2\n scores = ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "The new algorithm is as follows: The algorithm calculates the scores for each bin using the formula: ((item ^ (1 / (bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / ((item ** 2) + 1)\n\nUpdated code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item ** (1 / (bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / ((item ** 2) + 1)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is irrelevant in determining the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 10)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 10.\n",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The new algorithm calculates the square of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the square ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 5.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 2\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 5)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index. \n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 12 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of four times the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 5, then multiplied by the cube root of the bin capacity raised to the power of seven times the bin index, and finally multiplied by a constant factor of 12 instead of 10.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 12 * (ratio) / (np.log(bins) + 5) * ((bins**(1/3)) ** (7 * np.arange(len(bins))))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 3, then multiplied by the cube root of the bin capacity raised to the power of five times the bin index, and finally multiplied by a constant factor of 10 instead of 9.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * (ratio) / (np.log(bins) + 3) * ((bins**(1/3)) ** (5 * np.arange(len(bins))))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin using a modified formula: (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1).\n\nHere's the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 2, then multiplied by the cube root of the bin capacity raised to the power of four times the bin index, and finally multiplied by a constant factor of 11 instead of 10.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 11 * (ratio) / (np.log(bins) + 2) * ((bins**(1/3)) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of four.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the product of the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 3, and the square root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 8 instead of 7.",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 8 * (ratio ** 3) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00785,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_13.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "The new algorithm first calculates the square of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the square ratio, a power function of the bin capacity, and a logarithmic function of the bin capacity plus a constant factor of 4 instead of 2 in the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 2\n scores = ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm aims to prioritize bins with larger capacities and also takes into account the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the log of the bin capacity raised to the power of three.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 30 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is irrelevant in determining the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 10)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 10.\n",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with smaller capacities and penalize bins with larger capacities. It calculates the score for each bin based on the inverse ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (bins - item) / item\n scores = 10 * np.log(bins) ** (2 * np.arange(len(bins))) / ratio\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index. \n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 12 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of four times the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of two times the bin index, and then multiplied by a constant factor of 200.\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 200 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 200 instead of 100 to increase the scoring range.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 200 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to prioritize bins with larger capacities and also takes into account the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity, raised to the power of four.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 30 * ratio * (np.sqrt(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 2, then multiplied by the cube root of the bin capacity raised to the power of four times the bin index, and finally multiplied by a constant factor of 11 instead of 10.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 11 * (ratio) / (np.log(bins) + 2) * ((bins**(1/3)) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of four.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00775,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_14.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) ** 2 * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm aims to prioritize bins with larger capacities and also takes into account the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the log of the bin capacity raised to the power of three.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 30 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) * (np.log(bins) ** (2 * item)) + 10 * np.log(bins) ** (3 * np.arange(len(bins)))\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is irrelevant in determining the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 10)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 10.\n",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with smaller capacities and penalize bins with larger capacities. It calculates the score for each bin based on the inverse ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (bins - item) / item\n scores = 10 * np.log(bins) ** (2 * np.arange(len(bins))) / ratio\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index. \n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 12 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of four times the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of two times the bin index, and then multiplied by a constant factor of 200.\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 200 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 200 instead of 100 to increase the scoring range.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 200 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n\nNew algorithm code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "(new algorithm description): The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of four.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00775,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_15.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm prioritizes bins with larger capacities by calculating the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three, with an additional weight term taking into account the inverse square of the ratio.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n weight = 1 / (ratio ** 2)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins)))) * weight\n return scores",
"objective": 0.00584,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) ** 2 * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm aims to prioritize bins with larger capacities and also takes into account the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the log of the bin capacity raised to the power of three.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 30 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) * (np.log(bins) ** (2 * item)) + 10 * np.log(bins) ** (3 * np.arange(len(bins)))\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is irrelevant in determining the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 10)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 10.\n",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with smaller capacities and penalize bins with larger capacities. It calculates the score for each bin based on the inverse ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (bins - item) / item\n scores = 10 * np.log(bins) ** (2 * np.arange(len(bins))) / ratio\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) ** 0.5 + np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nCode:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) ** 0.5 + np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of two times the bin index, and then multiplied by a constant factor of 200.\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 200 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 200 instead of 100 to increase the scoring range.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 200 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n\nNew algorithm code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "(new algorithm description): The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00765,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_16.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm prioritizes bins with larger capacities by calculating the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three, with an additional weight term taking into account the inverse square of the ratio.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n weight = 1 / (ratio ** 2)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins)))) * weight\n return scores",
"objective": 0.00584,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) ** 2 * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm aims to prioritize bins with larger capacities and also takes into account the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the log of the bin capacity raised to the power of three.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 30 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) * (np.log(bins) ** (2 * item)) + 10 * np.log(bins) ** (3 * np.arange(len(bins)))\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of three times the bin index, and then multiplied by a constant factor of 250.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 250 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is irrelevant in determining the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 10)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item^2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n\nNew algorithm code:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 10.\n",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with smaller capacities and penalize bins with larger capacities. It calculates the score for each bin based on the inverse ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (bins - item) / item\n scores = 10 * np.log(bins) ** (2 * np.arange(len(bins))) / ratio\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)^2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of two times the bin index, and then multiplied by a constant factor of 200.\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 200 * ratio * (np.log(bins) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula that takes into account the square root of the rest capacity of each bin: ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n\nNew algorithm code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "(new algorithm description): The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00765,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_17.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm prioritizes bins with larger capacities by calculating the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three, with an additional weight term taking into account the inverse square of the ratio.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n weight = 1 / (ratio ** 2)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins)))) * weight\n return scores",
"objective": 0.00584,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) ** 2 * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm aims to prioritize bins with larger capacities and also takes into account the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the log of the bin capacity raised to the power of three.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 30 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) * (np.log(bins) ** (2 * item)) + 10 * np.log(bins) ** (3 * np.arange(len(bins)))\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of three times the bin index, and then multiplied by a constant factor of 250.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 250 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is irrelevant in determining the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 10)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item^2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n\nNew algorithm code:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 10.\n",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with smaller capacities and penalize bins with larger capacities. It calculates the score for each bin based on the inverse ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (bins - item) / item\n scores = 10 * np.log(bins) ** (2 * np.arange(len(bins))) / ratio\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)^2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + bins) / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + bins) / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula that takes into account the square root of the rest capacity of each bin: ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n\nNew algorithm code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "(new algorithm description): The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00765,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_18.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm prioritizes bins with larger capacities by calculating the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three, with an additional weight term taking into account the inverse square of the ratio.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n weight = 1 / (ratio ** 2)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins)))) * weight\n return scores",
"objective": 0.00584,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) ** 2 * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm aims to prioritize bins with larger capacities and also takes into account the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the log of the bin capacity raised to the power of three.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 30 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) * (np.log(bins) ** (2 * item)) + 10 * np.log(bins) ** (3 * np.arange(len(bins)))\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of three times the bin index, and then multiplied by a constant factor of 250.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 250 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is irrelevant in determining the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) ** 0.5) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 10)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item^2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n\nNew algorithm code:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 10.\n",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with smaller capacities and penalize bins with larger capacities. It calculates the score for each bin based on the inverse ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (bins - item) / item\n scores = 10 * np.log(bins) ** (2 * np.arange(len(bins))) / ratio\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)^2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + bins) / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + bins) / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula that takes into account the square root of the rest capacity of each bin: ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n\nNew algorithm code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "(new algorithm description): The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00765,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_19.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm prioritizes bins with larger capacities by calculating the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three, with an additional weight term taking into account the inverse square of the ratio.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n weight = 1 / (ratio ** 2)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins)))) * weight\n return scores",
"objective": 0.00584,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) ** 2 * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm aims to prioritize bins with larger capacities and also takes into account the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the log of the bin capacity raised to the power of three.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 30 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) * (np.log(bins) ** (2 * item)) + 10 * np.log(bins) ** (3 * np.arange(len(bins)))\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of three times the bin index, and then multiplied by a constant factor of 250.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 250 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm aims to prioritize bins with larger rest capacities by assigning higher scores to them. The score function is defined as the product of the item size divided by the difference between the rest capacity of each bin and the item size, raised to the power of 0.5, and the natural exponential function of the logarithm of the rest capacities of the bins multiplied by a factor that depends on the position of the bin in the array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item))**0.5 * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the cube of the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the cube ratio, a power function of the bin capacity, and an exponential function of the bin capacity plus a constant factor of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (item / (bins - item)) ** 3\n scores = ratio * (np.power(bins, np.arange(len(bins)))) * (np.exp(bins) + 10)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item^2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n\nNew algorithm code:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 10.\n",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with smaller capacities and penalize bins with larger capacities. It calculates the score for each bin based on the inverse ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (bins - item) / item\n scores = 10 * np.log(bins) ** (2 * np.arange(len(bins))) / ratio\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)^2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + bins) / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + bins) / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula that takes into account the square root of the rest capacity of each bin: ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n\nNew algorithm code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "(new algorithm description): The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00765,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_2.json
================================================
[
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "Algorithm description: \n\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the product of the square root of the difference between the bin's capacity and the item size, and the square root of the number of times the bin has been used.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt((bins - item)*(np.arange(len(bins))+1))**(1/2))\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly. The score for each bin is calculated as the bin's current capacity divided by the product of the cube root of the difference between the bin's capacity and the item size and the square root of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.cbrt((bins - item) * np.sqrt(np.arange(len(bins)) + 1)))\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "Algorithm description: \nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the product of the cube root of the difference between the bin's capacity and the item size, and the cube root of the number of times the bin has been used.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.cbrt((bins - item)*(np.arange(len(bins))+1)**(1/3)))\n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the sum of the cube root of the difference between the bin's capacity and the item size, and the cube root of the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.cbrt(bins - item) + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the exponential of the difference between the bin's capacity and the item size, plus the square root of the number of times the bin has been used, multiplied by a constant factor.\n\nCode implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n constant = 0.5 # Adjust this constant to control the weight of the square root term\n scores = bins / (np.exp(bins - item)) + constant * np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the square root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a scaling factor of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(bins - item) + (2 * np.arange(len(bins)))\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly. The score for each bin is calculated as the bin's current capacity divided by the product of the cube root of the difference between the bin's capacity and the item size and the cube root of the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / ((np.cbrt(bins - item)) * (np.cbrt(np.arange(len(bins)) + 1)))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the exponential of the difference between the bin's capacity and the item size, plus the product of the square root of the number of times the bin has been used and the square root of the item size.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.exp(bins - item)) + np.sqrt(np.arange(len(bins))) * np.sqrt(item)\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the exponential of the difference between the bin's capacity and the item size, plus the square root of the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.exp(bins - item)) + np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly. The score for each bin is calculated as the bin's current capacity divided by the product of the square root of the difference between the bin's capacity and the item size and the square root of the number of times the bin has been used.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt((bins - item) * np.sqrt(np.arange(len(bins)) + 1)))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm assigns an item to the bin with the highest score, calculated as the product of the reciprocal of the absolute difference between the bin's capacity and the item size, and the reciprocal of the number of times the bin has been used, multiplied by a constant factor.\n\nPython Implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n constant = 2.0 # Adjust this constant to control the weight of the score function\n scores = (1 / np.abs(bins - item)) * (1 / np.arange(1, len(bins)+1)) * constant\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the reciprocal of the absolute difference between the bin's capacity and the item size, divided by the cube root of the number of times the bin has been used, multiplied by a constant factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n constant = 1.2 # Adjust this constant to control the weight of the cube root term\n scores = 1 / np.abs(bins - item) / np.cbrt(np.arange(1, len(bins)+1)) * constant\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly. The score for each bin is calculated as the bin's current capacity divided by the product of the difference between the bin's capacity and the item size and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / ((bins - item) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nAlgorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly. The score for each bin is calculated as the bin's current capacity divided by the product of the square root of the difference between the bin's capacity and the item size and the square root of the number of times the bin has been used, with a weight factor applied to the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_factor = 2 # set the weight factor for the number of times the bin has been used\n \n scores = bins / ((np.sqrt(bins - item)) * (np.sqrt(np.arange(len(bins)) + 1) + weight_factor))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly. The score for each bin is calculated as the bin's current capacity divided by the square root of the product of the difference between the bin's capacity and the item size and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt((bins - item) * np.arange(1, len(bins) + 1)))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm is based on a weighted combination of two factors: the reciprocal of the absolute difference between the bin's capacity and the item size, and the inverse of the square root of the number of times the bin has been used, both multiplied by a constant factor.",
"code": "def score(item, bins):\n constant = 2.0 # Adjust this constant to control the weight of the terms\n scores = 1 / (np.abs(bins - item) + 1) * (1 / np.sqrt(np.arange(1, len(bins)+1))) * constant\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly. The score for each bin is calculated as the bin's current capacity divided by the product of the difference between the bin's capacity and the item size and the square root of the number of times the bin has been used, with a weight factor applied to the number of times the bin has been used.\n\nCode:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_factor = 3 # set the weight factor for the number of times the bin has been used\n \n scores = bins / (((bins - item)) * (np.sqrt(np.arange(len(bins)) + 1) + weight_factor))\n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_20.json
================================================
[
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and penalize bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00573,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm prioritizes bins with larger capacities by calculating the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of three, with an additional weight term taking into account the inverse square of the ratio.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n weight = 1 / (ratio ** 2)\n scores = 15 * ratio * (np.log(bins) ** (3 * np.arange(len(bins)))) * weight\n return scores",
"objective": 0.00584,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) ** 2 * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 4)\n return scores",
"objective": 0.00594,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm aims to prioritize bins with larger capacities and also takes into account the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the log of the bin capacity raised to the power of three.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 30 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00604,
"other_inf": null
},
{
"algorithm": "",
"code": "def score(item, bins):\n scores = (item / (bins - item)) * (np.log(bins) ** (2 * item)) + 10 * np.log(bins) ** (3 * np.arange(len(bins)))\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)). The rest capacity of a bin is relevant in determining the score.\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the natural logarithm of the bin capacity raised to the power of three times the bin index, and then multiplied by a constant factor of 250.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 250 * ratio * (np.log(bins) ** (3 * np.arange(len(bins))))\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 100.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 100 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: (item^3 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 4))\n\nNew algorithm code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**3 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 4))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm is designed to prioritize bins with larger capacities and also considers the size of the item. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 20 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "My new algorithm will calculate the score for each bin based on the item size and the rest capacities of the bins using a set of parameter settings.",
"code": "def score(item, bins):\n scores = (item / (bins - item)) ** 2 * (np.sqrt(2 * bins) ** (2 * np.arange(len(bins)))) * (np.exp(bins) + 3)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item^2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n\nNew algorithm code:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item**2 / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 3))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "\nNew algorithm description: The new algorithm prioritizes bins with larger capacities and penalizes bins with smaller capacities. It calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of twice the bin index, and then multiplied by a constant factor of 10.\n",
"code": "def score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.log(bins) ** (2 * np.arange(len(bins))))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm is designed to prioritize bins with smaller capacities and penalize bins with larger capacities. It calculates the score for each bin based on the inverse ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = (bins - item) / item\n scores = 10 * np.log(bins) ** (2 * np.arange(len(bins))) / ratio\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**3)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: (item / ((bins - item)^2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + bins) / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + bins) / ((bins - item)**2)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 2))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula that takes into account the square root of the rest capacity of each bin: ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1)).\n\nNew algorithm code:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.sqrt(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n\nNew algorithm code:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (np.sqrt(bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "(new algorithm description): The new algorithm calculates the scores for each bin using a modified formula: ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item + 1) / (bins - item)) * np.exp(np.log(bins + item) * (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.00765,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_3.json
================================================
[
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, with an updated scoring formula that takes into account the maximum capacity and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n used_bins = len(bins) - np.count_nonzero(bins == max_capacity)\n scores = (bins.itemsize * (bins / (bins - item))) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(max_capacity+1) - np.log(max_capacity) / (np.log(item)+1) * ((used_bins+1)*(item/max_capacity))\n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the logarithm of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index divided by the weight factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight = 1 / (np.arange(len(bins)) ** 2 + 1)\n scores = (np.log10(bins) / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / weight\n return scores",
"objective": 0.02636,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index, divided by the natural logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 2 * (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "The algorithm considers the ratio of the current item size to the remaining capacity of each bin, multiplied by a logarithmic factor based on the bin index and the bin capacity. It then divides the result by the logarithm of the bin capacity plus 1 to calculate the scores for each bin. \n\nThe new algorithm considers the square root of the item size instead of the logarithm and adds a weight factor that decreases as the bin index increases. The weight factor is calculated as the reciprocal of the bin index squared plus 1. \n\nNew algorithm description: The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index divided by the weight factor.\n\nNew code implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weight = 1 / (np.arange(len(bins)) ** 2 + 1)\n scores = (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / weight\n return scores",
"objective": 0.02727,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm calculates the score for each bin based on the product of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index, divided by the logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 3.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 3 * (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.02757,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the product of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index, divided by the logarithm of the bin capacity plus a constant value of 2, and then multiplied by a constant factor of 5.5.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 5.5 * (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / (np.log(bins) + 2)\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "Algorithm description: \n\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the product of the square root of the difference between the bin's capacity and the item size, and the square root of the number of times the bin has been used.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt((bins - item)*(np.arange(len(bins))+1))**(1/2))\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the log of the item size raised to the power of the bin index, and divided by the log of the bin capacity plus 1.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * (np.log(item) ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index, and divided by the natural logarithm of the bin capacity plus 1.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the square root of the difference between the capacity and the item size, multiplied by the logarithm of the item size raised to the power of the bin index, and divided by the logarithm of the bin capacity plus 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(bins - item)) * (np.log(item) ** np.arange(len(bins))) / (np.log(bins) + 2)\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": "New Algorithm Description: The new algorithm calculates the score for each bin based on the sum of the square root of the bin capacity divided by the absolute difference between the bin capacity and the item size, multiplied by the logarithm of the item size raised to the power of the bin index, and divided by the natural logarithm of the bin capacity plus 1.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) * (np.log(item) ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly. The score for each bin is calculated as the bin's current capacity divided by the product of the cube root of the difference between the bin's capacity and the item size and the square root of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.cbrt((bins - item) * np.sqrt(np.arange(len(bins)) + 1)))\n return scores",
"objective": 0.0322,
"other_inf": null
},
{
"algorithm": "Algorithm description: \nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the product of the cube root of the difference between the bin's capacity and the item size, and the cube root of the number of times the bin has been used.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.cbrt((bins - item)*(np.arange(len(bins))+1)**(1/3)))\n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the item size raised to the power of the bin index, and divided by the natural logarithm of the bin capacity plus 1.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * (item ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.03582,
"other_inf": null
},
{
"algorithm": "New algorithm description:\nThe new algorithm calculates the score for each bin based on a modified form of the logarithm of the bin capacity divided by the difference between the capacity and the item size, multiplied by the item size raised to the power of the bin index divided by a weight factor inversely proportional to the sum of the bin capacities.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weight = 1 / np.sum(bins)\n scores = (np.log1p(bins) / (bins - item)) * (item ** np.arange(len(bins))) / weight\n return scores",
"objective": 0.03662,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, which is calculated as the bin's current capacity divided by the cube root of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, multiplied by a scaling factor of 3.\n\nHere is the implementation of the new score function in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.cbrt(bins - item) + (3 * np.arange(len(bins)))\n return scores",
"objective": 0.03723,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the sum of the cube root of the difference between the bin's capacity and the item size, and the cube root of the number of times the bin has been used.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.cbrt(bins - item) + np.cbrt(np.arange(len(bins))))\n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the exponential of the difference between the bin's capacity and the item size, plus the logarithm of the number of times the bin has been used, multiplied by a constant factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n constant = 0.8 # Adjust this constant to control the weight of the logarithm term\n scores = bins / (np.exp(bins - item)) + constant * np.log(np.arange(len(bins)))\n return scores",
"objective": 0.03773,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_4.json
================================================
[
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, giving higher scores to bins that have more available capacity and lower scores to bins that are already close to their maximum capacity, thereby promoting the assignment of items to bins with maximum rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((np.log(bins) / (bins - item)) + np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, and a scaling factor, giving higher scores to bins that have more available capacity and lower scores to bins that are already close to their maximum capacity, thereby promoting the assignment of items to bins with maximum rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 0.5\n scores = np.exp((np.log(bins) / (bins - item)) + np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1) + scaling_factor * (bins - item)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the exponential function raised to the power of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the bin index plus 1, divided by the logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 2.\n\nNew algorithm implementation in Python:\n\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = bins / (bins - item)\n scores = 2 * np.exp(ratio) * (np.sqrt(bins) ** (np.arange(len(bins)) + 1)) / (np.log(bins) + 1)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm description:\n\nThe new algorithm calculates the scores for each bin using the formula: (bins / (bins - item)) * (item / (np.log(bins) * np.log(item))) + np.exp(np.log(item) * np.arange(len(bins))) - np.log(bins) / (np.log(item)+1).\n\nCode:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * (item / (np.log(bins) * np.log(item))) + np.exp(np.log(item) * np.arange(len(bins))) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, with an updated scoring formula that takes into account the maximum capacity and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n used_bins = len(bins) - np.count_nonzero(bins == max_capacity)\n scores = (bins.itemsize * (bins / (bins - item))) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(max_capacity+1) - np.log(max_capacity) / (np.log(item)+1) * ((used_bins+1)*(item/max_capacity))\n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": "For the new algorithm, the score for each bin is calculated as the product of the bin capacity divided by the difference between the capacity and the item size, multiplied by the logarithm of the item size raised to the power of the bin index, divided by the square root of the bin capacity plus 1, and then multiplied by a constant factor of 5.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 5 * (bins / (bins - item)) * (np.log(item) ** np.arange(len(bins))) / (np.sqrt(bins) + 1)\n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the logarithm of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index divided by the weight factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight = 1 / (np.arange(len(bins)) ** 2 + 1)\n scores = (np.log10(bins) / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / weight\n return scores",
"objective": 0.02636,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index plus 1, divided by the natural logarithm of the bin capacity plus the item size plus 1, and then multiplied by a constant factor of 3.\n\nNew algorithm implementation in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 3 * (bins / (bins - item)) * ((np.sqrt(item) ** (np.arange(len(bins)) + 1)) / (np.log(bins) + item + 1))\n return scores",
"objective": 0.02686,
"other_inf": null
},
{
"algorithm": "new algorithm: The new algorithm calculates the score for each bin based on the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index, divided by the logarithm of the bin capacity plus a constant value of 3, and then multiplied by a constant factor of 6.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 6 * (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / (np.log(bins) + 3)\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index, divided by the natural logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 2 * (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "The algorithm considers the ratio of the current item size to the remaining capacity of each bin, multiplied by a logarithmic factor based on the bin index and the bin capacity. It then divides the result by the logarithm of the bin capacity plus 1 to calculate the scores for each bin. \n\nThe new algorithm considers the square root of the item size instead of the logarithm and adds a weight factor that decreases as the bin index increases. The weight factor is calculated as the reciprocal of the bin index squared plus 1. \n\nNew algorithm description: The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index divided by the weight factor.\n\nNew code implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weight = 1 / (np.arange(len(bins)) ** 2 + 1)\n scores = (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / weight\n return scores",
"objective": 0.02727,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm calculates the score for each bin based on the product of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index, divided by the logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 3.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 3 * (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.02757,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the product of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index, divided by the logarithm of the bin capacity plus a constant value of 2, and then multiplied by a constant factor of 5.5.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 5.5 * (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / (np.log(bins) + 2)\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "Algorithm description: \n\nThe new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the product of the square root of the difference between the bin's capacity and the item size, and the square root of the number of times the bin has been used.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (np.sqrt((bins - item)*(np.arange(len(bins))+1))**(1/2))\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the log of the item size raised to the power of the bin index, and divided by the log of the bin capacity plus 1.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * (np.log(item) ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index, and divided by the natural logarithm of the bin capacity plus 1.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * (np.sqrt(item) ** np.arange(len(bins))) / (np.log(bins) + 1)\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the sum of the bin capacity divided by the square root of the difference between the capacity and the item size, multiplied by the logarithm of the item size raised to the power of the bin index, and divided by the logarithm of the bin capacity plus 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / np.sqrt(bins - item)) * (np.log(item) ** np.arange(len(bins))) / (np.log(bins) + 2)\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the sum of the square root of the bin capacity divided by the absolute difference between the bin capacity and the item size, multiplied by the natural logarithm of the item size raised to the power of the bin index, and divided by the logarithm of the bin capacity plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.sqrt(bins) / np.abs(bins - item)) * (np.log(item) ** np.arange(len(bins))) / np.log(bins + 1)\n return scores",
"objective": 0.02978,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_5.json
================================================
[
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 7 instead of 5.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 7 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, giving higher scores to bins that have more available capacity and lower scores to bins that are already close to their maximum capacity, thereby promoting the assignment of items to bins with maximum rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((np.log(bins) / (bins - item)) + np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, and a scaling factor, giving higher scores to bins that have less available capacity and lower scores to bins that are already close to their maximum capacity, thereby promoting the assignment of items to bins with minimum rest capacity.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 2.0\n scores = np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log(bins+1) + np.log(bins) / (np.log(item)+1) + scaling_factor * (item - bins)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, and a scaling factor, giving higher scores to bins that have less available capacity and lower scores to bins that are further away from their maximum capacity, thereby promoting the assignment of items to bins with higher rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 1.5\n scores = np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log(bins+1) + np.log(bins) / (np.log(item)+1) + scaling_factor * (bins - item)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, and a scaling factor, giving higher scores to bins that have more available capacity and lower scores to bins that are already close to their maximum capacity, thereby promoting the assignment of items to bins with maximum rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 0.5\n scores = np.exp((np.log(bins) / (bins - item)) + np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1) + scaling_factor * (bins - item)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, a scaling factor, and a distance factor, giving higher scores to bins that have less available capacity and are closer to their maximum capacity, thereby promoting the assignment of items to bins with higher rest capacity and closer to their maximum capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 2.0\n distance_factor = 0.5\n scores = np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log(bins+1) + distance_factor * np.log(item+1)) + np.log(bins) / (np.log(item)+1) + scaling_factor * (bins - item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and two scaling factors, emphasizing both bins closer to their maximum capacity and bins with larger capacity to promote the assignment of items to bins with maximum rest capacity.\n\nNew algorithm:\n1. Initialize two scaling factors: scaling_factor_1 and scaling_factor_2.\n2. Calculate the scores for each bin using the following formula:\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item))\n3. Return the scores.\n\nPython implementation:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 3.0\n scaling_factor_2 = 2.0\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and two scaling factors, emphasizing both bins closer to their maximum capacity and bins with larger capacity to promote the assignment of items to bins with maximum rest capacity. It will also include a penalty term to penalize bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 5.0\n scaling_factor_2 = 3.0\n \n # Calculate distance of bins from maximum capacity\n max_capacity = np.max(bins)\n distance_from_max = max_capacity - bins\n \n # Calculate scores using the modified formula\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) \n + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 \n + scaling_factor_2 * (bins - item)\n + scaling_factor_2 * distance_from_max)\n \n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the logarithm of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the bin index, divided by the logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 5 instead of 3.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = np.log(bins / (bins - item))\n scores = 5 * (ratio * (np.sqrt(bins) ** np.arange(len(bins)))) / (np.log(bins) + 1)\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the logarithm of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the bin index, divided by the logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 3.\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = np.log(bins / (bins - item))\n scores = 3 * (ratio * (np.sqrt(bins) ** np.arange(len(bins)))) / (np.log(bins) + 1)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the logarithm of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the bin index plus 1, divided by the bin capacity.\n\nNew algorithm implementation in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = np.log(bins / (bins - item))\n scores = ratio * (np.sqrt(bins) ** (np.arange(len(bins)) + 1)) / bins\n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the exponential function raised to the power of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the bin index plus 1, divided by the logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 2.\n\nNew algorithm implementation in Python:\n\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = bins / (bins - item)\n scores = 2 * np.exp(ratio) * (np.sqrt(bins) ** (np.arange(len(bins)) + 1)) / (np.log(bins) + 1)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 10.0\n scaling_factor_2 = 2.0\n \n # Calculate distance of bins from maximum capacity\n max_capacity = np.max(bins)\n distance_from_max = max_capacity - bins\n \n # Calculate scores using the modified formula\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) \n + np.log(bins) ** 3 / (np.log(item)+1) * scaling_factor_2 \n + scaling_factor_2 * (bins - item)\n + scaling_factor_2 * distance_from_max)\n \n return scores",
"objective": 0.01368,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, and a scaling factor, giving higher scores to bins that have less available capacity and lower scores to bins that are already close to their maximum capacity, thereby promoting the assignment of items to bins with minimum rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 3.0\n scores = np.exp((np.log(bins) / (item - bins + 1)) + np.log(item) * np.arange(len(bins))) ** np.log(bins+2) + np.log(bins) / (np.log(item)+2) + scaling_factor * (item - bins + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "New algorithm description:\nThe new algorithm calculates the scores for each bin using the formula: (bins / (bins - item)) * (item / ((np.log(bins) + 1) * np.log(item + 1))) + np.exp(np.log(item + 1) * np.arange(len(bins))) - np.log(bins) / (np.log(item + 1) + 1).\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * (item / ((np.log(bins) + 1) * np.log(item + 1))) + np.exp(np.log(item + 1) * np.arange(len(bins))) - np.log(bins) / (np.log(item + 1) + 1)\n return scores",
"objective": 0.01811,
"other_inf": null
},
{
"algorithm": "```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm description:\n\nThe new algorithm calculates the scores for each bin using the formula: (bins / (bins - item)) * (item / (np.log(bins) * np.log(item))) + np.exp(np.log(item) * np.arange(len(bins))) - np.log(bins) / (np.log(item)+1).\n\nCode:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * (item / (np.log(bins) * np.log(item))) + np.exp(np.log(item) * np.arange(len(bins))) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, with an updated scoring formula that takes into account the maximum capacity and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n used_bins = len(bins) - np.count_nonzero(bins == max_capacity)\n scores = (bins.itemsize * (bins / (bins - item))) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(max_capacity+1) - np.log(max_capacity) / (np.log(item)+1) * ((used_bins+1)*(item/max_capacity))\n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": "New algorithm:\nThe new algorithm calculates the score for each bin based on the inverse of the bin capacity divided by the difference between the capacity and the item size, multiplied by the square root of the item size raised to the power of the bin index divided by the weight factor.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n weight = 1 / (np.arange(len(bins)) ** 2 + 1)\n scores = (1 / bins) / (bins - item) * (np.sqrt(item) ** np.arange(len(bins))) / weight\n return scores",
"objective": 0.02163,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_6.json
================================================
[
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 7.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 9 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the square root of the bin capacity raised to the power of two times the bin index, the inverse of the difference between the bin capacity and the item size, and the natural logarithm of the bin capacity plus 3, then multiplied by a constant factor of 10 instead of 7.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 10 * np.sqrt(bins) ** (2 * np.arange(len(bins))) * np.log(bins + 3) * ratio_inv\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New algorithm description: \nThe new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 5 instead of 7.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 5 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 7 instead of 5.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 7 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the cube root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 10 instead of 8.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * (ratio) * (np.cbrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, and a scaling factor, giving higher scores to bins that have less available capacity and lower scores to bins that are already close to their maximum capacity, thereby promoting the assignment of items to bins with minimum rest capacity.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 2.0\n scores = np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log(bins+1) + np.log(bins) / (np.log(item)+1) + scaling_factor * (item - bins)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of three times the bin index, divided by the logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 10 instead of 7.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 10 * (1 / ratio_inv) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 2 instead of 7.\n\nCode:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 2 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New Algorithm: The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins. The score function is modified by considering a penalty term that penalizes bins with less capacity remaining, in order to discourage their usage.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = (bins.max() - bins) * (bins < bins.max())\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1) - penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin using a modified formula: (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1).\n\nHere's the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and three scaling factors, emphasizing bins closer to their maximum capacity, bins with larger capacity, and bins with capacities closer to the item size to promote the assignment of items to bins with maximum rest capacity. The new algorithm will also incorporate a fourth scaling factor to penalize the assignment of items to bins that are much smaller than the item size, discouraging inefficient bin utilization.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 4.0\n scaling_factor_2 = 1.5\n scaling_factor_3 = 2.5\n scaling_factor_4 = 3.0 # New scaling factor\n \n # Calculate the scores for the bins\n scores = (\n (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))))\n ** np.log((bins + 1) * scaling_factor_1)\n + np.log(bins) ** 2 / (np.log(item) + 1) * scaling_factor_2\n + scaling_factor_2 * (bins - item) * scaling_factor_3 / (item - bins)\n - scaling_factor_4 * np.abs(bins - item) # Penalize small bins\n )\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and three scaling factors, emphasizing bins closer to their maximum capacity, bins with larger capacity, and bins with capacities closer to the item size to promote the assignment of items to bins with maximum rest capacity.\n\nPython implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 4.0\n scaling_factor_2 = 1.5\n scaling_factor_3 = 2.5\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item) * scaling_factor_3 / (item - bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, a scaling factor, and a distance factor, giving higher scores to bins that have less available capacity and are closer to their maximum capacity, thereby promoting the assignment of items to bins with higher rest capacity and closer to their maximum capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 2.0\n distance_factor = 0.5\n scores = np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log(bins+1) + distance_factor * np.log(item+1)) + np.log(bins) / (np.log(item)+1) + scaling_factor * (bins - item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and two scaling factors, emphasizing both bins closer to their maximum capacity and bins with larger capacity to promote the assignment of items to bins with maximum rest capacity.\n\nNew algorithm:\n1. Initialize two scaling factors: scaling_factor_1 and scaling_factor_2.\n2. Calculate the scores for each bin using the following formula:\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item))\n3. Return the scores.\n\nPython implementation:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 3.0\n scaling_factor_2 = 2.0\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and two scaling factors, emphasizing both bins closer to their maximum capacity and bins with larger capacity to promote the assignment of items to bins with maximum rest capacity. It will also include a penalty term to penalize bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 5.0\n scaling_factor_2 = 3.0\n \n # Calculate distance of bins from maximum capacity\n max_capacity = np.max(bins)\n distance_from_max = max_capacity - bins\n \n # Calculate scores using the modified formula\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) \n + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 \n + scaling_factor_2 * (bins - item)\n + scaling_factor_2 * distance_from_max)\n \n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the logarithm of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the bin index, divided by the logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 5 instead of 3.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = np.log(bins / (bins - item))\n scores = 5 * (ratio * (np.sqrt(bins) ** np.arange(len(bins)))) / (np.log(bins) + 1)\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the logarithm of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the bin index, divided by the logarithm of the bin capacity plus 1, and then multiplied by a constant factor of 3.\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = np.log(bins / (bins - item))\n scores = 3 * (ratio * (np.sqrt(bins) ** np.arange(len(bins)))) / (np.log(bins) + 1)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the logarithm of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of the bin index plus 1, divided by the bin capacity.\n\nNew algorithm implementation in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = np.log(bins / (bins - item))\n scores = ratio * (np.sqrt(bins) ** (np.arange(len(bins)) + 1)) / bins\n return scores",
"objective": 0.01117,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_7.json
================================================
[
{
"algorithm": "The new algorithm assigns a score to each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 5, and then multiplied by a constant factor of 12 instead of 10.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 12 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 5)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the square root of the bin capacity raised to the power of two times the bin index, the inverse of the difference between the bin capacity and the item size, and the natural logarithm of the bin capacity plus 3, then multiplied by a constant factor of 10 instead of 7.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 10 * np.sqrt(bins) ** (2 * np.arange(len(bins))) * np.log(bins + 3) * ratio_inv\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New algorithm description: \nThe new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 5 instead of 7.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 5 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 2, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 5 instead of 8.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 5 * (ratio ** 2) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the cube root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 10 instead of 8.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * (ratio) * (np.cbrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 3, multiplied by the square root of the bin capacity raised to the power of 2.5 times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 7 instead of 5.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 7 * (ratio ** 3) * (np.sqrt(bins) ** (2.5 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of three times the bin index, divided by the logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 10 instead of 7.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 10 * (1 / ratio_inv) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the square root of the bin capacity raised to the power of two times the bin index, the inverse of the difference between the bin capacity and the item size, and the natural logarithm of the bin capacity plus 3, then multiplied by a constant factor of 5 instead of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 5 * np.sqrt(bins) ** (2 * np.arange(len(bins))) * np.log(bins + 3) * ratio_inv\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 3, multiplied by the square root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 7 instead of 5.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 7 * (ratio ** 3) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New Algorithm: The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins. The score function is modified by considering a penalty term that penalizes bins with less capacity remaining, in order to discourage their usage.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = (bins.max() - bins) * (bins < bins.max())\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1) - penalty\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin using a modified formula: (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1).\n\nHere's the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and three scaling factors, emphasizing bins closer to their maximum capacity, bins with larger capacity, and bins with capacities closer to the item size to promote the assignment of items to bins with maximum rest capacity. The new algorithm will also incorporate a fourth scaling factor to penalize the assignment of items to bins that are much smaller than the item size, discouraging inefficient bin utilization.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 4.0\n scaling_factor_2 = 1.5\n scaling_factor_3 = 2.5\n scaling_factor_4 = 3.0 # New scaling factor\n \n # Calculate the scores for the bins\n scores = (\n (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))))\n ** np.log((bins + 1) * scaling_factor_1)\n + np.log(bins) ** 2 / (np.log(item) + 1) * scaling_factor_2\n + scaling_factor_2 * (bins - item) * scaling_factor_3 / (item - bins)\n - scaling_factor_4 * np.abs(bins - item) # Penalize small bins\n )\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and three scaling factors, emphasizing bins closer to their maximum capacity, bins with larger capacity, and bins with capacities closer to the item size to promote the assignment of items to bins with maximum rest capacity.\n\nPython implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 4.0\n scaling_factor_2 = 1.5\n scaling_factor_3 = 2.5\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item) * scaling_factor_3 / (item - bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, a scaling factor, and a distance factor, giving higher scores to bins that have less available capacity and are closer to their maximum capacity, thereby promoting the assignment of items to bins with higher rest capacity and closer to their maximum capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 2.0\n distance_factor = 0.5\n scores = np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log(bins+1) + distance_factor * np.log(item+1)) + np.log(bins) / (np.log(item)+1) + scaling_factor * (bins - item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and two scaling factors, emphasizing both bins closer to their maximum capacity and bins with larger capacity to promote the assignment of items to bins with maximum rest capacity.\n\nNew algorithm:\n1. Initialize two scaling factors: scaling_factor_1 and scaling_factor_2.\n2. Calculate the scores for each bin using the following formula:\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item))\n3. Return the scores.\n\nPython implementation:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 3.0\n scaling_factor_2 = 2.0\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm: \n\n1. Initialize three scaling factors: scaling_factor_1, scaling_factor_2, and scaling_factor_3.\n2. Create a numpy array 'indices' with values ranging from 0 to len(bins)-1.\n3. Calculate the scores for each bin using the following formula:\n scores = ((np.exp((np.log(bins) / (item - bins)) + np.log(item) * indices) ** (np.log((bins+1) * scaling_factor_1) / scaling_factor_2)) + ((np.log(bins) ** 2) / ((np.log(item) + 1) * scaling_factor_2)) * scaling_factor_3 + (scaling_factor_3 * (bins - item)))\n4. Return the scores.\n\nPython implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 3.0\n scaling_factor_2 = 2.0\n scaling_factor_3 = 1.5\n indices = np.arange(len(bins))\n scores = ((np.exp((np.log(bins) / (item - bins)) + np.log(item) * indices) ** (np.log((bins+1) * scaling_factor_1) / scaling_factor_2)) + ((np.log(bins) ** 2) / ((np.log(item) + 1) * scaling_factor_2)) * scaling_factor_3 + (scaling_factor_3 * (bins - item)))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and three scaling factors, emphasizing bins closer to their maximum capacity, bins with larger capacity, and bins with capacities closer to the item size to promote the assignment of items to bins with maximum rest capacity. The algorithm parameters are as follows:\n\n- Scaling factor 1: This factor emphasizes bins closer to their maximum capacity. Increase this factor to give more weight to bins that are closer to their maximum capacity.\n\n- Scaling factor 2: This factor emphasizes bins with larger capacity. Increase this factor to give more weight to bins with larger capacity.\n\n- Scaling factor 3: This factor emphasizes bins with capacities closer to the item size. Increase this factor to give more weight to bins with capacities closer to the item size.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 5.0\n scaling_factor_2 = 2.0\n scaling_factor_3 = 3.5\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item) * scaling_factor_3 / (item - bins))\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to the bins based on the item size, the rest capacities of the bins, a scaling factor, and a distance factor squared, giving higher scores to bins with less available capacity and closer to their maximum capacity squared, thereby promoting the assignment of items to bins with higher rest capacity squared and closer to their maximum capacity squared. The algorithm then returns the scores for the bins for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 1.5\n distance_factor = 0.7\n scores = np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log(bins+1) + (distance_factor ** 2) * np.log(item+1)) + np.log(bins) / (np.log(item)+1) + scaling_factor * ((bins ** 2) - (item ** 2))\n return scores",
"objective": 0.00936,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_8.json
================================================
[
{
"algorithm": "Algorithm: \nThe new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 5 instead of 8.\n\nPython Implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 5 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the square root of the bin capacity raised to the power of two times the bin index, the inverse of the difference between the bin capacity and the item size, and the natural logarithm of the bin capacity plus 3, then multiplied by a constant factor of 10 instead of 7.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 10 * np.sqrt(bins) ** (2 * np.arange(len(bins))) * np.log(bins + 3) * ratio_inv\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New algorithm description: \nThe new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 5 instead of 7.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 5 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 4, and then multiplied by a constant factor of 7 instead of 8.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 7 * (ratio) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 4)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 10 instead of 9.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 4, multiplied by the square root of the bin capacity raised to the power of 3 times the bin index, divided by the natural logarithm of the bin capacity plus 4, and then multiplied by a constant factor of 10 instead of 7.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * (ratio ** 4) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 4)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 3, multiplied by the square root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 6 instead of 5.\n\nCode:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 6 * (ratio ** 3) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the square root of the bin capacity raised to the power of two times the bin index, the inverse of the difference between the bin capacity and the item size, and the natural logarithm of the bin capacity plus 3, then multiplied by a constant factor of 5 instead of 10.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 5 * np.sqrt(bins) ** (2 * np.arange(len(bins))) * np.log(bins + 3) * ratio_inv\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 3, multiplied by the square root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 7 instead of 5.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 7 * (ratio ** 3) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 3, then multiplied by the cube root of the bin capacity raised to the power of five times the bin index, and finally multiplied by a constant factor of 10 instead of 9.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * (ratio) / (np.log(bins) + 3) * ((bins**(1/3)) ** (5 * np.arange(len(bins))))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin using a modified formula: (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1).\n\nHere's the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 5, multiplied by the square root of the bin capacity raised to the power of 2 times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 5 instead of 10.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 5 * (ratio ** 5) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and three scaling factors, emphasizing bins closer to their maximum capacity, bins with larger capacity, and bins with capacities closer to the item size to promote the assignment of items to bins with maximum rest capacity.\n\nPython implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 4.0\n scaling_factor_2 = 1.5\n scaling_factor_3 = 2.5\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item) * scaling_factor_3 / (item - bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, a scaling factor, and a distance factor, giving higher scores to bins that have less available capacity and are closer to their maximum capacity, thereby promoting the assignment of items to bins with higher rest capacity and closer to their maximum capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 2.0\n distance_factor = 0.5\n scores = np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log(bins+1) + distance_factor * np.log(item+1)) + np.log(bins) / (np.log(item)+1) + scaling_factor * (bins - item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\n1. Initialize three scaling factors: scaling_factor_1, scaling_factor_2, and scaling_factor_3.\n2. Calculate the scores for each bin using the following formula:\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log((bins+1) - item + scaling_factor_1) * (np.log(bins+1) + scaling_factor_2) / np.log(bins+1))) + (scaling_factor_3 / np.log(bins+1))\n3. Return the scores.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 3.0\n scaling_factor_2 = 2.0\n scaling_factor_3 = 1.0\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log((bins+1) - item + scaling_factor_1) * (np.log(bins+1) + scaling_factor_2) / np.log(bins+1))) + (scaling_factor_3 / np.log(bins+1))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 2, then multiplied by the square root of the bin capacity raised to the power of five times the bin index, and finally multiplied by a constant factor of 9 instead of 8.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) / (np.log(bins) + 2) * (np.sqrt(bins) ** (5 * np.arange(len(bins))))\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm: \n\n1. Initialize three scaling factors: scaling_factor_1, scaling_factor_2, and scaling_factor_3.\n2. Create a numpy array 'indices' with values ranging from 0 to len(bins)-1.\n3. Calculate the scores for each bin using the following formula:\n scores = ((np.exp((np.log(bins) / (item - bins)) + np.log(item) * indices) ** (np.log((bins+1) * scaling_factor_1) / scaling_factor_2)) + ((np.log(bins) ** 2) / ((np.log(item) + 1) * scaling_factor_2)) * scaling_factor_3 + (scaling_factor_3 * (bins - item)))\n4. Return the scores.\n\nPython implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 3.0\n scaling_factor_2 = 2.0\n scaling_factor_3 = 1.5\n indices = np.arange(len(bins))\n scores = ((np.exp((np.log(bins) / (item - bins)) + np.log(item) * indices) ** (np.log((bins+1) * scaling_factor_1) / scaling_factor_2)) + ((np.log(bins) ** 2) / ((np.log(item) + 1) * scaling_factor_2)) * scaling_factor_3 + (scaling_factor_3 * (bins - item)))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm will calculate the scores for the bins based on the item size, the rest capacities of the bins, and three scaling factors, emphasizing bins closer to their maximum capacity, bins with larger capacity, and bins with capacities closer to the item size to promote the assignment of items to bins with maximum rest capacity. The algorithm parameters are as follows:\n\n- Scaling factor 1: This factor emphasizes bins closer to their maximum capacity. Increase this factor to give more weight to bins that are closer to their maximum capacity.\n\n- Scaling factor 2: This factor emphasizes bins with larger capacity. Increase this factor to give more weight to bins with larger capacity.\n\n- Scaling factor 3: This factor emphasizes bins with capacities closer to the item size. Increase this factor to give more weight to bins with capacities closer to the item size.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_1 = 5.0\n scaling_factor_2 = 2.0\n scaling_factor_3 = 3.5\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** np.log((bins+1) * scaling_factor_1) + np.log(bins) ** 2 / (np.log(item)+1) * scaling_factor_2 + scaling_factor_2 * (bins - item) * scaling_factor_3 / (item - bins))\n return scores",
"objective": 0.00906,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_Dynamic/Run3/population_generation_9.json
================================================
[
{
"algorithm": "New algorithm: The new algorithm calculates the scores for each bin using a modified formula: ((item ^ (1 / (bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / (np.log(item + 1) + 1).\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item ** (1 / (bins - item))) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / (np.log(item + 1) + 1)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for each bin using a modified formula: ((item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / (np.log(item) + 1).",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((item / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1))) / (np.log(item) + 1)\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 9 instead of 8.\n\nCode: \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 9 * (ratio) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm calculates the score for each bin based on the product of the square root of the bin capacity raised to the power of two times the bin index, the inverse of the difference between the bin capacity and the item size, and the natural logarithm of the bin capacity plus 3, then multiplied by a constant factor of 10 instead of 7.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 10 * np.sqrt(bins) ** (2 * np.arange(len(bins))) * np.log(bins + 3) * ratio_inv\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "Code:\n\n",
"code": "def score(item, bins):\n ratio_inv = 1 / (bins - item)\n scores = 10 * np.sqrt(bins) ** (3 * np.arange(len(bins))) * np.log(bins + 4) * ratio_inv\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "New algorithm description: \nThe new algorithm calculates the score for each bin based on the inverse of the ratio between the bin capacity and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 5 instead of 7.\n\nCode:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio_inv = (bins - item) / bins\n scores = 5 * (1 / ratio_inv) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 4, and then multiplied by a constant factor of 7 instead of 8.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 7 * (ratio) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 4)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the square root of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 10 instead of 9.\n\nCode:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 3, multiplied by the square root of the bin capacity raised to the power of 2 times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 8 instead of 10.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 8 * (ratio ** 3) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Algorithm Description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 3, multiplied by the square root of the bin capacity raised to the power of three times the bin index, divided by the natural logarithm of the bin capacity plus 3, and then multiplied by a constant factor of 6 instead of 5.\n\nCode:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 6 * (ratio ** 3) * (np.sqrt(bins) ** (3 * np.arange(len(bins)))) / (np.log(bins) + 3)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, multiplied by the logarithm of the bin capacity raised to the power of two times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 12 instead of 10.\n\nCode:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 12 * ratio * (np.log(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm first calculates the ratio between the item size and the difference between the capacity and the item size, then computes the scores for each bin as the product of the ratio, a power function of the bin capacity, and a logarithmic function of the bin capacity plus a constant factor of 2, instead of 3 in the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = ratio * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) * (np.log(bins) + 2)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores for the bins based on the item size and the rest capacities of the bins, considering the goal of minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) + np.exp(np.log(item) * np.arange(len(bins))) ** np.log(bins+1) - np.log(bins) / (np.log(item)+1)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 3, then multiplied by the cube root of the bin capacity raised to the power of five times the bin index, and finally multiplied by a constant factor of 10 instead of 9.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 10 * (ratio) / (np.log(bins) + 3) * ((bins**(1/3)) ** (5 * np.arange(len(bins))))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin using a modified formula: (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1).\n\nHere's the implementation of the new algorithm in Python:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item)) * np.exp(np.log(bins) * (np.arange(len(bins)) + 1)) - bins / (np.log(item + 1) + 1)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio between the item size and the difference between the capacity and the item size, divided by the natural logarithm of the bin capacity plus 2, then multiplied by the square root of the bin capacity raised to the power of four times the bin index, and finally multiplied by a constant factor of 11 instead of 10.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = item / (bins - item)\n scores = 11 * (ratio) / (np.log(bins) + 2) * ((bins**(1/2)) ** (4 * np.arange(len(bins))))\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Description of the new algorithm: The new algorithm calculates the score for each bin based on the square root of the ratio between the item size and the difference between the capacity and the item size, raised to the power of a constant factor of 7, multiplied by the square root of the bin capacity raised to the power of 2 times the bin index, divided by the natural logarithm of the bin capacity plus 2, and then multiplied by a constant factor of 15.",
"code": "import numpy as np\n\ndef score(item, bins):\n ratio = np.sqrt(item / (bins - item))\n scores = 15 * (ratio ** 7) * (np.sqrt(bins) ** (2 * np.arange(len(bins)))) / (np.log(bins) + 2)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin using a modified formula: ((np.exp(np.log(bins) * np.arange(len(bins))) - 1) / (bins - item)) * np.exp(np.log(bins) * np.arange(len(bins)))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((np.exp(np.log(bins) * np.arange(len(bins))) - 1) / (bins - item)) * np.exp(np.log(bins) * np.arange(len(bins)))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the scores for the bins based on the item size, the rest capacities of the bins, a scaling factor, and a distance factor, giving higher scores to bins that have less available capacity and are closer to their maximum capacity, thereby promoting the assignment of items to bins with higher rest capacity and closer to their maximum capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = 2.0\n distance_factor = 0.5\n scores = np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log(bins+1) + distance_factor * np.log(item+1)) + np.log(bins) / (np.log(item)+1) + scaling_factor * (bins - item)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm:\n\n1. Initialize three scaling factors: scaling_factor_a, scaling_factor_b, and scaling_factor_c.\n2. Calculate the scores for each bin using the following formula:\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log((bins+1) - item + scaling_factor_a) * (np.log(bins+1) + scaling_factor_b) / np.log(bins+1))) + (scaling_factor_c / np.log(bins+1))\n3. Return the scores.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor_a = 3.5\n scaling_factor_b = 1.5\n scaling_factor_c = 0.5\n scores = (np.exp((np.log(bins) / (item - bins)) + np.log(item) * np.arange(len(bins))) ** (np.log((bins+1) - item + scaling_factor_a) * (np.log(bins+1) + scaling_factor_b) / np.log(bins+1))) + (scaling_factor_c / np.log(bins+1))\n return scores",
"objective": 0.00835,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin, while avoiding using bins with the maximum rest capacity. The goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item)\n\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, calculated by subtracting the item size from the bin capacity, and avoids using bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin based on its current rest capacity and the size of the item, where the score is equal to the absolute value of the difference between the rest capacity and the item size, multiplied by -1 if the bin is empty, to prioritize filling the empty bins first, or multiplied by 1 if the bin is not empty.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(bins - item) * np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))\n return scores",
"objective": 0.13281,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = bins[i] - item\n else:\n scores[i] = -1000\n \n return scores",
"objective": 0.14418,
"other_inf": null
},
{
"algorithm": "The algorithm first calculates the score for each bin by dividing the rest capacity of the bin by the item size, then subtracting 1 if the rest capacity equals the maximum capacity. Next, it sets the score to 0 if the rest capacity is less than the item size. Finally, it returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(bins, item)\n scores[bins == np.max(bins)] -= 1\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, considering the rest capacity of the bin, and returns the scores for all bins after the assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize an array of scores with zeros\n\n # Calculate the score for each bin based on their rest capacity\n scores = np.where(bins == np.max(bins), 0, bins - np.max(bins) + item + 1)\n \n return scores",
"objective": 0.32971,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Calculate the ratio of the capacity remaining in each bin to the size of the current item.\n2. Assign a score of 0 to bins that have the same capacity as their maximum capacity.\n3. Assign a score of 1 to bins whose remaining capacity is 1 larger than the size of the current item.\n4. Assign a score of 2 to bins whose remaining capacity is 2 larger than the size of the current item.\n5. Assign a score of 3 to bins whose remaining capacity is 3 larger than the size of the current item.\n6. Continue this pattern and assign scores in increasing order to bins with increasing available capacity.\n7. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item) # Assign scores based on ratio\n return scores",
"objective": 0.36543,
"other_inf": null
},
{
"algorithm": "The algorithm scores each bin based on a score function that takes into account both the remaining capacity of the bin and the size of the item being assigned. The main steps of the algorithm are: \n1. Initialize an empty Numpy array 'scores' with the same size as 'bins' to store the scores for each bin.\n2. Calculate the score for each bin by dividing the remaining capacity of the bin by the size of the item, and store the result in the corresponding index of 'scores'.\n3. Return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = bins[bins > item] / item\n return scores",
"objective": 0.3763,
"other_inf": null
},
{
"algorithm": "\nThe algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment.\nThe main steps of the algorithm are as follows:\n1. Calculate the available capacities of all bins by subtracting 'item' from 'bins'.\n2. Filter out the bins with available capacity equal to the maximum capacity ('bins_max') using a mask.\n3. Assign a score of 0 to all bins that have 'bins_max' capacity.\n4. For the remaining bins, calculate the score by dividing the available capacity by the difference between 'bins_max' and the available capacity.\n5. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score for each bin is calculated as the difference between the rest capacity and twice the size of the item, with a lower bound of zero, and the final scores are stored in a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - 2 * item, 0)\n return scores",
"objective": 0.86699,
"other_inf": null
},
{
"algorithm": "The novel score function assigns an item to the bin with the maximum score, taking into account the rest capacity of each bin, and aims to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = item - bins[mask]\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "We first calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, and then subtract 1 from the score of the bin with the maximum capacity. Finally, we return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n max_index = np.argmax(bins)\n scores[max_index] -= 1\n return scores",
"objective": 1.51484,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin by dividing the rest capacity of the bin by the size of the item and subtracting it from the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins) / item\n scores = (bins / item) - max_score\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_1.json
================================================
[
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.log(bins[bins != bins.max()]) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the item size and the rest capacity of each bin.\n\nNew algorithm: \"A hybrid approach that combines the strengths of the existing algorithms by weighting the scores based on the distance between the item size and the bin capacity, while also considering the number of bins and the item size.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the weights based on the distance and the number of bins\n weights = np.exp(-distances / (len(bins) + 1))\n \n # Calculate the scores based on the weights and the item size\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * weights[bins != bins.max()]\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / bins[bins != bins.max()])\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of bins to calculate the score for each bin, taking into account the rest capacity of each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(bins)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bin_capacities = np.not_equal(bins, item)\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of bins to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item\n \n # Normalize the bin sizes\n bin_sizes = bins\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n return scores",
"objective": 0.05644,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of bins to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n scores = np.zeros(num_bins)\n\n for i in range(num_bins):\n scores[i] = (item + i) % num_bins\n\n return scores",
"objective": 0.07928,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of bins to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(item)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n return scores",
"objective": 0.09699,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of available bins to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n scores = np.zeros(num_bins)\n scores = (bins - item) / (num_bins - np.arange(num_bins))\n return scores",
"objective": 0.11037,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size using a logarithmic scale\n ratios = np.log(bins.astype(float)) - np.log(item)\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12899,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign items to bins based on a scoring function that maximizes the score of each bin while avoiding using bins with the maximum rest capacity.\n\nNew algorithm: The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin while avoiding using bins with the maximum rest capacity and also considering the distance between the current item size and the bin capacity.\n\nDescription: The new algorithm calculates the distance between the current item size and the bin capacity, and then assigns a score to each bin based on the distance and the remaining capacity. Bins with a smaller distance and more remaining capacity receive higher scores.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n distances = np.abs(bins - item)\n scores = np.zeros_like(bins)\n scores[distances <= 1] = 1\n scores[distances > 1] = np.floor(distances[distances > 1] / item)\n return scores",
"objective": 0.12919,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_10.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin sizes, and the number of used bins to calculate the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores based on the item size, bin sizes, and the number of used bins\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.sum(bins != bins.max()) + 1))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity using a logarithmic scale\n inv_remaining_capacity = 1 / (np.log(bins) - np.log(item))\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n # Add a threshold to the scores to prevent them from becoming too large\n scores = np.minimum(scores, 100)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign items to bins based on the ratio of the item size to the remaining capacity of each bin, with bins with the maximum capacity having a score of zero and bins with smaller capacities having higher scores.\n\nNew algorithm: \"Assign items to bins based on the ratio of the item size to the remaining capacity of each bin, with bins with the maximum capacity having a score of zero and bins with smaller capacities having higher scores, while also considering the number of used bins and the item size.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity\n ratio = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n ratio[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratio with an increasing factor\n scores = ratio * np.arange(1, len(bins)+1)\n \n # Add a term to the scores based on the number of used bins and the item size\n scores += (item / np.sum(bins != bins.max())) * (1 / (np.sum(bins != bins.max()) + 1))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the ratio of the item size to the rest capacity of each bin, where bins with the largest ratios have the highest scores.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratio = item / (bins - item)\n \n # Calculate the scores for each bin based on the ratio\n scores = np.maximum(ratio, 1)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the difference between the item size and the rest capacity of the bin while minimizing the distance between the item size and the rest capacity.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the rest capacity of each bin\n diff = np.abs(bins - item)\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the difference and distance\n scores = diff - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Programming with Restricted Capacity\" (DPCRC)\n\nDescription: DPCRC uses dynamic programming to find the optimal assignment of items to bins, considering the restrictions of bin capacities and the number of used bins. It starts by initializing the scores for each bin as the difference between the item size and the rest capacity of the bin, and then iteratively updates the scores based on the previous scores and the remaining capacities of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dpcrc_score(item, bins):\n # Initialize the scores for each bin\n scores = np.abs(bins - item)\n \n # Iteratively update the scores based on the previous scores and the remaining capacities of the bins\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = max(scores[i], scores[i-1] + item)\n else:\n scores[i] = max(scores[i], scores[i-1] + bins[i])\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Use logarithmic scale for both item size and bin sizes\n item_log = np.log(item)\n bins_log = np.log(bins)\n \n # Calculate the scores using the logarithmic scales\n scores = np.zeros_like(bins)\n scores[bins_log != bins_log.max()] = item_log / (bins_log[bins_log != bins_log.max()] - item_log + 1)\n return scores",
"objective": 0.04075,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_11.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin sizes, and the number of used bins to calculate the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores based on the item size, bin sizes, and the number of used bins\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.sum(bins != bins.max()) + 1))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity using a logarithmic scale\n inv_remaining_capacity = 1 / (np.log(bins) - np.log(item))\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n # Add a threshold to the scores to prevent them from becoming too large\n scores = np.minimum(scores, 100)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the ratio of the item size to the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratio = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n ratio[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratio with an increasing factor\n scores = ratio * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign items to bins based on the ratio of the item size to the remaining capacity of each bin, with bins with the maximum capacity having a score of zero and bins with smaller capacities having higher scores.\n\nNew algorithm: \"Assign items to bins based on the ratio of the item size to the remaining capacity of each bin, with bins with the maximum capacity having a score of zero and bins with smaller capacities having higher scores, while also considering the number of used bins and the item size.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity\n ratio = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n ratio[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratio with an increasing factor\n scores = ratio * np.arange(1, len(bins)+1)\n \n # Add a term to the scores based on the number of used bins and the item size\n scores += (item / np.sum(bins != bins.max())) * (1 / (np.sum(bins != bins.max()) + 1))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the ratio of the item size to the rest capacity of each bin, where bins with the largest ratios have the highest scores.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratio = item / (bins - item)\n \n # Calculate the scores for each bin based on the ratio\n scores = np.maximum(ratio, 1)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the difference between the item size and the rest capacity of the bin while minimizing the distance between the item size and the rest capacity.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the rest capacity of each bin\n diff = np.abs(bins - item)\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the difference and distance\n scores = diff - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Programming with Restricted Capacity\" (DPCRC)\n\nDescription: DPCRC uses dynamic programming to find the optimal assignment of items to bins, considering the restrictions of bin capacities and the number of used bins. It starts by initializing the scores for each bin as the difference between the item size and the rest capacity of the bin, and then iteratively updates the scores based on the previous scores and the remaining capacities of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dpcrc_score(item, bins):\n # Initialize the scores for each bin\n scores = np.abs(bins - item)\n \n # Iteratively update the scores based on the previous scores and the remaining capacities of the bins\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = max(scores[i], scores[i-1] + item)\n else:\n scores[i] = max(scores[i], scores[i-1] + bins[i])\n \n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_12.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin sizes, and the number of used bins to calculate the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores based on the item size, bin sizes, and the number of used bins\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.sum(bins != bins.max()) + 1))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the distance between the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item)\n \n # Calculate the score for each bin based on the item size and the distance\n scores = np.ones_like(bins)\n scores[dist < item] = (item / (dist[dist < item] + 1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the ratio of the item size to the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratio = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n ratio[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratio with an increasing factor\n scores = ratio * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign items to bins based on the ratio of the item size to the remaining capacity of each bin, with bins with the maximum capacity having a score of zero and bins with smaller capacities having higher scores.\n\nNew algorithm: \"Assign items to bins based on the ratio of the item size to the remaining capacity of each bin, with bins with the maximum capacity having a score of zero and bins with smaller capacities having higher scores, while also considering the number of used bins and the item size.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity\n ratio = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n ratio[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratio with an increasing factor\n scores = ratio * np.arange(1, len(bins)+1)\n \n # Add a term to the scores based on the number of used bins and the item size\n scores += (item / np.sum(bins != bins.max())) * (1 / (np.sum(bins != bins.max()) + 1))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the ratio of the item size to the rest capacity of each bin, where bins with the largest ratios have the highest scores.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratio = item / (bins - item)\n \n # Calculate the scores for each bin based on the ratio\n scores = np.maximum(ratio, 1)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Maximize the Sum of the Item Size and the Rest Capacity of the Bin while Minimizing the Distance between the Item Size and the Rest Capacity.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the item size and the rest capacity of each bin\n sum = bins + item\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the sum and distance\n scores = sum - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Programming with Restricted Capacity\" (DPCRC)\n\nDescription: DPCRC uses dynamic programming to find the optimal assignment of items to bins, considering the restrictions of bin capacities and the number of used bins. It starts by initializing the scores for each bin as the difference between the item size and the rest capacity of the bin, and then iteratively updates the scores based on the previous scores and the remaining capacities of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dpcrc_score(item, bins):\n # Initialize the scores for each bin\n scores = np.abs(bins - item)\n \n # Iteratively update the scores based on the previous scores and the remaining capacities of the bins\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = max(scores[i], scores[i-1] + item)\n else:\n scores[i] = max(scores[i], scores[i-1] + bins[i])\n \n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_13.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin sizes, and the number of used bins to calculate the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores based on the item size, bin sizes, and the number of used bins\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.sum(bins != bins.max()) + 1))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the distance between the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item)\n \n # Calculate the score for each bin based on the item size and the distance\n scores = np.ones_like(bins)\n scores[dist < item] = (item / (dist[dist < item] + 1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin based on the item size and rest capacity\n scores = np.log(np.ones_like(bins))\n scores[bins != bins.max()] = np.log((item / (bins[bins != bins.max()] - item + 1)))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the ratio of the item size to the bin capacity\n ratio = item / bins\n \n # Calculate the scores for each bin\n scores = np.clip(ratio, 0, 1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, considering the adaptive threshold of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the adaptive threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the dynamic scores for each bin\n scores = np.zeros_like(bins)\n scores[threshold > 0] = (item / (threshold[threshold > 0] + 1))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\" (MSRC)\n\nDescription: MSRC assigns an item to the bin with the highest maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the maximum value of the item size minus the remaining capacity.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef msrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.maximum(item - rest_capacity, 0)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the ratio of the item size to the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(rest_capacity, 0, 1) * item\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Maximize the Sum of the Item Size and the Rest Capacity of the Bin while Minimizing the Distance between the Item Size and the Rest Capacity.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the item size and the rest capacity of each bin\n sum = bins + item\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the sum and distance\n scores = sum - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Programming with Restricted Capacity\" (DPCRC)\n\nDescription: DPCRC uses dynamic programming to find the optimal assignment of items to bins, considering the restrictions of bin capacities and the number of used bins. It starts by initializing the scores for each bin as the difference between the item size and the rest capacity of the bin, and then iteratively updates the scores based on the previous scores and the remaining capacities of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dpcrc_score(item, bins):\n # Initialize the scores for each bin\n scores = np.abs(bins - item)\n \n # Iteratively update the scores based on the previous scores and the remaining capacities of the bins\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = max(scores[i], scores[i-1] + item)\n else:\n scores[i] = max(scores[i], scores[i-1] + bins[i])\n \n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_14.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Exponential Weighting\" (BINESW)",
"code": "import numpy as np\n\ndef binesw_score(item, bins):\n # Calculate the exponential weighting for each bin\n weights = np.exp(-np.abs(bins - item))\n \n # Calculate the scores for each bin by multiplying the exponential weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the distance between the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item)\n \n # Calculate the score for each bin based on the item size and the distance\n scores = np.ones_like(bins)\n scores[dist < item] = (item / (dist[dist < item] + 1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin based on the item size and rest capacity\n scores = np.log(np.ones_like(bins))\n scores[bins != bins.max()] = np.log((item / (bins[bins != bins.max()] - item + 1)))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the ratio of the item size to the bin capacity\n ratio = item / bins\n \n # Calculate the scores for each bin\n scores = np.clip(ratio, 0, 1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, considering the adaptive threshold of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the adaptive threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the dynamic scores for each bin\n scores = np.zeros_like(bins)\n scores[threshold > 0] = (item / (threshold[threshold > 0] + 1))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\" (MSRC)\n\nDescription: MSRC assigns an item to the bin with the highest maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the maximum value of the item size minus the remaining capacity.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef msrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.maximum(item - rest_capacity, 0)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the ratio of the item size to the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(rest_capacity, 0, 1) * item\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Maximize the Sum of the Item Size and the Rest Capacity of the Bin while Minimizing the Distance between the Item Size and the Rest Capacity.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the item size and the rest capacity of each bin\n sum = bins + item\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the sum and distance\n scores = sum - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Programming with Restricted Capacity\" (DPCRC)\n\nDescription: DPCRC uses dynamic programming to find the optimal assignment of items to bins, considering the restrictions of bin capacities and the number of used bins. It starts by initializing the scores for each bin as the difference between the item size and the rest capacity of the bin, and then iteratively updates the scores based on the previous scores and the remaining capacities of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dpcrc_score(item, bins):\n # Initialize the scores for each bin\n scores = np.abs(bins - item)\n \n # Iteratively update the scores based on the previous scores and the remaining capacities of the bins\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = max(scores[i], scores[i-1] + item)\n else:\n scores[i] = max(scores[i], scores[i-1] + bins[i])\n \n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_15.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Exponential Weighting\" (BINESW)",
"code": "import numpy as np\n\ndef binesw_score(item, bins):\n # Calculate the exponential weighting for each bin\n weights = np.exp(-np.abs(bins - item))\n \n # Calculate the scores for each bin by multiplying the exponential weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the distance between the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item)\n \n # Calculate the score for each bin based on the item size and the distance\n scores = np.ones_like(bins)\n scores[dist < item] = (item / (dist[dist < item] + 1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin based on the item size and rest capacity\n scores = np.log(np.ones_like(bins))\n scores[bins != bins.max()] = np.log((item / (bins[bins != bins.max()] - item + 1)))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the ratio of the item size to the bin capacity\n ratio = item / bins\n \n # Calculate the scores for each bin\n scores = np.clip(ratio, 0, 1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, considering the adaptive threshold of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the adaptive threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the dynamic scores for each bin\n scores = np.zeros_like(bins)\n scores[threshold > 0] = (item / (threshold[threshold > 0] + 1))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\" (MSRC)\n\nDescription: MSRC assigns an item to the bin with the highest maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the maximum value of the item size minus the remaining capacity.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef msrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.maximum(item - rest_capacity, 0)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the ratio of the item size to the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(rest_capacity, 0, 1) * item\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item / np.mean(item)) - np.log((bins - item) / np.mean(bins - item))\n \n # Calculate the scores for each bin by multiplying the normalized logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Logarithmic Weighting\" (BINLW)",
"code": "import numpy as np\n\ndef binlw_score(item, bins):\n # Calculate the logarithmic weighting for each bin\n weights = np.log(bins / item)\n \n # Calculate the scores for each bin by multiplying the logarithmic weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_16.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Exponential Weighting\" (BINESW)",
"code": "import numpy as np\n\ndef binesw_score(item, bins):\n # Calculate the exponential weighting for each bin\n weights = np.exp(-np.abs(bins - item))\n \n # Calculate the scores for each bin by multiplying the exponential weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the distance between the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item)\n \n # Calculate the score for each bin based on the item size and the distance\n scores = np.ones_like(bins)\n scores[dist < item] = (item / (dist[dist < item] + 1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin based on the item size and rest capacity\n scores = np.log(np.ones_like(bins))\n scores[bins != bins.max()] = np.log((item / (bins[bins != bins.max()] - item + 1)))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the ratio of the item size to the bin capacity\n ratio = item / bins\n \n # Calculate the scores for each bin\n scores = np.clip(ratio, 0, 1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, considering the adaptive threshold of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the adaptive threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the dynamic scores for each bin\n scores = np.zeros_like(bins)\n scores[threshold > 0] = (item / (threshold[threshold > 0] + 1))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\" (MSRC)\n\nDescription: MSRC assigns an item to the bin with the highest maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the maximum value of the item size minus the remaining capacity.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef msrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.maximum(item - rest_capacity, 0)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the ratio of the item size to the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(rest_capacity, 0, 1) * item\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item / np.mean(item)) - np.log((bins - item) / np.mean(bins - item))\n \n # Calculate the scores for each bin by multiplying the normalized logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Logarithmic Weighting\" (BINLW)",
"code": "import numpy as np\n\ndef binlw_score(item, bins):\n # Calculate the logarithmic weighting for each bin\n weights = np.log(bins / item)\n \n # Calculate the scores for each bin by multiplying the logarithmic weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_17.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Exponential Weighting\" (BINESW)",
"code": "import numpy as np\n\ndef binesw_score(item, bins):\n # Calculate the exponential weighting for each bin\n weights = np.exp(-np.abs(bins - item))\n \n # Calculate the scores for each bin by multiplying the exponential weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the distance between the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item)\n \n # Calculate the score for each bin based on the item size and the distance\n scores = np.ones_like(bins)\n scores[dist < item] = (item / (dist[dist < item] + 1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin based on the item size and rest capacity\n scores = np.log(np.ones_like(bins))\n scores[bins != bins.max()] = np.log((item / (bins[bins != bins.max()] - item + 1)))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the ratio of the item size to the bin capacity\n ratio = item / bins\n \n # Calculate the scores for each bin\n scores = np.clip(ratio, 0, 1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, considering the adaptive threshold of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the adaptive threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the dynamic scores for each bin\n scores = np.zeros_like(bins)\n scores[threshold > 0] = (item / (threshold[threshold > 0] + 1))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\" (MSRC)\n\nDescription: MSRC assigns an item to the bin with the highest maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the maximum value of the item size minus the remaining capacity.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef msrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.maximum(item - rest_capacity, 0)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the ratio of the item size to the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(rest_capacity, 0, 1) * item\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item / np.mean(item)) - np.log((bins - item) / np.mean(bins - item))\n \n # Calculate the scores for each bin by multiplying the normalized logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Logarithmic Weighting\" (BINLW)",
"code": "import numpy as np\n\ndef binlw_score(item, bins):\n # Calculate the logarithmic weighting for each bin\n weights = np.log(bins / item)\n \n # Calculate the scores for each bin by multiplying the logarithmic weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_18.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Exponential Weighting\" (BINESW)",
"code": "import numpy as np\n\ndef binesw_score(item, bins):\n # Calculate the exponential weighting for each bin\n weights = np.exp(-np.abs(bins - item))\n \n # Calculate the scores for each bin by multiplying the exponential weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, adaptively adjusting the threshold based on the item size and the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the product of the item size and the rest capacity, divided by the sum of the item size and the threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the scores for each bin\n scores = (item * bins) / (threshold + item)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin based on the item size and rest capacity\n scores = np.log(np.ones_like(bins))\n scores[bins != bins.max()] = np.log((item / (bins[bins != bins.max()] - item + 1)))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the ratio of the item size to the bin capacity\n ratio = item / bins\n \n # Calculate the scores for each bin\n scores = np.clip(ratio, 0, 1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, considering the adaptive threshold of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the adaptive threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the dynamic scores for each bin\n scores = np.zeros_like(bins)\n scores[threshold > 0] = (item / (threshold[threshold > 0] + 1))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\" (MSRC)\n\nDescription: MSRC assigns an item to the bin with the highest maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the maximum value of the item size minus the remaining capacity.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef msrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.maximum(item - rest_capacity, 0)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the ratio of the item size to the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(rest_capacity, 0, 1) * item\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item / np.mean(item)) - np.log((bins - item) / np.mean(bins - item))\n \n # Calculate the scores for each bin by multiplying the normalized logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Logarithmic Weighting\" (BINLW)",
"code": "import numpy as np\n\ndef binlw_score(item, bins):\n # Calculate the logarithmic weighting for each bin\n weights = np.log(bins / item)\n \n # Calculate the scores for each bin by multiplying the logarithmic weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_19.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Exponential Weighting\" (BINESW)",
"code": "import numpy as np\n\ndef binesw_score(item, bins):\n # Calculate the exponential weighting for each bin\n weights = np.exp(-np.abs(bins - item))\n \n # Calculate the scores for each bin by multiplying the exponential weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, adaptively adjusting the threshold based on the item size and the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the product of the item size and the rest capacity, divided by the sum of the item size and the threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the scores for each bin\n scores = (item * bins) / (threshold + item)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin based on the item size and rest capacity\n scores = np.log(np.ones_like(bins))\n scores[bins != bins.max()] = np.log((item / (bins[bins != bins.max()] - item + 1)))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the scores for each bin using a linear combination of the item size and the bin capacity\n scores = np.dot(item, bins)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, considering the adaptive threshold of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the adaptive threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the dynamic scores for each bin\n scores = np.zeros_like(bins)\n scores[threshold > 0] = (item / (threshold[threshold > 0] + 1))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\" (MSRC)\n\nDescription: MSRC assigns an item to the bin with the highest maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the maximum value of the item size minus the remaining capacity.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef msrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.maximum(item - rest_capacity, 0)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the ratio of the item size to the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(rest_capacity, 0, 1) * item\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item / np.mean(item)) - np.log((bins - item) / np.mean(bins - item))\n \n # Calculate the scores for each bin by multiplying the normalized logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Logarithmic Weighting\" (BINLW)",
"code": "import numpy as np\n\ndef binlw_score(item, bins):\n # Calculate the logarithmic weighting for each bin\n weights = np.log(bins / item)\n \n # Calculate the scores for each bin by multiplying the logarithmic weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_2.json
================================================
[
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.log(bins[bins != bins.max()]) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n ratios[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratio with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the distance between the item size and the rest capacity to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the rest capacity of each bin\n distances = np.abs(bins - item)\n \n # Calculate the scores based on the distance and the rest capacity\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * np.exp(-distances[bins != bins.max()] / (len(bins) + 1))\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm: \"The algorithm uses a combination of the item size, the number of bins, and the rest capacity of each bin to calculate the scores, with a focus on minimizing the number of used bins and maximizing the use of available space.\"\n\nPython implementation:\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(bins)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n # Add a bonus term for using fewer bins\n scores += np.log(bins.size)\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / bins[bins != bins.max()])\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the distance between the item size and the rest capacity to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 / (bins[bins >= item] - item)\n scores[bins < item] = 1 / (item - bins[bins < item])\n scores *= np.abs(bins - item)\n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of all feasible bins.\n2. For each bin, calculate the difference between its size and the minimum size.\n3. Assign a score to each bin based on the difference, where smaller differences correspond to higher scores.\n4. Return the scores for all bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum size of all feasible bins\n min_size = np.min(bins[bins > item])\n \n # Calculate the difference between each bin size and the minimum size\n diff = bins - min_size\n \n # Assign a score to each bin based on the difference\n scores = 1 / (diff + 1)\n \n return scores",
"objective": 0.04497,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of bins to calculate the score for each bin, taking into account the rest capacity of each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(bins)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Remaining Capacity\" (MRCA)\n\nMain steps:\n\n1. Initialize scores array with zeros.\n2. Exclude bins with exact capacity using `np.where`.\n3. Calculate the scores for each bin based on the remaining capacity using `np.where` and `1/bin_capacities`.\n4. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bin_capacities = np.where(bins != item, bins, 0)\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 / (bins[bins >= item] - item)\n scores[bins < item] = 1 / (item - bins[bins < item])\n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bin_capacities = np.not_equal(bins, item)\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of bins to calculate the score for each bin, taking into account the rest capacity of each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores using the raw sizes\n scores = (item / bins) * (bins / np.max(bins))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n return scores",
"objective": 0.05644,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_20.json
================================================
[
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Adaptive Proportional Score with Restricted Capacity\" (APSRC)\n\nDescription: APSRC assigns an item to the bin with the highest adaptive proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the ratio of the item size to the remaining capacity, adjusted by a factor that decreases as the item size increases.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef apsrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the adaptive factor for each bin\n adaptive_factor = np.exp(-np.sqrt(item))\n \n # Calculate the scores for each bin\n scores = np.clip(rest_capacity, 0, 1) * item * adaptive_factor\n \n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Adaptive Score with Restricted Capacity\" (ASRC)\n\nDescription: ASRC adaptively assigns an item to the bin with the highest score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the maximum value of the item size minus the remaining capacity, multiplied by a factor that decreases as the number of used bins increases.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef asrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.maximum(item - rest_capacity, 0) * (1 - np.log(np.sum(bins > 0)))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Exponential Weighting\" (BINESW)",
"code": "import numpy as np\n\ndef binesw_score(item, bins):\n # Calculate the exponential weighting for each bin\n weights = np.exp(-np.abs(bins - item))\n \n # Calculate the scores for each bin by multiplying the exponential weighting with the item size\n scores = weights * item\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, adaptively adjusting the threshold based on the item size and the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the product of the item size and the rest capacity, divided by the sum of the item size and the threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the scores for each bin\n scores = (item * bins) / (threshold + item)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Item-specific Weights\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the item-specific weights for each bin\n weights = np.ones_like(bins)\n weights[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) ** 2\n \n # Assign an item to the bin with the highest weighted score\n scores = np.zeros_like(bins)\n scores[weights == weights.max()] = 1\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin based on the item size and rest capacity\n scores = np.log(np.ones_like(bins))\n scores[bins != bins.max()] = np.log((item / (bins[bins != bins.max()] - item + 1)))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the scores for each bin using a linear combination of the item size and the bin capacity\n scores = np.dot(item, bins)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Dynamic Score with Adaptive Threshold\" (DSTAT)\n\nDescription: DSTAT assigns an item to the bin with the highest dynamic score, considering the adaptive threshold of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef dstat_score(item, bins):\n # Calculate the adaptive threshold for each bin\n threshold = np.minimum(bins, item)\n \n # Calculate the dynamic scores for each bin\n scores = np.zeros_like(bins)\n scores[threshold > 0] = (item / (threshold[threshold > 0] + 1))\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\" (MSRC)\n\nDescription: MSRC assigns an item to the bin with the highest maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the maximum value of the item size minus the remaining capacity.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef msrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.maximum(item - rest_capacity, 0)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the ratio of the item size to the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(rest_capacity, 0, 1) * item\n \n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_3.json
================================================
[
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.log(bins[bins != bins.max()]) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\" (MSRC)\n\nMain steps: MSRC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef msrc_score(item, bins):\n # Calculate the maximum score for each bin\n max_score = np.max(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, max_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the distance between the item size and the rest capacity to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the rest capacity of each bin\n distances = np.abs(bins - item)\n \n # Calculate the scores based on the distance and the rest capacity\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * np.exp(-distances[bins != bins.max()] / (len(bins) + 1))\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = np.min(bins) - item\n scores = min_bin_size / bins\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm: \"The algorithm uses a combination of the item size, the number of bins, and the rest capacity of each bin to calculate the scores, with a focus on minimizing the number of used bins and maximizing the use of available space.\"\n\nPython implementation:\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(bins)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n # Add a bonus term for using fewer bins\n scores += np.log(bins.size)\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / bins[bins != bins.max()])\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the ratio of the remaining capacity to the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the remaining capacity to the item size\n ratio = (bins - item) / item\n \n # Calculate the scores for each bin using a robust scoring method\n scores = np.abs(np.log(ratio)) + 1\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the distance between the item size and the rest capacity to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 / (bins[bins >= item] - item)\n scores[bins < item] = 1 / (item - bins[bins < item])\n scores *= np.abs(bins - item)\n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of all feasible bins.\n2. For each bin, calculate the difference between its size and the minimum size.\n3. Assign a score to each bin based on the difference, where smaller differences correspond to higher scores.\n4. Return the scores for all bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum size of all feasible bins\n min_size = np.min(bins[bins > item])\n \n # Calculate the difference between each bin size and the minimum size\n diff = bins - min_size\n \n # Assign a score to each bin based on the difference\n scores = 1 / (diff + 1)\n \n return scores",
"objective": 0.04497,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of bins to calculate the score for each bin, taking into account the rest capacity of each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(bins)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Remaining Capacity\" (MRCA)\n\nMain steps:\n\n1. Initialize scores array with zeros.\n2. Exclude bins with exact capacity using `np.where`.\n3. Calculate the scores for each bin based on the remaining capacity using `np.where` and `1/bin_capacities`.\n4. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n bin_capacities = np.where(bins != item, bins, 0)\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the ratio of the item size to the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratio = item / bins\n \n # Set the score for bins with the maximum capacity as 0\n ratio[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratio with an increasing factor\n scores = ratio * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.05121,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_4.json
================================================
[
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.log(bins[bins != bins.max()]) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity using a logarithmic scale\n inv_remaining_capacity = 1 / (np.log(bins) - np.log(item))\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n # Add a threshold to the scores to prevent them from becoming too large\n scores = np.minimum(scores, 100)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = np.min(bins) - item\n scores = min_bin_size / bins\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm: \"The algorithm uses a combination of the item size, the number of bins, and the rest capacity of each bin to calculate the scores, with a focus on minimizing the number of used bins and maximizing the use of available space.\"\n\nPython implementation:\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(bins)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n # Add a bonus term for using fewer bins\n scores += np.log(bins.size)\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on the product of the item size and the rest capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the item size and the rest capacity of each bin\n prod = item * bins\n \n # Set the score for bins with the maximum capacity as 0\n prod[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the product by an increasing factor\n scores = prod / np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / bins[bins != bins.max()])\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the ratio of the remaining capacity to the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the remaining capacity to the item size\n ratio = (bins - item) / item\n \n # Calculate the scores for each bin using a robust scoring method\n scores = np.abs(np.log(ratio)) + 1\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the distance between the item size and the rest capacity to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 / (bins[bins >= item] - item)\n scores[bins < item] = 1 / (item - bins[bins < item])\n scores *= np.abs(bins - item)\n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of all feasible bins.\n2. For each bin, calculate the difference between its size and the minimum size.\n3. Assign a score to each bin based on the difference, where smaller differences correspond to higher scores.\n4. Return the scores for all bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum size of all feasible bins\n min_size = np.min(bins[bins > item])\n \n # Calculate the difference between each bin size and the minimum size\n diff = bins - min_size\n \n # Assign a score to each bin based on the difference\n scores = 1 / (diff + 1)\n \n return scores",
"objective": 0.04497,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of bins to calculate the score for each bin, taking into account the rest capacity of each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(bins)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n return scores",
"objective": 0.04588,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_5.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity using a logarithmic scale\n inv_remaining_capacity = 1 / (np.log(bins) - np.log(item))\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n # Add a threshold to the scores to prevent them from becoming too large\n scores = np.minimum(scores, 100)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the difference between the item size and the rest capacity of the bin while minimizing the distance between the item size and the rest capacity.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the rest capacity of each bin\n diff = np.abs(bins - item)\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the difference and distance\n scores = diff - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = np.min(bins) - item\n scores = min_bin_size / bins\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the remaining capacity of each bin to calculate the score, with a focus on maximizing the number of items that can fit in each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n scores = ratios * (bins - item + 1)\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm: \"The algorithm uses a combination of the item size, the number of bins, and the rest capacity of each bin to calculate the scores, with a focus on minimizing the number of used bins and maximizing the use of available space.\"\n\nPython implementation:\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(bins)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n # Add a bonus term for using fewer bins\n scores += np.log(bins.size)\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on the product of the item size and the rest capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the item size and the rest capacity of each bin\n prod = item * bins\n \n # Set the score for bins with the maximum capacity as 0\n prod[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the product by an increasing factor\n scores = prod / np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / bins[bins != bins.max()])\n return scores",
"objective": 0.04266,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_6.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity using a logarithmic scale\n inv_remaining_capacity = 1 / (np.log(bins) - np.log(item))\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n # Add a threshold to the scores to prevent them from becoming too large\n scores = np.minimum(scores, 100)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the difference between the item size and the rest capacity of the bin while minimizing the distance between the item size and the rest capacity.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the rest capacity of each bin\n diff = np.abs(bins - item)\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the difference and distance\n scores = diff - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Programming with Restricted Capacity\" (DPCRC)\n\nDescription: DPCRC uses dynamic programming to find the optimal assignment of items to bins, considering the restrictions of bin capacities and the number of used bins. It starts by initializing the scores for each bin as the difference between the item size and the rest capacity of the bin, and then iteratively updates the scores based on the previous scores and the remaining capacities of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dpcrc_score(item, bins):\n # Initialize the scores for each bin\n scores = np.abs(bins - item)\n \n # Iteratively update the scores based on the previous scores and the remaining capacities of the bins\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = max(scores[i], scores[i-1] + item)\n else:\n scores[i] = max(scores[i], scores[i-1] + bins[i])\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Use logarithmic scale for both item size and bin sizes\n item_log = np.log(item)\n bins_log = np.log(bins)\n \n # Calculate the scores using the logarithmic scales\n scores = np.zeros_like(bins)\n scores[bins_log != bins_log.max()] = item_log / (bins_log[bins_log != bins_log.max()] - item_log + 1)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = np.min(bins) - item\n scores = min_bin_size / bins\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the remaining capacity of each bin to calculate the score, with a focus on maximizing the number of items that can fit in each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n scores = ratios * (bins - item + 1)\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm: \"The algorithm uses a combination of the item size, the number of bins, and the rest capacity of each bin to calculate the scores, with a focus on minimizing the number of used bins and maximizing the use of available space.\"\n\nPython implementation:\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size\n item_norm = item / np.max(bins)\n \n # Normalize the bin sizes\n bin_sizes = bins / np.max(bins)\n \n # Calculate the scores using the normalized sizes\n scores = (item_norm / bin_sizes) * (bin_sizes / np.max(bin_sizes))\n \n # Consider the rest capacity of each bin\n scores = np.where(bins - item >= 0, scores, 0)\n \n # Add a bonus term for using fewer bins\n scores += np.log(bins.size)\n \n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_7.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity using a logarithmic scale\n inv_remaining_capacity = 1 / (np.log(bins) - np.log(item))\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n # Add a threshold to the scores to prevent them from becoming too large\n scores = np.minimum(scores, 100)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the difference between the item size and the rest capacity of the bin while minimizing the distance between the item size and the rest capacity.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the rest capacity of each bin\n diff = np.abs(bins - item)\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the difference and distance\n scores = diff - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Programming with Restricted Capacity\" (DPCRC)\n\nDescription: DPCRC uses dynamic programming to find the optimal assignment of items to bins, considering the restrictions of bin capacities and the number of used bins. It starts by initializing the scores for each bin as the difference between the item size and the rest capacity of the bin, and then iteratively updates the scores based on the previous scores and the remaining capacities of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dpcrc_score(item, bins):\n # Initialize the scores for each bin\n scores = np.abs(bins - item)\n \n # Iteratively update the scores based on the previous scores and the remaining capacities of the bins\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = max(scores[i], scores[i-1] + item)\n else:\n scores[i] = max(scores[i], scores[i-1] + bins[i])\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Use logarithmic scale for both item size and bin sizes\n item_log = np.log(item)\n bins_log = np.log(bins)\n \n # Calculate the scores using the logarithmic scales\n scores = np.zeros_like(bins)\n scores[bins_log != bins_log.max()] = item_log / (bins_log[bins_log != bins_log.max()] - item_log + 1)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = np.min(bins) - item\n scores = min_bin_size / bins\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the remaining capacity of each bin to calculate the score, with a focus on maximizing the number of items that can fit in each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n scores = ratios * (bins - item + 1)\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Adaptive Score with Restricted Capacity\" (ASRC)\n\nDescription: ASRC adaptively adjusts the score for each bin based on the current item size and the remaining capacity of the bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef asrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin based on the current item size and the remaining capacity\n scores = np.where(rest_capacity > 0, rest_capacity / (item + 1), 0)\n \n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_8.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin sizes, and the number of used bins to calculate the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores based on the item size, bin sizes, and the number of used bins\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.sum(bins != bins.max()) + 1))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity using a logarithmic scale\n inv_remaining_capacity = 1 / (np.log(bins) - np.log(item))\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n # Add a threshold to the scores to prevent them from becoming too large\n scores = np.minimum(scores, 100)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on the ratio of the item size to the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity\n ratio = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n ratio[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratio with an increasing factor\n scores = ratio * np.arange(1, len(bins)+1)\n \n # Add a threshold to the scores to prevent them from becoming too large\n scores = np.minimum(scores, 100)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\"\n\nMain steps: Assign an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a certain threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum score for each bin\n max_score = np.max(bins)\n \n # Calculate the restricted capacity for each bin\n restricted_capacity = np.minimum(bins, max_score)\n \n # Calculate the score for each bin based on the restricted capacity\n scores = np.zeros_like(bins)\n scores[restricted_capacity > 0] = np.log(item / (restricted_capacity[restricted_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the difference between the item size and the rest capacity of the bin while minimizing the distance between the item size and the rest capacity.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the rest capacity of each bin\n diff = np.abs(bins - item)\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the difference and distance\n scores = diff - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Programming with Restricted Capacity\" (DPCRC)\n\nDescription: DPCRC uses dynamic programming to find the optimal assignment of items to bins, considering the restrictions of bin capacities and the number of used bins. It starts by initializing the scores for each bin as the difference between the item size and the rest capacity of the bin, and then iteratively updates the scores based on the previous scores and the remaining capacities of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dpcrc_score(item, bins):\n # Initialize the scores for each bin\n scores = np.abs(bins - item)\n \n # Iteratively update the scores based on the previous scores and the remaining capacities of the bins\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = max(scores[i], scores[i-1] + item)\n else:\n scores[i] = max(scores[i], scores[i-1] + bins[i])\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Use logarithmic scale for both item size and bin sizes\n item_log = np.log(item)\n bins_log = np.log(bins)\n \n # Calculate the scores using the logarithmic scales\n scores = np.zeros_like(bins)\n scores[bins_log != bins_log.max()] = item_log / (bins_log[bins_log != bins_log.max()] - item_log + 1)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = np.min(bins) - item\n scores = min_bin_size / bins\n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run1/population_generation_9.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Proportional Score with Restricted Capacity\" (PSRC)\n\nDescription: PSRC assigns an item to the bin with the highest proportional score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef psrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the proportional scores for each bin\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = (item / (bins[rest_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and rest capacity\n scores = np.ones_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1e-6))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin sizes, and the number of used bins to calculate the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores based on the item size, bin sizes, and the number of used bins\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item / (bins[bins != bins.max()] - item + 1)) * (1 / (np.sum(bins != bins.max()) + 1))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity using a logarithmic scale\n inv_remaining_capacity = 1 / (np.log(bins) - np.log(item))\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n # Add a threshold to the scores to prevent them from becoming too large\n scores = np.minimum(scores, 100)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"The algorithm assigns items to bins based on the inverse of the remaining capacity and the item size, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity and the item size\n inv_remaining_capacity = 1 / (bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n inv_remaining_capacity[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the inverse of the remaining capacity with an increasing factor\n scores = inv_remaining_capacity * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, rest_capacity, 0)\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Minimax Score with Restricted Capacity\" (MMRC)\n\nDescription: MMRC assigns an item to the bin with the minimum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef mmrc_score(item, bins):\n # Calculate the minimum score for each bin\n min_score = np.min(bins)\n \n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.where(rest_capacity > 0, min_score * rest_capacity, 0)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms aim to assign items to bins while minimizing the number of used bins. They use various methods to calculate scores for each bin based on the remaining capacity and the item size.\n\nNew algorithm: \"Maximum-Minimum Score with Restricted Capacity\" (MMSC)\n\nDescription: MMSC assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a predetermined threshold. The score for each bin is calculated as the minimum of the maximum capacity and the item size divided by the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef mmsc_score(item, bins):\n # Calculate the restricted capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin\n scores = np.clip(bins, item, rest_capacity)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign items to bins based on the ratio of the item size to the remaining capacity of each bin, with bins with the maximum capacity having a score of zero and bins with smaller capacities having higher scores.\n\nNew algorithm: \"Assign items to bins based on the ratio of the item size to the remaining capacity of each bin, with bins with the maximum capacity having a score of zero and bins with smaller capacities having higher scores, while also considering the number of used bins and the item size.\"\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity\n ratio = item / (bins - item + 1)\n \n # Set the score for bins with the maximum capacity as 0\n ratio[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratio with an increasing factor\n scores = ratio * np.arange(1, len(bins)+1)\n \n # Add a term to the scores based on the number of used bins and the item size\n scores += (item / np.sum(bins != bins.max())) * (1 / (np.sum(bins != bins.max()) + 1))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum bin size by subtracting the item size from the maximum bin size.\n2. Calculate the scores for each bin by dividing the minimum bin size by the rest capacity of each bin.\n3. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\"\n\nMain steps: Assign an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a certain threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum score for each bin\n max_score = np.max(bins)\n \n # Calculate the restricted capacity for each bin\n restricted_capacity = np.minimum(bins, max_score)\n \n # Calculate the score for each bin based on the restricted capacity\n scores = np.zeros_like(bins)\n scores[restricted_capacity > 0] = np.log(item / (restricted_capacity[restricted_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The algorithm assigns items to bins based on the logarithmic difference between the item size and the remaining capacity of each bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the remaining capacity of each bin\n diff = np.log(item) - np.log(bins - item)\n \n # Set the score for bins with the maximum capacity as 0\n diff[bins == np.max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the logarithmic difference with an increasing factor\n scores = diff * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the difference between the item size and the rest capacity of the bin while minimizing the distance between the item size and the rest capacity.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the rest capacity of each bin\n diff = np.abs(bins - item)\n \n # Calculate the distance between the item size and the rest capacity of each bin\n dist = np.abs(bins - item) ** 2\n \n # Calculate the score for each bin based on the difference and distance\n scores = diff - dist\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the highest scores, considering the restrictions of bin capacities and the number of used bins.\n\nNew algorithm: \"Dynamic Programming with Restricted Capacity\" (DPCRC)\n\nDescription: DPCRC uses dynamic programming to find the optimal assignment of items to bins, considering the restrictions of bin capacities and the number of used bins. It starts by initializing the scores for each bin as the difference between the item size and the rest capacity of the bin, and then iteratively updates the scores based on the previous scores and the remaining capacities of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef dpcrc_score(item, bins):\n # Initialize the scores for each bin\n scores = np.abs(bins - item)\n \n # Iteratively update the scores based on the previous scores and the remaining capacities of the bins\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = max(scores[i], scores[i-1] + item)\n else:\n scores[i] = max(scores[i], scores[i-1] + bins[i])\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Use logarithmic scale for both item size and bin sizes\n item_log = np.log(item)\n bins_log = np.log(bins)\n \n # Calculate the scores using the logarithmic scales\n scores = np.zeros_like(bins)\n scores[bins_log != bins_log.max()] = item_log / (bins_log[bins_log != bins_log.max()] - item_log + 1)\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin, while avoiding using bins with the maximum rest capacity. The goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item)\n\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, calculated by subtracting the item size from the bin capacity, and avoids using bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin based on its current rest capacity and the size of the item, where the score is equal to the absolute value of the difference between the rest capacity and the item size, multiplied by -1 if the bin is empty, to prioritize filling the empty bins first, or multiplied by 1 if the bin is not empty.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(bins - item) * np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))\n return scores",
"objective": 0.13281,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = bins[i] - item\n else:\n scores[i] = -1000\n \n return scores",
"objective": 0.14418,
"other_inf": null
},
{
"algorithm": "The algorithm first calculates the score for each bin by dividing the rest capacity of the bin by the item size, then subtracting 1 if the rest capacity equals the maximum capacity. Next, it sets the score to 0 if the rest capacity is less than the item size. Finally, it returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(bins, item)\n scores[bins == np.max(bins)] -= 1\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, considering the rest capacity of the bin, and returns the scores for all bins after the assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize an array of scores with zeros\n\n # Calculate the score for each bin based on their rest capacity\n scores = np.where(bins == np.max(bins), 0, bins - np.max(bins) + item + 1)\n \n return scores",
"objective": 0.32971,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Calculate the ratio of the capacity remaining in each bin to the size of the current item.\n2. Assign a score of 0 to bins that have the same capacity as their maximum capacity.\n3. Assign a score of 1 to bins whose remaining capacity is 1 larger than the size of the current item.\n4. Assign a score of 2 to bins whose remaining capacity is 2 larger than the size of the current item.\n5. Assign a score of 3 to bins whose remaining capacity is 3 larger than the size of the current item.\n6. Continue this pattern and assign scores in increasing order to bins with increasing available capacity.\n7. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item) # Assign scores based on ratio\n return scores",
"objective": 0.36543,
"other_inf": null
},
{
"algorithm": "The algorithm scores each bin based on a score function that takes into account both the remaining capacity of the bin and the size of the item being assigned. The main steps of the algorithm are: \n1. Initialize an empty Numpy array 'scores' with the same size as 'bins' to store the scores for each bin.\n2. Calculate the score for each bin by dividing the remaining capacity of the bin by the size of the item, and store the result in the corresponding index of 'scores'.\n3. Return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = bins[bins > item] / item\n return scores",
"objective": 0.3763,
"other_inf": null
},
{
"algorithm": "\nThe algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment.\nThe main steps of the algorithm are as follows:\n1. Calculate the available capacities of all bins by subtracting 'item' from 'bins'.\n2. Filter out the bins with available capacity equal to the maximum capacity ('bins_max') using a mask.\n3. Assign a score of 0 to all bins that have 'bins_max' capacity.\n4. For the remaining bins, calculate the score by dividing the available capacity by the difference between 'bins_max' and the available capacity.\n5. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score for each bin is calculated as the difference between the rest capacity and twice the size of the item, with a lower bound of zero, and the final scores are stored in a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - 2 * item, 0)\n return scores",
"objective": 0.86699,
"other_inf": null
},
{
"algorithm": "The novel score function assigns an item to the bin with the maximum score, taking into account the rest capacity of each bin, and aims to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = item - bins[mask]\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "We first calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, and then subtract 1 from the score of the bin with the maximum capacity. Finally, we return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n max_index = np.argmax(bins)\n scores[max_index] -= 1\n return scores",
"objective": 1.51484,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin by dividing the rest capacity of the bin by the size of the item and subtracting it from the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins) / item\n scores = (bins / item) - max_score\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_1.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins / (bins - item))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 / (bins[bins >= item] / item)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the logarithm of the remaining capacity to the item size and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(bins[bins >= item]) / (bins[bins >= item] / item) ** (1/3)\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: \"Assign a score of 1 to bins whose remaining capacity is equal to the item size, and decrease the score by 1 for each unit increase in remaining capacity.\"\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores -= (bins - item) // item\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\"\n\nMain steps: Assign an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a certain threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum score for each bin\n max_score = np.max(bins)\n \n # Calculate the restricted capacity for each bin\n restricted_capacity = np.minimum(bins, max_score)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[restricted_capacity > item] = item / (restricted_capacity[restricted_capacity > item] - item + 1)\n \n return scores",
"objective": 0.04749,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the item size and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (bins[bins >= item] / item) ** (1/3)\n return scores",
"objective": 0.0494,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the item size, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 / (np.log(bins[bins >= item]) - np.log(item))\n return scores",
"objective": 0.05021,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = 1\n scores[bins == np.max(bins)] = 0\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = 1\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of the bins to calculate the scores, with a focus on maximizing the use of smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Calculate the scores for each bin based on the ratio and the inverse of the bin size\n scores = ratios * (1 / bins)\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n scores[bins == max(bins)] = 0\n \n return scores",
"objective": 0.05675,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the item size and the logarithm of the remaining capacity.\n\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 / (bins[bins >= item] / item) + np.log(bins[bins >= item])\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the item size and the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (bins[bins >= item] / item) ** 0.5\n return scores",
"objective": 0.09186,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of items already placed in each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_items = len(bins)\n scores = np.zeros(num_items)\n for i in range(num_items):\n scores[i] = (bins[i] - item) / (num_items - i)\n return scores",
"objective": 0.11037,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_10.json
================================================
[
{
"algorithm": "New algorithm: \"Minimax Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins by assigning items to bins with the highest scores.\n\nNew algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the minimum score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins by assigning items to bins with the highest scores.\n\nNew algorithm: \"Minimax Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to minimize the maximum score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Adjusted Capacity with Item Size, Bin Utilization, and Greedy Approach\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and greedy approach\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n scores[adjusted_capacity == 0] = 0\n \n # Sort the bins by their adjusted capacity in descending order\n sorted_bins = np.argsort(-adjusted_capacity)\n \n # Assign the item to the first bin with the maximum adjusted capacity\n assigned_bin = sorted_bins[0]\n \n # Update the scores for the assigned bin\n scores[assigned_bin] += adjusted_capacity[assigned_bin]\n \n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin capacity, and utilization to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n # Add a penalty term for bins with high utilization\n scores -= np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the maximum capacity among all bins.\n3. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization using the following formula: `score = (item / (adjusted_capacity + 1)) * (1 - max_capacity)`\n4. Return the scores for the bins.\n\nImplementation in Python:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Exponential Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the exponential score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins by assigning items to bins with the highest scores.\n\nNew algorithm: \"Exponential Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the exponential score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Difference Score\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.max(bins[adjusted_capacity > 0]))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins by assigning items to bins with the highest scores.\n\nNew algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to minimize the average score of the selected bins while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0]))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the average score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.max(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Adjusted Capacity with Item Size and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n # Find the maximum adjusted capacity among all bins\n max_adjusted_capacity = np.max(adjusted_capacity)\n \n # Assign the item to the bin with the maximum adjusted capacity\n assigned_bin = np.argmax(adjusted_capacity)\n \n # Update the scores for the assigned bin\n scores[assigned_bin] += max_adjusted_capacity\n \n return scores",
"objective": 0.02817,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Logarithmic Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the logarithmic score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.log(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Item Size, Bin Capacity, and Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n # Add a penalty term for bins with high utilization\n scores -= np.power(np.arange(len(bins)), 2)\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03139,
"other_inf": null
},
{
"algorithm": "The new algorithm is called \"Maximum Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\".",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the minimum score for each bin based on the adjusted capacity, item size, and bin utilization\n min_score = np.minimum(item, adjusted_capacity)\n \n # Calculate the maximum score for each bin based on the adjusted capacity, item size, and bin utilization\n max_score = np.maximum(0, adjusted_capacity - item)\n \n # Calculate the scores for each bin based on the minimum and maximum scores\n scores = np.zeros_like(bins)\n scores[max_score > 0] = min_score[max_score > 0] / max_score[max_score > 0]\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Different Parameter Settings\"\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the minimum score for each bin based on the adjusted capacity, item size, and bin utilization.\n3. Calculate the maximum score for each bin based on the adjusted capacity, item size, and bin utilization.\n4. Calculate the scores for each bin based on the minimum and maximum scores, but with different parameter settings.\n5. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the minimum score for each bin based on the adjusted capacity, item size, and bin utilization\n min_score = np.minimum(item, adjusted_capacity)\n \n # Calculate the maximum score for each bin based on the adjusted capacity, item size, and bin utilization\n max_score = np.maximum(0, adjusted_capacity - item)\n \n # Calculate the scores for each bin based on the minimum and maximum scores, but with different parameter settings\n scores = np.zeros_like(bins)\n scores[max_score > 0] = min_score[max_score > 0] / (max_score[max_score > 0] + 1)\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Minimax Score with Adjusted Capacity, Item Size, and Bin Utilization\". It is similar to the previous algorithm but with a different approach to calculate the scores.\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the minimum capacity among all bins.\n3. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization using the following formula: `score = (item / (adjusted_capacity + 1)) * (1 - min_capacity)`\n4. Return the scores for the bins.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the minimum capacity among all bins\n min_capacity = np.min(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - min_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the remaining capacity of the bins to calculate the scores, with a focus on maximizing the use of smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item)\n \n # Adjust the ratios to favor smaller bins\n adjusted_ratios = np.log(ratios)\n \n # Calculate the scores based on the adjusted ratios\n scores = adjusted_ratios * (1 - (bins / np.max(bins)))\n \n return scores",
"objective": 0.03803,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_11.json
================================================
[
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\"\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(bins[adjusted_capacity > 0])) * np.log(1 + np.abs(adjusted_capacity[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimax Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the maximum minimum score for each bin based on the adjusted capacity, item size, and bin utilization.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\".\n\nThe main steps of this algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the Python implementation of the algorithm:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Adjusted Capacity with Item Size, Bin Utilization, and Greedy Approach\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and greedy approach\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n scores[adjusted_capacity == 0] = 0\n \n # Sort the bins by their adjusted capacity in descending order\n sorted_bins = np.argsort(-adjusted_capacity)\n \n # Assign the item to the first bin with the maximum adjusted capacity\n assigned_bin = sorted_bins[0]\n \n # Update the scores for the assigned bin\n scores[assigned_bin] += adjusted_capacity[assigned_bin]\n \n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin capacity, and utilization to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n # Add a penalty term for bins with high utilization\n scores -= np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"\n\nDescription: This algorithm combines the maximum score and the exponential score to calculate the hybrid score for each bin based on the adjusted capacity, item size, and bin utilization, with an exponential decay to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum score for each bin\n max_score = np.zeros_like(bins)\n max_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n max_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Combine the maximum score and the exponential score to calculate the hybrid score\n scores = max_score + exp_score\n \n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the maximum capacity among all bins.\n3. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization using the following formula: `score = (item / (adjusted_capacity + 1)) * (1 - max_capacity)`\n4. Return the scores for the bins.\n\nImplementation in Python:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Adaptive Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Exponential Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the exponential score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins by assigning items to bins with the highest scores.\n\nNew algorithm: \"Exponential Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the exponential score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Difference Score\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.max(bins[adjusted_capacity > 0]))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins by assigning items to bins with the highest scores.\n\nNew algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to minimize the average score of the selected bins while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0]))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization with logarithmic decay.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization with logarithmic decay\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(np.max(bins[adjusted_capacity > 0])))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the average score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.max(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin capacity, and utilization to calculate the score for each bin, but also takes into account the distance between the item and the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n # Add a penalty term for bins with high utilization\n scores -= np.power(np.arange(len(bins)), 2)\n \n # Calculate the distance between the item and the bin\n distances = np.abs(np.subtract(item, bins))\n \n # Add a bonus term for bins with low distance\n scores += np.power(distances, 2)\n \n return scores",
"objective": 0.01771,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_12.json
================================================
[
{
"algorithm": "New algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Inverse Hyperbolic Sine Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, and bin utilization using the inverse hyperbolic sine function, which is a smooth and continuous version of the logistic function. The inverse hyperbolic sine function maps the range of inputs from -\u221e to \u221e to the range of outputs from -1 to 1, making it suitable for assigning scores to bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.arcsinh(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Average-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimax Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the maximum minimum score for each bin based on the adjusted capacity, item size, and bin utilization.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\".\n\nThe main steps of this algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the Python implementation of the algorithm:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Adjusted Capacity with Item Size, Bin Utilization, and Greedy Approach\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and greedy approach\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n scores[adjusted_capacity == 0] = 0\n \n # Sort the bins by their adjusted capacity in descending order\n sorted_bins = np.argsort(-adjusted_capacity)\n \n # Assign the item to the first bin with the maximum adjusted capacity\n assigned_bin = sorted_bins[0]\n \n # Update the scores for the assigned bin\n scores[assigned_bin] += adjusted_capacity[assigned_bin]\n \n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n \n # Apply linear scaling to the scores to ensure that the minimum score is equal to zero\n min_score = np.min(scores)\n scores -= min_score\n \n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"\n\nDescription: This algorithm combines the maximum score and the exponential score with a linear transformation to favor smaller bins, while also considering the adjusted capacity and bin utilization.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum score for each bin\n max_score = np.zeros_like(bins)\n max_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n max_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Calculate the linear transformed score for each bin\n lin_score = np.zeros_like(bins)\n lin_score[adjusted_capacity > 0] = (item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n lin_score += np.arange(len(bins))\n \n # Combine the maximum score, exponential score, and linear transformed score to calculate the hybrid score\n scores = max_score + exp_score + lin_score\n \n return scores",
"objective": 0.01077,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin capacity, and utilization to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n # Add a penalty term for bins with high utilization\n scores -= np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"\n\nDescription: This algorithm combines the maximum score and the exponential score to calculate the hybrid score for each bin based on the adjusted capacity, item size, and bin utilization, with an exponential decay to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum score for each bin\n max_score = np.zeros_like(bins)\n max_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n max_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Combine the maximum score and the exponential score to calculate the hybrid score\n scores = max_score + exp_score\n \n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Hybrid Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm combines the exponential score and the minimum score to calculate the hybrid score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Calculate the minimum score for each bin\n min_score = np.zeros_like(bins)\n min_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n min_score += np.arange(len(bins))\n \n # Combine the exponential score and the minimum score to calculate the hybrid score\n scores = exp_score + min_score\n \n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Hybrid Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Transformation\"\n\nDescription: This algorithm combines the maximum score, exponential score, and logarithmic score to calculate the hybrid score for each bin based on the adjusted capacity, item size, and bin utilization, with an exponential decay and logarithmic transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum score for each bin\n max_score = np.zeros_like(bins)\n max_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n max_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Calculate the logarithmic score for each bin\n log_score = np.zeros_like(bins)\n log_score[adjusted_capacity > 0] = np.log(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n log_score += np.arange(len(bins))\n \n # Combine the maximum score, exponential score, and logarithmic score to calculate the hybrid score\n scores = max_score + exp_score + log_score\n \n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm combines the maximum score and the exponential score with linear scaling to calculate the hybrid score for each bin based on the adjusted capacity, item size, and bin utilization, with an exponential decay and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum score for each bin\n max_score = np.zeros_like(bins)\n max_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n max_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Combine the maximum score and the exponential score with linear scaling to calculate the hybrid score\n scores = max_score + exp_score + np.linspace(0, 1, len(bins))\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the maximum capacity among all bins.\n3. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization using the following formula: `score = (item / (adjusted_capacity + 1)) * (1 - max_capacity)`\n4. Return the scores for the bins.\n\nImplementation in Python:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Adaptive Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Exponential Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the exponential score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01288,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_13.json
================================================
[
{
"algorithm": "New algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nThe provided algorithms use a combination of the item size, bin capacity, and bin utilization to calculate the score for each bin. They also consider the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nNew algorithm:\n\"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription:\nThis algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Inverse Hyperbolic Sine Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, and bin utilization using the inverse hyperbolic sine function, which is a smooth and continuous version of the logistic function. The inverse hyperbolic sine function maps the range of inputs from -\u221e to \u221e to the range of outputs from -1 to 1, making it suitable for assigning scores to bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.arcsinh(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the maximum capacity of all bins.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Hybrid Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm combines the average score and the exponential score to calculate the hybrid score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average score for each bin\n avg_score = np.zeros_like(bins)\n avg_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0]))\n avg_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Combine the average score and the exponential score to calculate the hybrid score\n scores = avg_score + exp_score\n \n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Average-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of this algorithm are:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(bins[adjusted_capacity > 0])) * np.log(10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum Score with Adjusted Capacity and Bin Utilization\". It is similar to the previous algorithm but with a different approach to calculate the scores.\n\nThe main steps of the algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity and the bin utilization.\n3. Return the scores for the bins.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity and the bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nThe provided algorithms use a combination of the item size, bin capacity, and bin utilization to calculate the score for each bin. They also consider the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nNew algorithm:\n\"Hybrid Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"\n\nDescription:\nThis algorithm combines the average-based score and the maximum-minimum score with an exponential decay factor and a linear transformation to favor smaller bins, while also considering the adjusted capacity and bin utilization.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average score for each bin\n avg_score = np.zeros_like(bins)\n avg_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0]))\n avg_score += np.arange(len(bins))\n \n # Calculate the minimum score for each bin\n min_score = np.zeros_like(bins)\n min_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n min_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Calculate the linear transformed score for each bin\n lin_score = np.zeros_like(bins)\n lin_score[adjusted_capacity > 0] = (item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n lin_score += np.arange(len(bins))\n \n # Combine the average score, minimum score, exponential score, and linear transformed score to calculate the hybrid score\n scores = avg_score + min_score + exp_score + lin_score\n \n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a bin-based decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Adaptive Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores[adjusted_capacity <= 0] = np.exp(-np.abs(adjusted_capacity[adjusted_capacity <= 0])) * (1 - bins[adjusted_capacity <= 0])\n scores += np.arange(len(bins))\n \n # Normalize the scores to ensure that they are comparable across different bins\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Average-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription:\nThis algorithm uses an average-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and averaged item size. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and averaged item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01016,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_14.json
================================================
[
{
"algorithm": "New algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nThe provided algorithms use a combination of the item size, bin capacity, and bin utilization to calculate the score for each bin. They also consider the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nNew algorithm:\n\"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription:\nThis algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nThe provided algorithms use a combination of the item size, bin capacity, and bin utilization to calculate the score for each bin. They also consider the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nNew algorithm:\n\"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription:\nThis algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay\"\n\nDescription:\nThis algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, and an exponential decay factor. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Inverse Hyperbolic Sine Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, and bin utilization using the inverse hyperbolic sine function, which is a smooth and continuous version of the logistic function. The inverse hyperbolic sine function maps the range of inputs from -\u221e to \u221e to the range of outputs from -1 to 1, making it suitable for assigning scores to bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.arcsinh(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the maximum capacity of all bins.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Hybrid Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm combines the average score and the exponential score to calculate the hybrid score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average score for each bin\n avg_score = np.zeros_like(bins)\n avg_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0]))\n avg_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Combine the average score and the exponential score to calculate the hybrid score\n scores = avg_score + exp_score\n \n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Average-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of this algorithm are:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(bins[adjusted_capacity > 0])) * np.log(10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum Score with Adjusted Capacity and Bin Utilization\". It is similar to the previous algorithm but with a different approach to calculate the scores.\n\nThe main steps of the algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity and the bin utilization.\n3. Return the scores for the bins.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity and the bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Nonlinear Scaling\"\n\nDescription:\nThis algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and nonlinearly scaled item size. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and nonlinearly scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10) ** 2\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Adjusted Capacity-Based Score with Item Size and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity of each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a bin-based decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00986,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_15.json
================================================
[
{
"algorithm": "New algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item-based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"\n\nDescription: This algorithm uses an item-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, bin utilization, and an exponential decay factor.\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor.\n3. Return the scores for the bins for assignment.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of item size, bin utilization, and exponential decay factors to calculate the score for each bin.\n\nNew algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a bin-based approach to calculate the score for each bin, where the score is based backbone idea: The provided algorithms use a combination of item size, bin utilization, and exponential decay factors to calculate the score for each bin.\n\nNew algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size. The algorithm also cons uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size.\n3. Return the scores for the bins for assignment.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay\"\n\nDescription:\nThis algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, and an exponential decay factor. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Inverse Hyperbolic Sine Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, and bin utilization using the inverse hyperbolic sine function, which is a smooth and continuous version of the logistic function. The inverse hyperbolic sine function maps the range of inputs from -\u221e to \u221e to the range of outputs from -1 to 1, making it suitable for assigning scores to bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.arcsinh(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the maximum capacity of all bins.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Hybrid Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm combines the average score and the exponential score to calculate the hybrid score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average score for each bin\n avg_score = np.zeros_like(bins)\n avg_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0]))\n avg_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Combine the average score and the exponential score to calculate the hybrid score\n scores = avg_score + exp_score\n \n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Average-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of this algorithm are:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(bins[adjusted_capacity > 0])) * np.log(10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item-Size-Based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin based on the item size.\n2. Calculate the bin utilization based on the sum of the items in each bin.\n3. Calculate the exponential decay factor based on the bin utilization.\n4. Calculate the scores for each bin based on the adjusted capacity, bin utilization, and exponential decay factor.\n\nImplementation in Python:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin based on the item size\n adjusted_capacity = bins - item\n \n # Calculate the bin utilization based on the sum of the items in each bin\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the exponential decay factor based on the bin utilization\n decay_factor = np.exp(-bin_utilization)\n \n # Calculate the scores for each bin based on the adjusted capacity, bin utilization, and exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins)) * decay_factor\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum Score with Adjusted Capacity and Bin Utilization\". It is similar to the previous algorithm but with a different approach to calculate the scores.\n\nThe main steps of the algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity and the bin utilization.\n3. Return the scores for the bins.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity and the bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, and an exponential decay factor.\n\nNew algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay with Nonlinear Scaling\"\n\nDescription: This algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, and an exponential decay factor, and nonlinearly scaled item size.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor, and nonlinearly scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10) ** 2\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Adjusted Capacity-Based Score with Item Size and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity of each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00976,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_16.json
================================================
[
{
"algorithm": "New algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Item Size, Rest Capacity, and Exponential Decay\".\n\nThe main steps of this algorithm are as follows:\n\n1. Calculate the scores for each bin based on the item size, rest capacity, and an exponential decay factor.\n2. Return the scores for the bins for assignment.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size, rest capacity, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item-based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"\n\nDescription: This algorithm uses an item-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, bin utilization, and an exponential decay factor.\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor.\n3. Return the scores for the bins for assignment.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nThe provided algorithms use a combination of item size, bin capacity, and bin utilization to calculate the score for each bin. They also use an exponential decay factor to penalize bins with high utilization.\n\nNew algorithm:\n\"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription:\nThis algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, bin utilization, and an exponential decay factor. The score is calculated using a linear scaling factor to penalize bins with high utilization.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "A novel algorithm that combines the item size, bin capacity, and bin utilization to calculate the score for each bin while considering the exponential decay factor and the logarithmic scaling factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay\"\n\nDescription:\nThis algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, and an exponential decay factor. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Inverse Hyperbolic Sine Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, and bin utilization using the inverse hyperbolic sine function, which is a smooth and continuous version of the logistic function. The inverse hyperbolic sine function maps the range of inputs from -\u221e to \u221e to the range of outputs from -1 to 1, making it suitable for assigning scores to bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.arcsinh(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the maximum capacity of all bins.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Hybrid Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm combines the average score and the exponential score to calculate the hybrid score for each bin based on the adjusted capacity, item size, and bin utilization, with a non-linear transformation to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average score for each bin\n avg_score = np.zeros_like(bins)\n avg_score[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0]))\n avg_score += np.arange(len(bins))\n \n # Calculate the exponential score for each bin\n exp_score = np.zeros_like(bins)\n exp_score[adjusted_capacity > 0] = np.exp(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n exp_score += np.arange(len(bins))\n \n # Combine the average score and the exponential score to calculate the hybrid score\n scores = avg_score + exp_score\n \n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the item size and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of this algorithm are:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(bins[adjusted_capacity > 0])) * np.log(10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay with Logarithmic Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and linearly scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum Score with Adjusted Capacity and Bin Utilization\". It is similar to the previous algorithm but with a different approach to calculate the scores.\n\nThe main steps of the algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity and the bin utilization.\n3. Return the scores for the bins.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity and the bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0]))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Exponential Score with Adjusted Capacity, Item Size, and Bin Utilization with Nonlinear Scaling\"\n\nDescription: This algorithm uses an exponential function to calculate the score for each bin based on the adjusted capacity, item size, and bin utilization, with a nonlinear scaling factor to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10) ** 2\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Adjusted Capacity-Based Score with Item Size and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity of each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00966,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_17.json
================================================
[
{
"algorithm": "New algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and logarithmic scaling to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nAll the provided algorithms aim to assign items to bins based on the item size and the remaining capacity of the bins. They use different methods to calculate the scores for each bin, such as exponential decay, logarithmic scaling, and bin utilization.\n\nMy new algorithm:\n\"Bin-based Score with Item Size, Rest Capacity, and Bin Utilization with Exponential Decay\"\n\nDescription:\nThis algorithm calculates the scores for each bin based on the item size, rest capacity, and bin utilization, using an exponential decay factor to penalize bins with low remaining capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size, rest capacity, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item-based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"\n\nDescription: This algorithm uses an item-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, bin utilization, and an exponential decay factor.\n\nMain steps:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor.\n3. Return the scores for the bins for assignment.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the adjusted capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "A novel algorithm that combines the item size, bin capacity, and bin utilization to calculate the score for each bin while considering the exponential decay factor and linear scaling factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size, bin capacity, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Average-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity among all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay\"\n\nDescription:\nThis algorithm uses a bin-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, item size, and an exponential decay factor. The algorithm also considers the adjusted capacity and exponential decay factors to penalize bins that are close to their capacity limits.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Inverse Hyperbolic Sine Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, and bin utilization using the inverse hyperbolic sine function, which is a smooth and continuous version of the logistic function. The inverse hyperbolic sine function maps the range of inputs from -\u221e to \u221e to the range of outputs from -1 to 1, making it suitable for assigning scores to bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.arcsinh(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the maximum capacity of all bins.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the item size and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of this algorithm are:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(bins[adjusted_capacity > 0])) * np.log(10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay with Logarithmic Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization with exponential decay\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity) * np.exp(-np.abs(bins[bins > item] - item) / (bins[bins > item] + 1))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum Score with Adjusted Capacity and Bin Utilization\". It is similar to the previous algorithm but with a different approach to calculate the scores.\n\nThe main steps of the algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity and the bin utilization.\n3. Return the scores for the bins.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity and the bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item-based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay with Logarithmic Scaling\"\n\nDescription:\nThis algorithm uses an item-based approach to calculate the score for each bin, where the score is based on the adjusted capacity, bin utilization, and an exponential decay factor. The score is calculated using a logarithmic scaling factor to penalize bins with high utilization.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.log(item) / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00936,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_18.json
================================================
[
{
"algorithm": "New algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and logarithmic scaling to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item-Based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"\n\nMain steps:\n\n1. Calculate the item-based score for each bin based on the adjusted capacity, bin utilization, and exponential decay.\n2. Return the scores for the bins for assignment.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the item-based score for each bin\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / (bins[bins > item] + 1))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nAll the provided algorithms aim to assign items to bins based on the item size and the remaining capacity of the bins. They use different methods to calculate the scores for each bin, such as exponential decay, logarithmic scaling, and bin utilization.\n\nMy new algorithm:\n\"Bin-based Score with Item Size, Rest Capacity, and Bin Utilization with Exponential Decay\"\n\nDescription:\nThis algorithm calculates the scores for each bin based on the item size, rest capacity, and bin utilization, using an exponential decay factor to penalize bins with low remaining capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size, rest capacity, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Item Size, Rest Capacity, and Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each item based on the item size, rest capacity, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = item / (rest_capacity[rest_capacity > 0] + 1) * (1 - np.mean(bins[rest_capacity > 0])) * np.exp(-np.abs(rest_capacity[rest_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the adjusted capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "A novel algorithm that combines the item size, bin capacity, and bin utilization to calculate the score for each bin while considering the exponential decay factor and linear scaling factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size, bin capacity, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Dynamic-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Dynamic Scaling\"\n\nDescription: This algorithm uses a combination of the dynamic capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and dynamic scaling to adaptively favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the dynamic capacity of each bin\n dynamic_capacity = np.sum(bins) / len(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - dynamic_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item-based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Inverse Hyperbolic Sine Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, and bin utilization using the inverse hyperbolic sine function, which is a smooth and continuous version of the logistic function. The inverse hyperbolic sine function maps the range of inputs from -\u221e to \u221e to the range of outputs from -1 to 1, making it suitable for assigning scores to bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.arcsinh(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the maximum capacity of all bins.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the item size and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of this algorithm are:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(bins[adjusted_capacity > 0])) * np.log(10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the minimum capacity of all bins.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization with logarithmic decay.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization with logarithmic decay\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity) * np.log(bins[bins > item] + 1)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay with Logarithmic Scaling\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n \n # For each bin, update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin Score with Linear Decay\". It calculates the scores for each bin based on the linear decay of the distance between the item size and the bin capacity.\n\nHere is the implementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the linear decay of the distance between the item size and the bin capacity\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity) * (1 - np.abs(bins[bins > item] - item) / (bins[bins > item] + 1))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00906,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_19.json
================================================
[
{
"algorithm": "New algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and logarithmic scaling to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item-Based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"\n\nMain steps:\n\n1. Calculate the item-based score for each bin based on the adjusted capacity, bin utilization, and exponential decay.\n2. Return the scores for the bins for assignment.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the item-based score for each bin\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / (bins[bins > item] + 1))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nAll the provided algorithms aim to assign items to bins based on the item size and the remaining capacity of the bins. They use different methods to calculate the scores for each bin, such as exponential decay, logarithmic scaling, and bin utilization.\n\nMy new algorithm:\n\"Bin-based Score with Item Size, Rest Capacity, and Bin Utilization with Exponential Decay\"\n\nDescription:\nThis algorithm calculates the scores for each bin based on the item size, rest capacity, and bin utilization, using an exponential decay factor to penalize bins with low remaining capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size, rest capacity, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Item Size, Rest Capacity, and Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each item based on the item size, rest capacity, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = item / (rest_capacity[rest_capacity > 0] + 1) * (1 - np.mean(bins[rest_capacity > 0])) * np.exp(-np.abs(rest_capacity[rest_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the adjusted capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "A novel algorithm that combines the item size, bin capacity, and bin utilization to calculate the score for each bin while considering the exponential decay factor and linear scaling factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size, bin capacity, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Average-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the average capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item-based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Inverse Hyperbolic Sine Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, and bin utilization using the inverse hyperbolic sine function, which is a smooth and continuous version of the logistic function. The inverse hyperbolic sine function maps the range of inputs from -\u221e to \u221e to the range of outputs from -1 to 1, making it suitable for assigning scores to bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.arcsinh(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the item size and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of this algorithm are:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(bins[adjusted_capacity > 0])) * np.log(10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the minimum capacity of all bins.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization with logarithmic decay.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization with logarithmic decay\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity) * np.log(bins[bins > item] + 1)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay with Logarithmic Scaling\". It is similar to the original algorithm but with different parameter settings.\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor.\n3. Update the scores by adding the calculated scores to the previous scores.\n4. Return the updated scores.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n \n # Update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin Score with Linear Decay\". It calculates the scores for each bin based on the linear decay of the distance between the item size and the bin capacity.\n\nHere is the implementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the linear decay of the distance between the item size and the bin capacity\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity) * (1 - np.abs(bins[bins > item] - item) / (bins[bins > item] + 1))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00906,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_2.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the item size and the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / bins[bins >= item]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the logarithm of the remaining capacity to the item size and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(bins[bins >= item]) / (bins[bins >= item] / item) ** (1/3)\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: \"Assign a score of 1 to bins whose remaining capacity is equal to the item size, and decrease the score by 1 for each unit increase in remaining capacity.\"\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores -= (bins - item) // item\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to maximize the score of the selected bin while considering the available capacity of each bin.\n\nNew algorithm: \"Maximum Score with Adjusted Capacity and Item Size\"\n\nIn this algorithm, we first adjust the capacity of each bin based on the item size and the remaining capacity after placing the current item in the bin. Then, we calculate the scores for each bin based on the adjusted capacity, the item size, and the number of times the bin has been used.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.04628,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a sinusoidal adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.sin(np.pi * (bins[bins >= item] - item) / item)\n return scores",
"objective": 0.04729,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the logarithm of the item size to the remaining capacity after placing the current item in the bin, multiplied by the square root of the remaining capacity, raised to the power of the logarithm of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(item / (bins[bins >= item] - item)) ** np.log(item) * np.sqrt(bins[bins >= item])\n return scores",
"objective": 0.04749,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to maximize the score of the selected bin while considering the available capacity of each bin.\n\nNew algorithm: \"Maximum Score with Adjusted Capacity and Item Size\"\n\nIn this algorithm, we first adjust the capacity of each bin based on the item size and the remaining capacity after placing the current item in the bin. Then, we calculate the scores for each bin based on the adjusted capacity, the item size, and the number of times the bin has been used.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 + np.log(item / (bins[adjusted_capacity > 0] - item)))\n \n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, multiplied by the inverse of the square root of the remaining capacity.\n\nDescription: The new algorithm calculates the score for each bin as the product of the ratio of the item size to the remaining capacity after placing the current item in the bin, and the inverse of the square root of the remaining capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins[bins >= item] - item)) / np.sqrt(bins[bins >= item])\n return scores",
"objective": 0.04809,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, multiplied by the inverse of the logarithm of the remaining capacity.\n\nDescription: The new algorithm calculates the score for each bin as the product of the ratio of the item size to the remaining capacity after placing the current item in the bin, and the inverse of the logarithm of the remaining capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins[bins >= item] - item)) / np.log(bins[bins >= item])\n return scores",
"objective": 0.04829,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a square root adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.sqrt(item / (bins[bins >= item] - item))\n return scores",
"objective": 0.0493,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the item size and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (bins[bins >= item] / item) ** (1/3)\n return scores",
"objective": 0.0494,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the ratio of the remaining capacity to the item size or the inverse of the bin size.\n\nNew algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(item / (bins[bins >= item] - item))\n return scores",
"objective": 0.0495,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the square root of the ratio of the item size to the remaining capacity after placing the current item in the bin, multiplied by the logarithm of the remaining capacity.\n\nDescription: The new algorithm calculates the score for each bin as the product of the square root of the ratio of the item size to the remaining capacity after placing the current item in the bin, and the logarithm of the remaining capacity.\n\nImplementation:\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.sqrt((item / (bins[bins >= item] - item))) * np.log(bins[bins >= item])\n return scores",
"objective": 0.0497,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item)\n return scores",
"objective": 0.0498,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the remaining capacity to the item size, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 / (np.log(bins[bins >= item]) - np.log(item))\n return scores",
"objective": 0.05021,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the logarithm of the item size to the remaining capacity after placing the current item in the bin, multiplied by the square root of the remaining capacity.\n\nDescription: The new algorithm calculates the score for each bin as the product of the logarithm of the item size to the remaining capacity after placing the current item in the bin, and the square root of the remaining capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(item / (bins[bins >= item] - item)) * np.sqrt(bins[bins >= item])\n return scores",
"objective": 0.05031,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_20.json
================================================
[
{
"algorithm": "New algorithm: \"Average Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Transformation\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the average capacity among all bins\n avg_capacity = np.mean(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - avg_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the maximum capacity among all bins\n max_capacity = np.max(adjusted_capacity)\n \n # Calculate the bin utilization\n bin_utilization = np.sum(bins) / np.sum(adjusted_capacity)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - max_capacity) * np.exp(-bin_utilization)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and logarithmic scaling to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item-Based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"\n\nMain steps:\n\n1. Calculate the item-based score for each bin based on the adjusted capacity, bin utilization, and exponential decay.\n2. Return the scores for the bins for assignment.\n\nImplementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the item-based score for each bin\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / (bins[bins > item] + 1))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nAll the provided algorithms aim to assign items to bins based on the item size and the remaining capacity of the bins. They use different methods to calculate the scores for each bin, such as exponential decay, logarithmic scaling, and bin utilization.\n\nMy new algorithm:\n\"Bin-based Score with Item Size, Rest Capacity, and Bin Utilization with Exponential Decay\"\n\nDescription:\nThis algorithm calculates the scores for each bin based on the item size, rest capacity, and bin utilization, using an exponential decay factor to penalize bins with low remaining capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size, rest capacity, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Score with Item Size, Rest Capacity, and Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacity = bins - item\n \n # Calculate the scores for each bin based on the rest capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[rest_capacity > 0] = item / (rest_capacity[rest_capacity > 0] + 1) * (1 - np.mean(bins[rest_capacity > 0])) * np.exp(-np.abs(rest_capacity[rest_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the adjusted capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "A novel algorithm that combines the item size, bin capacity, and bin utilization to calculate the score for each bin while considering the exponential decay factor and linear scaling factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size, bin capacity, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) * (1 - np.mean(bins[bins > item])) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Average-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the average capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item-based Score with Adjusted Capacity, Bin Utilization, and Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, bin utilization, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Inverse Hyperbolic Sine Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, and bin utilization using the inverse hyperbolic sine function, which is a smooth and continuous version of the logistic function. The inverse hyperbolic sine function maps the range of inputs from -\u221e to \u221e to the range of outputs from -1 to 1, making it suitable for assigning scores to bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = np.arcsinh(item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, bin capacity, and an exponential decay factor to calculate the score for each bin.\n\nNew algorithm: \"Maximum-Based Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Linear Scaling\"\n\nDescription: This algorithm uses a combination of the maximum capacity, item size, and bin utilization to calculate the score for each bin, with an exponential decay factor and linear scaling to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of all bins\n max_capacity = np.max(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - max_capacity) * np.exp(-np.abs(bins[bins > item] - item) / 10) * (item / 10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average capacity of all bins\n avg_capacity = np.mean(bins)\n \n # Calculate the scores for each bin based on the item size and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - avg_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of this algorithm are:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of the algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and a logarithmic decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.log(bins[adjusted_capacity > 0])) * np.log(10)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization with Exponential Decay and Logarithmic Scaling\"\n\nDescription: This algorithm calculates the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, bin utilization, and an exponential decay factor, and logarithmically scaled item size\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.min(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Adjusted Capacity, Item Size, and Bin Utilization with Logarithmic Decay\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the minimum capacity of all bins.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization with logarithmic decay.\n3. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization with logarithmic decay\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity) * np.log(bins[bins > item] + 1)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Score with Adjusted Capacity, Item Size, and Exponential Decay with Logarithmic Scaling\". It is similar to the original algorithm but with different parameter settings.\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the adjusted capacity for each bin by subtracting the item size from the bin capacity.\n2. Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor.\n3. Update the scores by adding the calculated scores to the previous scores.\n4. Return the updated scores.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and an exponential decay factor\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (1 - np.mean(bins[adjusted_capacity > 0])) * np.exp(-np.abs(adjusted_capacity[adjusted_capacity > 0]) / 10) * np.log(item)\n \n # Update the scores by adding the calculated scores to the previous scores\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum-Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin Score with Linear Decay\". It calculates the scores for each bin based on the linear decay of the distance between the item size and the bin capacity.\n\nHere is the implementation in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum capacity of all bins\n min_capacity = np.min(bins)\n \n # Calculate the scores for each bin based on the linear decay of the distance between the item size and the bin capacity\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] + 1) * (1 - min_capacity) * (1 - np.abs(bins[bins > item] - item) / (bins[bins > item] + 1))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00906,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_3.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(item / (bins[bins >= item] - item))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of each bin by subtracting the current item size from the bin capacity.\n2. Assign a score to each bin based on the ratio of the item size to the minimum bin size.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > 0] = item / bins[bins > 0]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(np.log(item / (bins[bins >= item] - item)), 0, 1)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size.\n\nNew algorithm: The new algorithm assigns scores to bins based on the product of the remaining capacity and the inverse of the item size, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(bins[bins >= item] * (1 / item))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the logarithm of the remaining capacity to the item size and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(bins[bins >= item]) / (bins[bins >= item] / item) ** (1/3)\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: \"Assign a score of 1 to bins whose remaining capacity is equal to the item size, and decrease the score by 1 for each unit increase in remaining capacity.\"\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores -= (bins - item) // item\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(item / (bins[bins >= item] - item), 0, 1)\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nDescription: Assign scores to bins based on the ratio of the item size to the minimum capacity of the bin, with a logarithmic adjustment to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = bins.min()\n scores = np.zeros_like(bins)\n scores[bins >= min_bin_size] = np.log(item / (min_bin_size + bins[bins >= min_bin_size]))\n return scores",
"objective": 0.04347,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores[bins > item] = np.log(item / (bins[bins > item] - item))\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to maximize the score of the selected bin while considering the available capacity of each bin.\n\nNew algorithm: \"Maximum Score with Adjusted Capacity and Item Size\"\n\nIn this algorithm, we first adjust the capacity of each bin based on the item size and the remaining capacity after placing the current item in the bin. Then, we calculate the scores for each bin based on the adjusted capacity, the item size, and the number of times the bin has been used.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.04628,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a linear adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item)\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of each bin by subtracting the current item size from the bin capacity.\n2. Assign a score to each bin based on the ratio of the item size to the minimum bin size.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = bins - item\n scores = np.zeros_like(bins)\n scores[min_bin_size > 0] = item / min_bin_size[min_bin_size > 0]\n return scores",
"objective": 0.04719,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a sinusoidal adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.sin(np.pi * (bins[bins >= item] - item) / item)\n return scores",
"objective": 0.04729,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the logarithm of the item size to the remaining capacity after placing the current item in the bin, multiplied by the square root of the remaining capacity, raised to the power of the logarithm of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(item / (bins[bins >= item] - item)) ** np.log(item) * np.sqrt(bins[bins >= item])\n return scores",
"objective": 0.04749,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to maximize the score of the selected bin while considering the available capacity of each bin.\n\nNew algorithm: \"Maximum Score with Adjusted Capacity and Item Size\"\n\nIn this algorithm, we first adjust the capacity of each bin based on the item size and the remaining capacity after placing the current item in the bin. Then, we calculate the scores for each bin based on the adjusted capacity, the item size, and the number of times the bin has been used.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = (item / (adjusted_capacity[adjusted_capacity > 0] + 1)) * (1 + np.log(item / (bins[adjusted_capacity > 0] - item)))\n \n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, multiplied by the inverse of the square root of the remaining capacity.\n\nDescription: The new algorithm calculates the score for each bin as the product of the ratio of the item size to the remaining capacity after placing the current item in the bin, and the inverse of the square root of the remaining capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins[bins >= item] - item)) / np.sqrt(bins[bins >= item])\n return scores",
"objective": 0.04809,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_4.json
================================================
[
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(item / (bins[bins >= item] - item))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of each bin by subtracting the current item size from the bin capacity.\n2. Assign a score to each bin based on the ratio of the item size to the minimum bin size.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > 0] = item / bins[bins > 0]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(np.log(item / (bins[bins >= item] - item)), 0, 1)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size.\n\nNew algorithm: The new algorithm assigns scores to bins based on the product of the remaining capacity and the inverse of the item size, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(bins[bins >= item] * (1 / item))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the logarithm of the remaining capacity to the item size and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(bins[bins >= item]) / (bins[bins >= item] / item) ** (1/3)\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: \"Assign a score of 1 to bins whose remaining capacity is equal to the item size, and decrease the score by 1 for each unit increase in remaining capacity.\"\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores -= (bins - item) // item\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(item / (bins[bins >= item] - item), 0, 1)\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nDescription: Assign scores to bins based on the ratio of the item size to the minimum capacity of the bin, with a logarithmic adjustment to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = bins.min()\n scores = np.zeros_like(bins)\n scores[bins >= min_bin_size] = np.log(item / (min_bin_size + bins[bins >= min_bin_size]))\n return scores",
"objective": 0.04347,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores[bins > item] = np.log(item / (bins[bins > item] - item))\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size by dividing it by the maximum capacity of all bins\n norm_item = item / max(bins)\n \n # Calculate the scores for each bin based on its capacity and the normalized item size\n scores = np.zeros_like(bins)\n scores[bins > norm_item] = np.log(norm_item / (bins[bins > norm_item] - norm_item))\n \n return scores",
"objective": 0.04427,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to maximize the score of the selected bin while considering the available capacity of each bin.\n\nNew algorithm: \"Maximum Score with Adjusted Capacity and Item Size\"\n\nIn this algorithm, we first adjust the capacity of each bin based on the item size and the remaining capacity after placing the current item in the bin. Then, we calculate the scores for each bin based on the adjusted capacity, the item size, and the number of times the bin has been used.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.04628,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = np.log(item / (bins[bins > item] - item))\n return scores",
"objective": 0.04658,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a linear adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item)\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of each bin by subtracting the current item size from the bin capacity.\n2. Assign a score to each bin based on the ratio of the item size to the minimum bin size.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = bins - item\n scores = np.zeros_like(bins)\n scores[min_bin_size > 0] = item / min_bin_size[min_bin_size > 0]\n return scores",
"objective": 0.04719,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a sinusoidal adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.sin(np.pi * (bins[bins >= item] - item) / item)\n return scores",
"objective": 0.04729,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_5.json
================================================
[
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(item / (bins[bins >= item] - item))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a sinusoidal adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on a linear function of the remaining capacity and item size\n scores = np.maximum(0, 1 - (bins - item) / item)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of each bin by subtracting the current item size from the bin capacity.\n2. Assign a score to each bin based on the ratio of the item size to the minimum bin size.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > 0] = item / bins[bins > 0]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(np.log(item / (bins[bins >= item] - item)), 0, 1)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size.\n\nNew algorithm: The new algorithm assigns scores to bins based on the product of the remaining capacity and the inverse of the item size, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(bins[bins >= item] * (1 / item))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the logarithm of the remaining capacity to the item size and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(bins[bins >= item]) / (bins[bins >= item] / item) ** (1/3)\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: \"Assign a score of 1 to bins whose remaining capacity is equal to the item size, and decrease the score by 1 for each unit increase in remaining capacity.\"\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores -= (bins - item) // item\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(item / (bins[bins >= item] - item), 0, 1)\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nDescription: Assign scores to bins based on the ratio of the item size to the minimum capacity of the bin, with a logarithmic adjustment to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = bins.min()\n scores = np.zeros_like(bins)\n scores[bins >= min_bin_size] = np.log(item / (min_bin_size + bins[bins >= min_bin_size]))\n return scores",
"objective": 0.04347,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores[bins > item] = np.log(item / (bins[bins > item] - item))\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size by dividing it by the maximum capacity of all bins\n norm_item = item / max(bins)\n \n # Calculate the scores for each bin based on its capacity and the normalized item size\n scores = np.zeros_like(bins)\n scores[bins > norm_item] = np.log(norm_item / (bins[bins > norm_item] - norm_item))\n \n return scores",
"objective": 0.04427,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to maximize the score of the selected bin while considering the available capacity of each bin.\n\nNew algorithm: \"Maximum Score with Adjusted Capacity and Item Size\"\n\nIn this algorithm, we first adjust the capacity of each bin based on the item size and the remaining capacity after placing the current item in the bin. Then, we calculate the scores for each bin based on the adjusted capacity, the item size, and the number of times the bin has been used.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1)\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.04628,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = np.log(item / (bins[bins > item] - item))\n return scores",
"objective": 0.04658,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a linear adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item)\n return scores",
"objective": 0.04709,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a linear adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item)\n return scores",
"objective": 0.04719,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_6.json
================================================
[
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(item / (bins[bins >= item] - item))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a sinusoidal adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on a linear function of the remaining capacity and item size\n scores = np.maximum(0, 1 - (bins - item) / item)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of each bin by subtracting the current item size from the bin capacity.\n2. Assign a score to each bin based on the ratio of the item size to the minimum bin size.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > 0] = item / bins[bins > 0]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(np.log(item / (bins[bins >= item] - item)), 0, 1)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / sum(bins)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size.\n\nNew algorithm: The new algorithm assigns scores to bins based on the product of the remaining capacity and the inverse of the item size, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(bins[bins >= item] * (1 / item))\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(np.log(item / (bins[bins >= item] - item)) + 1, 0, 2)\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the logarithm of the remaining capacity to the item size and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(bins[bins >= item]) / (bins[bins >= item] / item) ** (1/3)\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: \"Assign a score of 1 to bins whose remaining capacity is equal to the item size, and decrease the score by 1 for each unit increase in remaining capacity.\"\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores -= (bins - item) // item\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(item / (bins[bins >= item] - item), 0, 1)\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nDescription: Assign scores to bins based on the ratio of the item size to the minimum capacity of the bin, with a logarithmic adjustment to favor smaller bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n min_bin_size = bins.min()\n scores = np.zeros_like(bins)\n scores[bins >= min_bin_size] = np.log(item / (min_bin_size + bins[bins >= min_bin_size]))\n return scores",
"objective": 0.04347,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n scores[bins > item] = np.log(item / (bins[bins > item] - item))\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the item size by dividing it by the maximum capacity of all bins\n norm_item = item / max(bins)\n \n # Calculate the scores for each bin based on its capacity and the normalized item size\n scores = np.zeros_like(bins)\n scores[bins > norm_item] = np.log(norm_item / (bins[bins > norm_item] - norm_item))\n \n return scores",
"objective": 0.04427,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a nonlinear adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = item / (bins[bins > item] - item) ** 2\n return scores",
"objective": 0.04477,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_7.json
================================================
[
{
"algorithm": "New algorithm: \"Minimax Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the remaining capacity of the bins to calculate the scores, with a focus on maximizing the use of smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item)\n \n # Adjust the ratios to favor smaller bins\n adjusted_ratios = np.log(ratios)\n \n # Calculate the scores based on the adjusted ratios\n scores = adjusted_ratios * (1 - (bins / np.max(bins)))\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(item / (bins[bins >= item] - item))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins while assigning items to bins.\n\nNew algorithm: \"The algorithm uses a combination of the item size and the remaining capacity of the bins to calculate the scores, with a focus on maximizing the use of smaller bins and minimizing the number of used bins.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item)\n \n # Adjust the ratios to favor smaller bins\n adjusted_ratios = np.log(ratios)\n \n # Calculate the scores based on the adjusted ratios\n scores = adjusted_ratios * (1 - (bins / np.max(bins)))\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a sinusoidal adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, 1 - (bins - item) / item)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of each bin by subtracting the current item size from the bin capacity.\n2. Assign a score to each bin based on the ratio of the item size to the minimum bin size.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > 0] = item / bins[bins > 0]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(np.log(item / (bins[bins >= item] - item)), 0, 1)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / sum(bins)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size.\n\nNew algorithm: The new algorithm assigns scores to bins based on the product of the remaining capacity and the inverse of the item size, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(bins[bins >= item] / item)\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size.\n\nNew algorithm: The new algorithm assigns scores to bins based on the product of the remaining capacity and the inverse of the item size, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(bins[bins >= item] * (1 / (item + 1)))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: \"Assign a score of 1 to bins whose remaining capacity is equal to the item size, and decrease the score by 1 for each unit increase in remaining capacity.\"\n\nDescription: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a cosine adjustment to favor smaller bins.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.cos(np.pi * (bins - item) / item) + 1\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(np.log(item / (bins[bins >= item] - item)) + 1, 0, 2)\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the logarithm of the remaining capacity to the item size and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.log(bins[bins >= item]) / (bins[bins >= item] / item) ** (1/3)\n return scores",
"objective": 0.04286,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_8.json
================================================
[
{
"algorithm": "New algorithm: \"Minimax Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the remaining capacity of the bins to calculate the scores, with a focus on maximizing the use of smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item)\n \n # Adjust the ratios to favor smaller bins\n adjusted_ratios = np.log(ratios)\n \n # Calculate the scores based on the adjusted ratios\n scores = adjusted_ratios * (1 - (bins / np.max(bins)))\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(item / (bins[bins >= item] - item))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins while assigning items to bins.\n\nNew algorithm: \"The algorithm uses a combination of the item size and the remaining capacity of the bins to calculate the scores, with a focus on maximizing the use of smaller bins and minimizing the number of used bins.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item)\n \n # Adjust the ratios to favor smaller bins\n adjusted_ratios = np.log(ratios)\n \n # Calculate the scores based on the adjusted ratios\n scores = adjusted_ratios * (1 - (bins / np.max(bins)))\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a sinusoidal adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, 1 - (bins - item) / item)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of each bin by subtracting the current item size from the bin capacity.\n2. Assign a score to each bin based on the ratio of the item size to the minimum bin size.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > 0] = item / bins[bins > 0]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nNew algorithm: \"Adaptive Score with Dynamic Capacity, Item Size, and Bin Utilization\"\n\nDescription: This algorithm dynamically adjusts the capacity of each bin based on the current item size and the utilization of each bin, and then calculates the scores based on the adjusted capacity, item size, and bin utilization.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the dynamic capacity for each bin based on the current item size and the utilization of each bin\n dynamic_capacity = bins - item + np.minimum(bins, item) * (1 - np.power(np.divide(bins, np.max(bins)), 2))\n \n # Calculate the scores for each bin based on the dynamic capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[dynamic_capacity > 0] = item / (dynamic_capacity[dynamic_capacity > 0] + 1) * (1 - bins[dynamic_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.clip(np.log(item / (bins[bins >= item] - item)), 0, 1)\n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / sum(bins)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the product of the remaining capacity and the square root of the item size, with a Gaussian adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.exp(-((bins[bins >= item] - item) / item) ** 2) * np.sqrt(item)\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size.\n\nNew algorithm: The new algorithm assigns scores to bins based on the product of the remaining capacity and the inverse of the item size, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(bins[bins >= item] / item)\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size.\n\nNew algorithm: The new algorithm assigns scores to bins based on the product of the remaining capacity and the inverse of the item size, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(bins[bins >= item] * (1 / (item + 1)))\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms assign scores to bins based on the remaining capacity after placing the current item in the bin.\n\nNew algorithm: \"Assign a score of 1 to bins whose remaining capacity is equal to the item size, and decrease the score by 1 for each unit increase in remaining capacity.\"\n\nDescription: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a cosine adjustment to favor smaller bins.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.cos(np.pi * (bins - item) / item) + 1\n return scores",
"objective": 0.04266,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run2/population_generation_9.json
================================================
[
{
"algorithm": "New algorithm: \"Minimax Score with Adjusted Capacity, Item Size, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins by assigning items to bins with the highest scores.\n\nNew algorithm: \"Minimax Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to minimize the maximum score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Adjusted Capacity, Item Size, and Bin Utilization\"\n\nThis algorithm aims to maximize the score of the selected bin while considering the available capacity of each bin, the size of the current item, and the utilization of each bin.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - bins[adjusted_capacity > 0])\n scores += np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, bin capacity, and utilization to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the scores for each bin based on the adjusted capacity, item size, and bin utilization\n scores = np.zeros_like(bins)\n scores[adjusted_capacity > 0] = item / (adjusted_capacity[adjusted_capacity > 0] + 1) * (1 - np.power(bins[adjusted_capacity > 0], 2))\n scores += np.arange(len(bins))\n \n # Add a penalty term for bins with high utilization\n scores -= np.power(np.arange(len(bins)), 2)\n \n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "The new algorithm is called \"Maximum Minimum Score with Adjusted Capacity, Item Size, and Bin Utilization\".",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = np.maximum(0, bins - item)\n \n # Calculate the minimum score for each bin based on the adjusted capacity, item size, and bin utilization\n min_score = np.minimum(item, adjusted_capacity)\n \n # Calculate the maximum score for each bin based on the adjusted capacity, item size, and bin utilization\n max_score = np.maximum(0, adjusted_capacity - item)\n \n # Calculate the scores for each bin based on the minimum and maximum scores\n scores = np.zeros_like(bins)\n scores[max_score > 0] = min_score[max_score > 0] / max_score[max_score > 0]\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the remaining capacity of the bins to calculate the scores, with a focus on maximizing the use of smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item)\n \n # Adjust the ratios to favor smaller bins\n adjusted_ratios = np.log(ratios)\n \n # Calculate the scores based on the adjusted ratios\n scores = adjusted_ratios * (1 - (bins / np.max(bins)))\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " New algorithm: \"The algorithm uses a combination of the item size and the remaining capacity of the bins to calculate the scores, with a focus on maximizing the use of smaller bins and minimizing the number of used bins. It also considers the distance between the item size and the bin capacity, giving more weight to bins with a closer fit.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item)\n \n # Adjust the ratios to favor smaller bins and bins with a closer fit\n adjusted_ratios = np.log(ratios) + np.abs(item - bins)\n \n # Calculate the scores based on the adjusted ratios\n scores = adjusted_ratios * (1 - (bins / np.max(bins)))\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a hyperbolic tangent adjustment to favor smaller bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.tanh(item / (bins[bins >= item] - item))\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign scores to bins based on the remaining capacity and the item size, with a non-linear transformation to favor smaller bins.\n\nNew algorithm: \"Hybrid Score with Logarithmic and Exponential Components\"\n\nDescription: This algorithm combines the logarithmic and exponential components of the previous two algorithms to create a hybrid score function that favors smaller bins while also considering the item size and the remaining capacity.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted capacity for each bin\n adjusted_capacity = bins - item\n \n # Calculate the logarithmic component of the score\n log_component = np.log(item / (adjusted_capacity + 1))\n \n # Calculate the exponential component of the score\n exp_component = np.exp(-(adjusted_capacity - item) / (item + 1))\n \n # Combine the logarithmic and exponential components to get the final score\n scores = log_component * exp_component\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins while assigning items to bins.\n\nNew algorithm: \"The algorithm uses a combination of the item size and the remaining capacity of the bins to calculate the scores, with a focus on maximizing the use of smaller bins and minimizing the number of used bins.\"\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the remaining capacity of each bin\n ratios = item / (bins - item)\n \n # Adjust the ratios to favor smaller bins\n adjusted_ratios = np.log(ratios)\n \n # Calculate the scores based on the adjusted ratios\n scores = adjusted_ratios * (1 - (bins / np.max(bins)))\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = (item * bins[bins != bins.max()]) / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a logarithmic adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the ratio of the item size to the remaining capacity after placing the current item in the bin, with a sinusoidal adjustment to favor smaller bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, 1 - (bins / item - 1))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the distance between the current item and the target bin, as well as the distance between the target bin and the next item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distances between the current item and the target bins\n distances = np.abs(bins - item)\n \n # Calculate the scores for each bin based on the distances and the size of the current item\n scores = np.zeros_like(bins)\n scores[distances < item] = 1 - distances[distances < item] / item\n scores[distances >= item] = 1 - (distances[distances >= item] - item) / (bins[distances >= item] - item)\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Use a logarithmic scale for the item size and the bin sizes\n item_log = np.log(item)\n bins_log = np.log(bins)\n \n # Calculate the scores using the logarithmic scales\n scores = np.zeros_like(bins)\n scores[bins_log != bins_log.max()] = (item_log * bins_log[bins_log != bins_log.max()]) / (bins_log[bins_log != bins_log.max()] - item_log + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum bin size\"\n\nMain steps:\n\n1. Calculate the minimum size of each bin by subtracting the current item size from the bin capacity.\n2. Assign a score to each bin based on the ratio of the item size to the minimum bin size.\n3. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > 0] = item / bins[bins > 0]\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin, while avoiding using bins with the maximum rest capacity. The goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item)\n\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, calculated by subtracting the item size from the bin capacity, and avoids using bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin based on its current rest capacity and the size of the item, where the score is equal to the absolute value of the difference between the rest capacity and the item size, multiplied by -1 if the bin is empty, to prioritize filling the empty bins first, or multiplied by 1 if the bin is not empty.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(bins - item) * np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))\n return scores",
"objective": 0.13281,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = bins[i] - item\n else:\n scores[i] = -1000\n \n return scores",
"objective": 0.14418,
"other_inf": null
},
{
"algorithm": "The algorithm first calculates the score for each bin by dividing the rest capacity of the bin by the item size, then subtracting 1 if the rest capacity equals the maximum capacity. Next, it sets the score to 0 if the rest capacity is less than the item size. Finally, it returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(bins, item)\n scores[bins == np.max(bins)] -= 1\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, considering the rest capacity of the bin, and returns the scores for all bins after the assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize an array of scores with zeros\n\n # Calculate the score for each bin based on their rest capacity\n scores = np.where(bins == np.max(bins), 0, bins - np.max(bins) + item + 1)\n \n return scores",
"objective": 0.32971,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Calculate the ratio of the capacity remaining in each bin to the size of the current item.\n2. Assign a score of 0 to bins that have the same capacity as their maximum capacity.\n3. Assign a score of 1 to bins whose remaining capacity is 1 larger than the size of the current item.\n4. Assign a score of 2 to bins whose remaining capacity is 2 larger than the size of the current item.\n5. Assign a score of 3 to bins whose remaining capacity is 3 larger than the size of the current item.\n6. Continue this pattern and assign scores in increasing order to bins with increasing available capacity.\n7. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item) # Assign scores based on ratio\n return scores",
"objective": 0.36543,
"other_inf": null
},
{
"algorithm": "The algorithm scores each bin based on a score function that takes into account both the remaining capacity of the bin and the size of the item being assigned. The main steps of the algorithm are: \n1. Initialize an empty Numpy array 'scores' with the same size as 'bins' to store the scores for each bin.\n2. Calculate the score for each bin by dividing the remaining capacity of the bin by the size of the item, and store the result in the corresponding index of 'scores'.\n3. Return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = bins[bins > item] / item\n return scores",
"objective": 0.3763,
"other_inf": null
},
{
"algorithm": "\nThe algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment.\nThe main steps of the algorithm are as follows:\n1. Calculate the available capacities of all bins by subtracting 'item' from 'bins'.\n2. Filter out the bins with available capacity equal to the maximum capacity ('bins_max') using a mask.\n3. Assign a score of 0 to all bins that have 'bins_max' capacity.\n4. For the remaining bins, calculate the score by dividing the available capacity by the difference between 'bins_max' and the available capacity.\n5. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score for each bin is calculated as the difference between the rest capacity and twice the size of the item, with a lower bound of zero, and the final scores are stored in a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - 2 * item, 0)\n return scores",
"objective": 0.86699,
"other_inf": null
},
{
"algorithm": "The novel score function assigns an item to the bin with the maximum score, taking into account the rest capacity of each bin, and aims to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = item - bins[mask]\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "We first calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, and then subtract 1 from the score of the bin with the maximum capacity. Finally, we return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n max_index = np.argmax(bins)\n scores[max_index] -= 1\n return scores",
"objective": 1.51484,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin by dividing the rest capacity of the bin by the size of the item and subtracting it from the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins) / item\n scores = (bins / item) - max_score\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_1.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins.max() - bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms assign an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins.\n\nNew algorithm: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin, and the number of items already assigned to each bin.\n\nDescription: The algorithm calculates the distance between the item size and the bin capacity for each bin, and then assigns the item to the bin with the minimum distance. The score for each bin is calculated as the inverse of the distance between the item size and the bin capacity, and is further adjusted based on the number of items already assigned to the bin, and the number of items already assigned to each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Assign the item to the bin with the minimum distance\n min_distance_index = np.argmin(distances)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins == np.max(bins)))\n # Set the score for the bin with the minimum distance to 0\n scores[min_distance_index] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": " New algorithm: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin.\n\nDescription: The algorithm calculates the distance between the item size and the bin capacity for each bin, and then assigns the item to the bin with the minimum distance. The score for each bin is calculated as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Assign the item to the bin with the minimum distance\n min_distance_index = np.argmin(distances)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the minimum distance to 0\n scores[min_distance_index] = 0\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins >= item, 0, np.clip(bins / item, 0, None))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum score\"\n\nMain steps:\n\n1. Calculate the ratio of rest capacity of each bin to the item size.\n2. Set the score for bins with equal rest capacity to the maximum capacity as 0.\n3. Calculate the scores for each bin by multiplying the ratios with the inverse of the bin index (i.e., 1/index).\n4. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with the inverse of the bin index\n scores = ratios * (1 / np.arange(1, len(bins)+1))\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / bins[bins != bins.max()])\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of empty bins to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n scores = np.zeros_like(bins)\n scores[bins > item] = (num_empty_bins + 1) / (bins[bins > item] / item)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the number of empty bins, and the standard deviation of the remaining bins to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the number of empty bins\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n # Calculate the standard deviation of the remaining bins\n std_dev = np.std(bins[bins > item])\n # Calculate the score for each bin\n scores = np.zeros_like(bins)\n scores[bins > item] = (num_empty_bins + 1) / (std_dev / item)\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / bins\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.05121,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the number of empty bins, and the average capacity of the remaining bins to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the number of empty bins\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n # Calculate the average capacity of the remaining bins\n avg_capacity = np.mean(bins[bins > item])\n # Calculate the score for each bin\n scores = np.zeros_like(bins)\n scores[bins > item] = (num_empty_bins + 1) / (avg_capacity / item)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms assign an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins.\n\nNew algorithm: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin.\n\nDescription: The algorithm calculates the distance between the item size and the bin capacity for each bin, and then assigns the item to the bin with the minimum distance. The score for each bin is calculated as the inverse of the distance between the item size and the bin capacity, and is further adjusted based on the number of items already assigned to the bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Assign the item to the bin with the minimum distance\n min_distance_index = np.argmin(distances)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n # Set the score for the bin with the minimum distance to 0\n scores[min_distance_index] = 0\n return scores",
"objective": 0.05453,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms assign an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins.\n\nNew algorithm: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity.\n\nDescription: The algorithm calculates the distance between the item size and the bin capacity for each bin, and then assigns the item to the bin with the minimum distance. The score for each bin is calculated as the inverse of the distance between the item size and the bin capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.sqrt((bins - item)**2)\n # Select the bin with the closest distance to the item size\n closest_bin_index = np.argmin(distances)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Set the score for the selected bin to 0\n scores[closest_bin_index] = 0\n return scores",
"objective": 0.05654,
"other_inf": null
},
{
"algorithm": " New algorithm: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin.\n\nMain steps:\n\n1. Calculate the distance between the item size and the bin capacity for each bin.\n2. Assign the item to the bin with the minimum distance.\n3. Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, plus the number of items already assigned to the bin.\n4. Set the score for the bin with the minimum distance to 0.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Assign the item to the bin with the minimum distance\n min_distance_index = np.argmin(distances)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances + np.arange(len(bins))\n # Set the score for the bin with the minimum distance to 0\n scores[min_distance_index] = 0\n return scores",
"objective": 0.05735,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins, while also considering the distance between the item size and the bin capacity, and the number of items already assigned to each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / bins\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n \n # Assign the item to the bin with the minimum distance\n min_distance_index = np.argmin(distances)\n \n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores += 1 / distances\n \n # Set the score for the bin with the minimum distance to 0\n scores[min_distance_index] = 0\n \n return scores",
"objective": 0.05916,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n penalty = 1000\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = np.log(bins[i]) - np.log(item) + penalty\n else:\n scores[i] = -np.log(bins[i]) - np.log(item) + penalty\n\n return scores",
"objective": 0.06439,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of bins to calculate the scores, with a focus on reducing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n scores = np.zeros(num_bins)\n\n for i in range(num_bins):\n scores[i] = (bins[i] - item) / (num_bins - i)\n\n return scores",
"objective": 0.11037,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_10.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item's size and the distance between the item's size and the bin's capacity to calculate the score.\n\nNew algorithm: The new algorithm uses a combination of the item's size, the distance between the item's size and the bin's capacity, and the number of times the bin has been used to calculate the score.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size, the distance, and the number of times the bin has been used\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(np.sum(bins))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (1 - (bins[i] / max_capacity)) + (item - bins[i]) / (max_capacity - bins[i])\n else:\n scores[i] = 0\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Item Size and Remaining Capacity\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = np.log(item / remaining_capacity)\n \n # Normalize the scores to ensure they are comparable across bins\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Item Size Penalty and Rest Capacity Bonus\"\nThis algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, plus a bonus for the remaining capacity of the bin.\n\nImplementation:\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins)) + np.log(bins)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the scores for each bin based on the item size and the rest capacity of the bins.\n\nNew algorithm: \"Maximum Score with Item Size Penalty\"\nThis algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various combinations of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.\n\nNew algorithm: The new algorithm uses a combination of the item size, the rest capacity of each bin, and the ratio of the item size to the maximum capacity of the bins to calculate the score.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (1 - (bins[i] / max_capacity)) * (1 - (item / max_capacity))\n else:\n scores[i] = 0\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score, taking into account the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (1 - (bins[i] / max_capacity))\n else:\n scores[i] = 0\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various combinations of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.\n\nNew algorithm: The new algorithm uses a combination of the item size, the rest capacity of each bin, and the logarithmic distance between the item size and the maximum capacity of the bins to calculate the score.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * np.log(max_capacity / bins[i])\n else:\n scores[i] = 0\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the scores for each bin based on the item size and the rest capacity of the bins.\n\nNew algorithm: \"Maximum Score with Item Size Penalty and Distance Factor\"\nThis algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, and multiplied by a factor that depends on the distance between the item's size and the bin's capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the penalty factor based on the distance\n penalty_factor = np.exp(-distances / 10)\n \n # Calculate the score based on the item's size, the distance, and the number of times the bin has been used\n scores = bins / (bins - item) - np.arange(len(bins)) * penalty_factor\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a combination of the item size, the rest capacity of each bin, and the square root of the distance between the item size and the maximum capacity of the bins to calculate the score.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * np.sqrt(max_capacity / bins[i])\n else:\n scores[i] = 0\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item * bins[bins != bins.max()] / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\"\n\nMain steps: Assign an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a certain threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum score for each bin\n max_score = np.max(bins)\n \n # Calculate the restricted capacity for each bin\n restricted_capacity = np.minimum(bins, max_score)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[restricted_capacity > 0] = np.log(item / (restricted_capacity[restricted_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as 0\n scores = np.zeros_like(bins)\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = bins - item\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.sum(bins <= item)\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "My new algorithm is called \"Maximum Score with Item Size Bonus\". It rewards bins based on their sizes to encourage using larger bins when possible.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n # Add a bonus term based on the size of the bin\n bonus = (bins - min(bins)) / (max(bins) - min(bins))\n scores += bonus\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item's size, the distance between the item's size and the bin's capacity, and the standard deviation of the remaining bins' capacities to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n \n # Calculate the score based on the item's size, the distance, and the standard deviation\n scores = np.log(item / distances) + np.log(distances / std_capacity)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_11.json
================================================
[
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay\"\n\nIn this algorithm, we modify the previous algorithm by adding an exponential decay factor to the distance penalty term. This factor reduces the impact of the distance penalty as the distance between the item size and the bin capacity increases.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add an exponential decay factor to the distance penalty term\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay\"\n\nIn this algorithm, we modify the previous algorithm by adding an exponential decay factor to the distance penalty term. This factor reduces the impact of the distance penalty as the distance between the item size and the bin capacity increases.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a robust distance metric\n distances = np.maximum(distances, 1e-6)\n \n # Modify the score formula to include more features\n scores += np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Choose the decay factor based on cross-validation\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty\"\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, and the distance between the item size and the bin capacity. The score is higher when the item size is closer to the bin capacity and the rest capacity of the bin is higher.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": "A novel algorithm that considers the item's size, the distance between the item's size and the bin's capacity, the number of times the bin has been used, and the total capacity of all bins to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size, the distance, the number of times the bin has been used, and the total capacity of all bins\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(np.sum(bins)) - np.log(bins)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03139,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Linear Decay\". It modifies the previous algorithm by replacing the exponential decay factor with a linear decay factor. This factor reduces the impact of the distance penalty as the distance between the item size and the bin capacity increases.\n\nHere is the implementation of the new algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a linear decay factor to the distance penalty term\n decay_factor = 0.5\n scores -= decay_factor * (distances / (decay_factor * bins.max()))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item's size and the distance between the item's size and the bin's capacity to calculate the score.\n\nNew algorithm: The new algorithm uses a combination of the item's size, the distance between the item's size and the bin's capacity, and the number of times the bin has been used to calculate the score.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size, the distance, and the number of times the bin has been used\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(np.sum(bins))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (1 - (bins[i] / max_capacity)) + (item - bins[i]) / (max_capacity - bins[i])\n else:\n scores[i] = 0\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, the rest capacity of each bin, and the ratio of the item size to the maximum capacity of the bins to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (item / max_capacity)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Bin-based Scoring with Item Size and Remaining Capacity\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = np.log(item / remaining_capacity)\n \n # Normalize the scores to ensure they are comparable across bins\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Item Size Penalty and Rest Capacity Bonus\"\nThis algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, plus a bonus for the remaining capacity of the bin.\n\nImplementation:\n```\nCode:\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins)) + np.log(bins)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Maximize the score of the bin by considering the item size, rest capacity, and usage history.\n\nNew algorithm: \"Maximum Score with Item Size Penalty, Rest Capacity Bonus, and Usage History Factor\"\n\nDescription: Assign an item to the bin with the maximum score, considering the item size, rest capacity, and usage history, while ensuring that the total capacity of all bins does not exceed a certain threshold. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, plus a bonus for the remaining capacity of the bin, and multiplied by a factor that depends on the usage history of the bin.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the usage history factor for each bin\n usage_history = np.arange(len(bins))\n usage_history_factor = np.exp(-usage_history / 10)\n \n # Calculate the scores for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + np.log(bins) * usage_history_factor\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the scores for each bin based on the item size and the rest capacity of the bins.\n\nNew algorithm: \"Maximum Score with Item Size Penalty\"\nThis algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The \"Maximum Score with Item Size Penalty and Bin Age Factor\" algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, and then multiplied by a factor that depends on the age of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the age factor for each bin\n ages = np.arange(len(bins))\n age_factor = np.exp(-ages / 10)\n \n # Calculate the scores for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) * age_factor\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Bin-based Scoring with Item Size, Remaining Capacity, and Bin Utilization\"\n\nMain steps: Calculate the remaining capacity for each bin, then calculate the score for each bin based on the item size, the remaining capacity, and the bin utilization. The score is higher when the item size is smaller, the remaining capacity is larger, and the bin utilization is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on the item size, the remaining capacity, and the bin utilization\n scores = np.log(item / remaining_capacity) + np.sqrt(remaining_capacity) - np.log(bins) + np.log(bins - item + 1)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score, taking into account the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (1 - (bins[i] / max_capacity))\n else:\n scores[i] = 0\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Bin-based Scoring with Item Size, Remaining Capacity, and Bin Utilization\". It takes into account the utilization of the bins in addition to the item size and remaining capacity.\n\nHere is the implementation of the `score` function in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on the item size, remaining capacity, and bin utilization\n scores = np.log(item / remaining_capacity) + np.log(1 - (bins / np.sum(bins)))\n \n # Normalize the scores to ensure they are comparable across bins\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the harmonic mean of the distance between the item size and the maximum capacity of the bins to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (1 / (1 + (bins[i] / max_capacity)))\n else:\n scores[i] = 0\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various combinations of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.\n\nNew algorithm: The new algorithm uses a combination of the item size, the rest capacity of each bin, and the logarithmic distance between the item size and the maximum capacity of the bins to calculate the score.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * np.log(max_capacity / bins[i])\n else:\n scores[i] = 0\n return scores",
"objective": 0.03924,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_12.json
================================================
[
{
"algorithm": "The \"Maximum Score with Item Size Penalty and Rest Capacity Bonus\" algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, plus the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Randomness\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add an exponential decay factor to the distance penalty term\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Add a randomness factor to the score\n randomness_factor = 0.1\n scores += randomness_factor * np.random.rand(len(bins))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay\"\n\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, and the distance between the item size and the bin capacity, with an exponential decay factor applied to the distance penalty. The score is higher when the item size is closer to the bin capacity and the rest capacity of the bin is higher, and the distance penalty decreases exponentially as the distance increases.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Apply an exponential decay factor to the distance penalty\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02978,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay and Item Size-Bin Capacity Ratio\"\n\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, and the ratio of the item size to the bin capacity. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, and the ratio of the item size to the bin capacity is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a robust distance metric\n distances = np.maximum(distances, 1e-6)\n \n # Modify the score formula to include more features\n scores += np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a penalty term for bins that are close to being full\n penalty = np.exp(-(bins / bins.max()) ** 2)\n scores -= penalty\n \n # Add a bonus term for bins that have a large rest capacity\n bonus = np.exp((bins.max() - bins) / bins.max())\n scores += bonus\n \n # Add a term to penalize bins with a high item size-bin capacity ratio\n ratio = item / bins\n scores -= np.log(ratio)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay\"\n\nIn this algorithm, we modify the previous algorithm by adding an exponential decay factor to the distance penalty term. This factor reduces the impact of the distance penalty as the distance between the item size and the bin capacity increases.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add an exponential decay factor to the distance penalty term\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay\"\n\nIn this algorithm, we modify the previous algorithm by adding an exponential decay factor to the distance penalty term. This factor reduces the impact of the distance penalty as the distance between the item size and the bin capacity increases.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a robust distance metric\n distances = np.maximum(distances, 1e-6)\n \n # Modify the score formula to include more features\n scores += np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Choose the decay factor based on cross-validation\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay and Randomness\"\n\nIn this algorithm, we modify the previous algorithm by adding an exponential decay factor to the distance penalty term and introducing randomness to the score calculation. The exponential decay factor reduces the impact of the distance penalty as the distance between the item size and the bin capacity increases, while the randomness adds a layer of uncertainty to the score calculation, making it more difficult for the algorithm to converge to a single optimal solution.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add an exponential decay factor to the distance penalty term\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Introduce randomness to the score calculation\n random_factor = 0.1\n scores += random_factor * np.random.rand(len(bins))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty\"\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, and the distance between the item size and the bin capacity. The score is higher when the item size is closer to the bin capacity and the rest capacity of the bin is higher.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03049,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, and the number of times the bin has been used, with an exponential decay factor applied to the distance penalty and the bin utilization factor. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, and the bin has been used fewer times.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Apply an exponential decay factor to the distance penalty\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a bin utilization factor to the score calculation\n utilization_factor = 0.5\n scores += utilization_factor * (1 - (bins / bins.max()))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03119,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various combinations of item size, bin capacity, and distance metrics to calculate scores for assigning an item to a bin.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the total capacity of all bins, with an exponentially decaying learning rate and a self-adaptive learning rate. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the total capacity of all bins is higher.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a bonus term for bins that are far from being full\n bonus = np.exp((bins / bins.max()) ** 2)\n scores += bonus\n \n # Add a penalty term for bins that are close to being full\n penalty = np.exp(-(bins / bins.max()) ** 2)\n scores -= penalty\n \n # Choose the decay factor based on cross-validation\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Calculate the self-adaptive learning rate\n learning_rate = np.minimum(np.exp(-item / (10 * bins.max())), 0.5)\n \n # Update the scores based on the self-adaptive learning rate\n scores = scores * (1 - learning_rate) + learning_rate * np.random.uniform(0, 1, len(bins))\n \n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "The \"Maximum Score with Item Size Penalty and Rest Capacity Bonus\" algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, plus the bin's rest capacity.",
"code": "import numpy as np\n\ndef score_log(item, bins):\n scores = np.log(bins / (bins - item)) - np.arange(len(bins)) + bins\n return scores",
"objective": 0.03139,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various combinations of item size, bin capacity, and distance metrics to calculate scores for assigning an item to a bin.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm modifies the previous algorithm by incorporating an exponentially decaying learning rate to adapt the distance penalty based on the item size and the bin capacity. Additionally, the algorithm includes a self-adaptive learning rate that adjusts the weight of the distance penalty based on the item size and the bin capacity.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a robust distance metric\n distances = np.maximum(distances, 1e-6)\n \n # Modify the score formula to include more features\n scores += np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Choose the decay factor based on cross-validation\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Calculate the self-adaptive learning rate\n learning_rate = np.minimum(np.exp(-item / (10 * bins.max())), 0.5)\n \n # Update the scores based on the self-adaptive learning rate\n scores = scores * (1 - learning_rate) + learning_rate * np.random.uniform(0, 1, len(bins))\n \n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Linear Decay and Self-Consistency\"\n\nIn this algorithm, we modify the previous algorithm by replacing the exponential decay factor with a linear decay factor and removing the randomness component. The linear decay factor reduces the impact of the distance penalty as the distance between the item size and the bin capacity increases, while the self-consistency ensures that the score calculation is consistent across all bins.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a linear decay factor to the distance penalty term\n decay_factor = 0.5\n scores -= decay_factor * np.minimum(distances / (decay_factor * bins.max()), 1)\n \n # Ensure self-consistency by normalizing the scores\n scores /= np.sum(scores)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Linear Decay\". It modifies the previous algorithm by replacing the exponential decay factor with a linear decay factor. This factor reduces the impact of the distance penalty as the distance between the item size and the bin capacity increases.\n\nHere is the implementation of the new algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a linear decay factor to the distance penalty term\n decay_factor = 0.5\n scores -= decay_factor * (distances / (decay_factor * bins.max()))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Novel Score Function\"\n\nThis algorithm uses a different parameter setting for the score function, where the bonus term is based on the inverse of the bin's capacity instead of the square of the ratio of the bin's capacity to the maximum capacity.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size, the distance, and the number of items already placed in the bin\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(np.sum(bins)) - np.log(bins)\n \n # Add a bonus term for bins that are far from being full\n bonus = np.exp(-(bins / bins.max()))\n scores += bonus\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.0325,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay and Self-Consistency\"\n\nIn this algorithm, we modify the previous algorithm by adding a self-consistency term to the score calculation. The self-consistency term ensures that the score of a bin is consistent across all items, which helps to prevent the algorithm from getting stuck in local optima.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add an exponential decay factor to the distance penalty term\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Introduce self-consistency to the score calculation\n consistency_factor = 0.1\n scores += consistency_factor * np.mean(np.abs(scores - np.mean(scores)))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.0328,
"other_inf": null
},
{
"algorithm": "A new algorithm that considers the item size, the distance between the item size and the bin capacity, the number of items already placed in the bin, and the total capacity of all bins to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the distance, and the number of items already placed in the bin\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(np.sum(bins)) - np.log(bins)\n \n # Add a penalty term for bins that are close to being full\n penalty = np.exp(-(bins / bins.max()) ** 2)\n scores -= penalty\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Adjust the score based on the total capacity of all bins\n total_capacity = np.sum(bins)\n scores += np.log(total_capacity) - np.log(bins)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Apply an exponential decay factor to the score\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n return scores",
"objective": 0.0332,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_13.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the ratio of the item size to the bin capacity, with an exponential decay factor applied to the distance penalty and the bin utilization factor, and a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the ratio of the item size to the bin capacity is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(utilization_levels)\n \n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, and the number of times the bin has been used, with an exponential decay factor applied to the distance penalty and the bin utilization factor. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, and the bin has been used fewer times.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Item Size-Bin Capacity Ratio\"\n\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the ratio of the item size to the bin capacity. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the ratio of the item size to the bin capacity is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Add a term to penalize bins with a high item size-bin capacity ratio\n ratio = item / bins\n scores -= np.log(ratio)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Item Size Penalty, Rest Capacity Bonus, and Exponential Decay\"\n\nMain steps: Assign an item to the bin with the maximum score, update the rest capacity of the bin accordingly, and decay the score of each bin based on the number of items assigned to it.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a distance penalty term to discourage assigning items to bins that are far away from the current bin\n distance_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= distance_penalty\n \n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "The \"Maximum Score with Item Size Penalty and Rest Capacity Bonus\" algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, plus the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Item Size Penalty and Rest Capacity Bonus and Exponential Decay\"\n\nMain steps: Assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, plus the bin's rest capacity, and then multiplied by an exponential decay factor based on the bin's usage history.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n return scores",
"objective": 0.0168,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Item Size Penalty and Rest Capacity Bonus and Exponential Decay with Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply logarithmic decay factor based on bin usage history\n decay_factor = np.log(np.arange(len(bins)) + 1)\n scores *= decay_factor\n \n # Adjust the learning rate based on the number of items assigned to each bin\n learning_rate = np.exp(-0.5 * np.arange(len(bins)))\n scores *= learning_rate\n \n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Item Size Penalty and Rest Capacity Bonus and Exponential Decay\"\n\nMain steps: Assign an item to the bin with the maximum score and update the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used, plus the bin's rest capacity, and then multiplied by an exponential decay factor based on the bin's usage history.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply logarithmic decay factor based on bin usage history\n decay_factor = np.log(np.arange(len(bins)) + 1)\n scores *= decay_factor\n \n return scores",
"objective": 0.02354,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply logarithmic decay factor based on bin usage history\n decay_factor = np.log(np.arange(len(bins)) + 1)\n scores *= decay_factor\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Add an exponential decay term to penalize bins with high utilization levels\n scores -= np.exp(-utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Apply an exponential decay factor to the distance penalty\n decay_factor = 0.8\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(utilization_levels)\n \n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "A novel algorithm that considers the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.",
"code": "def score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Add an exponential decay term to penalize bins with high utilization levels\n scores -= np.exp(-utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02878,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "My new algorithm is called \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay\".",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Apply an exponential decay factor to the distance penalty\n decay_factor = 0.8\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02918,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Apply an exponential decay factor to the distance penalty\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay\"\n\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, and the distance between the item size and the bin capacity, with an exponential decay factor applied to the distance penalty. The score is higher when the item size is closer to the bin capacity and the rest capacity of the bin is higher, and the distance penalty decreases exponentially as the distance increases.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Apply a modified decay factor to the distance penalty\n decay_factor = 0.7\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus and Distance Penalty with Exponential Decay\"\n\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, and the distance between the item size and the bin capacity, with an exponential decay factor applied to the distance penalty. The score is higher when the item size is closer to the bin capacity and the rest capacity of the bin is higher, and the distance penalty decreases exponentially as the distance increases.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Apply a dynamic decay factor to the distance penalty\n decay_factor = 0.5 * (1 + np.exp(-distances / (item + 1)))\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Randomness\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add an exponential decay factor to the distance penalty term\n decay_factor = 0.5\n scores -= decay_factor * np.exp(-distances / (decay_factor * bins.max()))\n \n # Add a randomness factor to the score\n randomness_factor = 0.1\n scores += randomness_factor * np.random.rand(len(bins))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay\". It is similar to the previous algorithm but with different parameter settings.\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the distance between the item size and the bin capacity.\n2. Calculate the score based on the item size, the rest capacity of the bin, and the distance.\n3. Apply an exponential decay factor to the distance penalty.\n4. Add a term to encourage the use of bins with lower utilization levels.\n5. Set the score to zero if the bin's capacity is equal to the maximum capacity.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Apply an exponential decay factor to the distance penalty\n decay_factor = 0.7\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.02968,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_14.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the ratio of the item size to the bin capacity, with an exponential decay factor applied to the distance penalty and the bin utilization, and a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the ratio of the item size to the bin capacity is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(utilization_levels)\n \n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the learning rate of the algorithm, with an exponential decay factor applied to the distance penalty and the bin utilization, and a self-adaptive learning rate that adjusts based on the performance of the algorithm. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the learning rate is higher.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Adjust the learning rate based on the performance of the algorithm\n learning_rate = 0.1\n scores += learning_rate * np.random.normal(size=len(bins))\n \n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, and the number of times the bin has been used, with an exponential decay factor applied to the distance penalty and the bin utilization factor. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, and the bin has been used fewer times.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the learning rate of the algorithm, with an exponential decay factor applied to the distance penalty and the bin utilization factor, and a self-adaptive learning rate that adjusts based on the performance of the algorithm. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the learning rate is higher.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Adjust the learning rate based on the performance of the algorithm\n learning_rate = 0.1\n scores += learning_rate * np.random.normal(size=len(bins))\n \n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the ratio of the item size to the bin capacity, with an exponential decay factor applied to the distance penalty and the bin utilization, and a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the ratio of the item size to the bin capacity is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Item Size-Bin Capacity Ratio\"\n\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the ratio of the item size to the bin capacity. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the ratio of the item size to the bin capacity is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Add a term to penalize bins with a high item size-bin capacity ratio\n ratio = item / bins\n scores -= np.log(ratio)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Item Size Penalty, Rest Capacity Bonus, and Exponential Decay\"\n\nMain steps: Assign an item to the bin with the maximum score, update the rest capacity of the bin accordingly, and decay the score of each bin based on the number of items assigned to it.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Self-Adaptive Score with Item Size Penalty, Rest Capacity Bonus, and Exponential Decay with Different Parameter Settings\"\n\nDescription:\nThis algorithm uses a self-adaptive score function with different parameter settings that adjust the weights of the item size penalty, rest capacity bonus, and exponential decay based on the usage history of the bins. The score function also includes a term that encourages the use of bins with lower utilization levels.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.5\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Apply an item size penalty term\n item_size_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= item_size_penalty\n \n # Apply a rest capacity bonus term\n rest_capacity_bonus = np.abs(np.arange(len(bins)) - np.argmax(bins))\n scores += rest_capacity_bonus\n \n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm uses a combination of item size, rest capacity, and utilization level to calculate the score of each bin, with a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Apply an item size penalty term\n item_size_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= item_size_penalty\n \n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a distance penalty term to the scores to encourage items to be placed in bins with lower distances from their target positions\n distance_penalty = 0.1\n scores -= distance_penalty * np.abs(np.arange(len(bins)) - np.argmin(bins))\n \n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Apply an item size penalty term\n item_size_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= item_size_penalty\n \n # Apply a rest capacity bonus term\n rest_capacity_bonus = np.abs(np.arange(len(bins)) - np.argmax(bins))\n scores += rest_capacity_bonus\n \n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nThe provided algorithms share the idea of using a score function to evaluate the suitability of each bin for receiving a particular item. The score function typically takes into account the item size, the remaining capacity of the bin, and the utilization level of the bin.\n\nNew algorithm:\n\"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription:\nThis algorithm uses a score function that takes into account the item size, the remaining capacity of the bin, the utilization level of the bin, and the distance between the current bin and the target position of the item. The score function also includes a term that encourages the use of bins with lower utilization levels.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Add a distance penalty term to discourage assigning items to bins that are far away from the current bin\n distance_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= distance_penalty\n \n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nThe provided algorithms share the idea of using a score function to evaluate the suitability of each bin for receiving a particular item. The score function typically takes into account the item size, the remaining capacity of the bin, and the utilization level of the bin.\n\nNew algorithm:\n\"Self-Adaptive Score with Item Size Penalty, Rest Capacity Bonus, and Exponential Decay\"\n\nDescription:\nThis algorithm uses a self-adaptive score function that adjusts the weights of the item size penalty, rest capacity bonus, and exponential decay based on the usage history of the bins. The score function also includes a term that encourages the use of bins with lower utilization levels.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Apply an item size penalty term\n item_size_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= item_size_penalty\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a distance penalty term to discourage assigning items to bins that are far away from the current bin\n distance_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= distance_penalty\n \n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a distance penalty term to discourage assigning items to bins that are far away from the current bin\n distance_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= distance_penalty\n \n # Add a bonus term to encourage assigning items to bins with higher rest capacity\n bonus = np.exp(bins / bins.max())\n scores += bonus\n \n return scores",
"objective": 0.01217,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription:\nThis algorithm uses a score function that takes into account the item size, the remaining capacity of the bin, the utilization level of the bin, and the distance between the current bin and the target position of the item. The score function also includes a term that encourages the use of bins with lower utilization levels.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Add a distance penalty term to discourage assigning items to bins that are far away from the current bin\n distance_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= distance_penalty\n \n # Add a bonus term to encourage assigning items to bins with higher rest capacity\n bonus = np.exp(bins / bins.max())\n scores += bonus\n \n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate with Different Parameter Settings\".\n\nThe main steps of my algorithm are as follows:\n\n1. Calculate the initial scores based on the item size and the rest capacities of the feasible bins using the same formula as the original algorithm.\n2. Apply an exponential decay factor to the scores to penalize bins that have been used more frequently.\n3. Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation.\n4. Add a distance penalty term to the scores to encourage items to be placed in bins with lower distances from their target positions.\n5. Return the scores for the bins for assignment.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.9\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.2\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a distance penalty term to the scores to encourage items to be placed in bins with lower distances from their target positions\n distance_penalty = 0.2\n scores -= distance_penalty * np.abs(np.arange(len(bins)) - np.argmin(bins))\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": " Common backbone idea:\nThe provided algorithms share the idea of using a score function to evaluate the suitability of each bin for receiving a particular item. The score function typically takes into account the item size, the remaining capacity of the bin, and the utilization level of the bin.\n\nNew algorithm:\n\"Self-Adaptive Score with Item Size Penalty, Rest Capacity Bonus, and Exponential Decay\"\n\nDescription:\nThis algorithm uses a self-adaptive score function that adjusts the weights of the item size penalty, rest capacity bonus, and exponential decay based on the usage history of the bins. The score function also includes a term that encourages the use of bins with lower utilization levels.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "def score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n return scores",
"objective": 0.0163,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_15.json
================================================
[
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the ratio of the item size to the bin capacity, with an exponential decay factor applied to the distance penalty and the bin utilization, and a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the ratio of the item size to the bin capacity is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(utilization_levels)\n \n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the learning rate of the algorithm, with an exponential decay factor applied to the distance penalty and the bin utilization, and a self-adaptive learning rate that adjusts based on the performance of the algorithm. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the learning rate is higher.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Adjust the learning rate based on the performance of the algorithm\n learning_rate = 0.1\n scores += learning_rate * np.random.normal(size=len(bins))\n \n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use a combination of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, and the number of times the bin has been used, with an exponential decay factor applied to the distance penalty and the bin utilization factor. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, and the bin has been used fewer times.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the learning rate of the algorithm, with an exponential decay factor applied to the distance penalty and the bin utilization factor, and a self-adaptive learning rate that adjusts based on the performance of the algorithm. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the learning rate is higher.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Adjust the learning rate based on the performance of the algorithm\n learning_rate = 0.1\n scores += learning_rate * np.random.normal(size=len(bins))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the learning rate of the algorithm, with an exponential decay factor applied to the distance penalty and the bin utilization factor, and a self-adaptive learning rate that adjusts based on the performance of the algorithm. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the learning rate is higher.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Adjust the learning rate based on the performance of the algorithm\n learning_rate = 0.1\n scores += learning_rate * np.random.normal(size=len(bins))\n \n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Item Size-Bin Capacity Ratio with Modified Distance Weighting\"\n\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the ratio of the item size to the bin capacity. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the ratio of the item size to the bin capacity is lower. The difference from the previous algorithm is that the distance weighting is modified to take into account the item size and the bin capacity ratio.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Add a term to penalize bins with a high item size-bin capacity ratio\n ratio = item / bins\n scores -= np.log(ratio)\n \n # Modify the distance weighting to take into account the item size and the bin capacity ratio\n scores *= np.minimum(1, np.maximum(0, (item / bins) ** 2))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the learning rate of the algorithm, with an exponential decay factor applied to the distance penalty and the bin utilization, and a self-adaptive learning rate that adjusts based on the performance of the algorithm. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the learning rate is higher.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Adjust the learning rate based on the performance of the algorithm\n learning_rate = 0.1\n scores += learning_rate * np.random.normal(size=len(bins))\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the ratio of the item size to the bin capacity, with an exponential decay factor applied to the distance penalty and the bin utilization, and a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the ratio of the item size to the bin capacity is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the score of each bin based on the item size, the rest capacity of the bin, and other factors.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Item Size-Bin Capacity Ratio\"\n\nThis algorithm assigns an item to the bin with the highest score, which is calculated based on the item size, the rest capacity of the bin, the distance between the item size and the bin capacity, the number of times the bin has been used, and the ratio of the item size to the bin capacity. The score is higher when the item size is closer to the bin capacity, the rest capacity of the bin is higher, the distance between the item size and the bin capacity is smaller, the bin has been used fewer times, and the ratio of the item size to the bin capacity is lower.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item size, the rest capacity of the bin, and the distance\n scores = np.log(item / distances) + np.sqrt(distances) + np.log(bins) - np.log(bins - item + 1)\n \n # Add a regularization term to penalize large distances\n scores += 0.1 * np.square(distances)\n \n # Choose the decay factor based on the distribution of the data\n decay_factor = np.mean(distances)\n scores -= decay_factor * np.exp(-distances / (item + 1))\n \n # Apply an exponential decay factor to the bin utilization factor\n utilization_factor = 0.5\n scores -= utilization_factor * np.exp(-np.arange(len(bins)))\n \n # Add a term to penalize bins with a high item size-bin capacity ratio\n ratio = item / bins\n scores -= np.log(ratio)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate with Different Parameter Settings\".\n\nThe main steps of my algorithm are similar to the original algorithm, but with different parameter settings. Specifically, the decay factor is increased to 0.98, the learning rate is decreased to 0.05, and the distance penalty is increased to 0.2. These changes aim to prioritize the use of bins with higher rest capacities and reduce the impact of distance on the score calculation.\n\nHere is the implementation of my algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores with a minimum value added to the denominator and a maximum value added to the numerator\n scores = np.maximum(bins / (bins - item + 1), 1) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.98\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.05\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a distance penalty term to the scores to encourage items to be placed in bins with lower distances from their target positions\n distance_penalty = 0.2\n scores -= distance_penalty * np.abs(np.arange(len(bins)) - np.argmin(bins))\n \n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm uses a score function that takes into account the item size, the remaining capacity of the bin, the utilization level of the bin, and the distance between the current bin and the target position of the item. The score function also includes a term that encourages the use of bins with lower utilization levels.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Add a distance penalty term to the scores to encourage items to be placed in bins with lower distances from their target positions\n distance_penalty = 0.1\n scores -= distance_penalty * np.abs(np.arange(len(bins)) - np.argmin(bins))\n \n # Apply a bonus to the scores based on the rest capacity of the bins\n rest_capacity_bonus = 0.1\n scores += rest_capacity_bonus * (bins - item)\n \n return scores",
"objective": 0.00936,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a distance penalty term to the scores to encourage items to be placed in bins with lower distances from their target positions\n distance_penalty = 0.1\n scores -= distance_penalty * np.abs(np.arange(len(bins)) - np.argmin(bins))\n \n # Apply a bonus to the scores based on the rest capacity of the bins\n rest_capacity_bonus = 0.1\n scores += rest_capacity_bonus * (bins - item)\n \n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Using a combination of factors such as item size, rest capacity, and utilization level to calculate the score for each bin.\n\nNew algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"\n\nDescription: This algorithm uses a score function that takes into account the item size, the remaining capacity of the bin, the utilization level of the bin, and the distance between the current bin and the target position of the item. The score function also includes a term that encourages the use of bins with lower utilization levels.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Add a distance penalty term to the scores to encourage items to be placed in bins with lower distances from their target positions\n distance_penalty = 0.1\n scores -= distance_penalty * np.abs(np.arange(len(bins)) - np.argmin(bins))\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Using a combination of factors such as item size, rest capacity, and utilization level to calculate the score for each bin.\n\nNew algorithm: \"Dynamic Score with Item Size Penalty, Rest Capacity Bonus, and Exponential Decay with Adaptive Learning Rate\"\n\nDescription: This algorithm uses a dynamic score function that adaptively learns the weights of the item size penalty, rest capacity bonus, and exponential decay based on the usage history of the bins. The score function also includes a term that encourages the use of bins with lower utilization levels.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base score for each bin\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay factor based on bin usage history\n decay_factor = np.exp(-np.arange(len(bins)) / len(bins))\n scores *= decay_factor\n \n # Use a dynamic learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.5\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Apply an item size penalty term\n item_size_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= item_size_penalty\n \n # Apply a rest capacity bonus term\n rest_capacity_bonus = np.abs(np.arange(len(bins)) - np.argmax(bins))\n scores += rest_capacity_bonus\n \n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization Factor with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the base scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a self-adaptive learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a term to encourage the use of bins with lower utilization levels\n utilization_levels = np.divide(bins, bins.max())\n scores += np.log(utilization_levels)\n \n # Apply an item size penalty term\n item_size_penalty = np.abs(np.arange(len(bins)) - np.argmin(bins))\n scores -= item_size_penalty\n \n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "def score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a fixed learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a distance penalty term to the scores\n distance_penalty = 1 - np.exp(-np.abs(bins - item) / item)\n scores -= distance_penalty\n \n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a fixed learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n # Add a distance penalty term to the scores\n distance_penalty = 1 - np.exp(-np.abs(bins - item) / 10)\n scores -= distance_penalty\n \n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Item Size-Based Score with Rest Capacity Bonus, Distance Penalty, and Bin Utilization with Exponential Decay and Self-Adaptive Learning Rate\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the initial scores\n scores = bins / (bins - item) - np.arange(len(bins)) + bins\n \n # Apply exponential decay to the scores\n decay_factor = 0.95\n scores *= decay_factor ** np.arange(len(bins))\n \n # Use a fixed learning rate to adjust the weight of the utilization level in the score calculation\n learning_rate = 0.1\n scores += learning_rate * np.log(bins / bins.max())\n \n return scores",
"objective": 0.01067,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_16.json
================================================
[
{
"algorithm": "My new algorithm calculates the scores for each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, aiming to evenly distribute the items and minimize the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space. Additionally, the algorithm incorporates a logarithmic function and a weighted factor to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + np.log(remaining_capacity) + np.cos(num_assigned_items) - np.log2(bins)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with higher capacities, promoting a more balanced distribution and efficient use of space. To promote performance and avoid utilizing the random component, I will implement the new algorithm using Numpy arrays and vectorized operations.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log10(remaining_capacity) * np.log2(num_assigned_items) - np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a more balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log2(remaining_capacity) * np.log10(num_assigned_items) + np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a power penalty term that favors bins with lower capacities, promoting a more efficient use of space.\n\nPython implementation:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.power(remaining_capacity, 0.5) + np.sqrt(num_assigned_items)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on their current capacity, the size of the item, and a penalty term that takes into account both the number of already assigned items to each bin and the exponential of the square root of the ratio between the bin's remaining capacity and the maximum capacity, with the goal of evenly distributing the items among bins and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n ratio = remaining_capacity / max_capacity\n\n scores = item / remaining_capacity + ratio * num_assigned_items + np.exp(-remaining_capacity / max_capacity) + np.cos(num_assigned_items) + np.exp(np.sqrt(ratio))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with higher capacities, promoting a more balanced distribution. Additionally, the algorithm incorporates a combination of exponential, logarithmic, and trigonometric functions to optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + remaining_capacity / np.max(bins) * num_assigned_items\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, and a penalty term that takes into account the number of already assigned items to each bin, with the aim of achieving a balanced distribution of items while minimizing the number of used bins. The algorithm also incorporates a logarithmic transformation of the remaining capacity and item size to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = (item / remaining_capacity) + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log1p(remaining_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assigning scores to bins based on their current capacity, the size of the item, and a penalty term that considers the number of already assigned items to each bin. \n\nNew algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a more efficient use of space.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.log(remaining_capacity) + np.sqrt(num_assigned_items)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more equal distribution. Additionally, the algorithm incorporates a combination of exponential and hyperbolic functions to optimize the assignment, increasing the complexity and performance of the function.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = np.exp(-remaining_capacity) * np.tanh(num_assigned_items)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a more efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.log(remaining_capacity) + 1 / np.sqrt(num_assigned_items)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on their current capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items among bins and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n num_assigned_items = max_capacity - (bins - item)\n\n scores = item / (bins - item) + (bins - item) / max_capacity * num_assigned_items + np.sqrt(bins - item / max_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the remaining capacity of each bin, the size of the item, the number of assigned items, and a penalty term that favors bins with lower capacities, promoting a more efficient use of space while maintaining a balanced distribution.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n penalty = np.log(1 + remaining_capacity / np.max(bins))\n\n scores = (item / remaining_capacity) + (remaining_capacity / np.max(bins)) * num_assigned_items + penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic term that favors bins with higher capacities, promoting a more balanced distribution and efficient use of space. Implement the algorithm using vectorized operations for improved performance.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log(remaining_capacity) / np.log(np.max(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, and a penalty term that takes into account the number of already assigned items to each bin, with the aim of achieving a balanced distribution of items while minimizing the number of used bins. The algorithm also incorporates a logarithmic transformation of the remaining capacity and item size to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n assigned_items = np.max(bins) - remaining_capacities - 1\n\n scores = (item / remaining_capacities) + (remaining_capacities / np.max(bins)) * assigned_items + np.log1p(remaining_capacities) + np.cos(assigned_items)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Algorithm description: My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with higher capacities, promoting a more balanced distribution. Additionally, the algorithm incorporates a combination of logarithmic and trigonometric functions to optimize the assignment, increasing the complexity and performance of the function.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = np.log(remaining_capacity) * np.sin(num_assigned_items)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a power-law penalty term that favors bins with lower capacities, promoting a more efficient use of space while ensuring a balanced distribution.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = (remaining_capacity / max_capacity) ** 2\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to promote the utilization of larger capacity bins while still maintaining a balanced distribution of items. \n\nAlgorithm description:\n1. Calculate the maximum capacity of the bins.\n2. Calculate the remaining capacity of each bin after assigning the item.\n3. Calculate the penalty term that favors bins with lower capacities.\n4. Calculate the number of assigned items in each bin.\n5. Calculate the scores for each bin based on a combination of the item size, remaining capacity, penalty term, and number of assigned items.\n6. Return the scores for the bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.exp(-remaining_capacity / np.max(bins)) + np.sin(-num_assigned_items)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm involves assigning scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the objective of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more equal distribution. Additionally, the algorithm incorporates a combination of logarithmic and trigonometric functions to optimize the assignment, increasing the complexity and performance of the function.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = np.log1p(remaining_capacity) * np.sin(num_assigned_items)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to promote the utilization of larger capacity bins while still maintaining a balanced distribution of items. \n\nAlgorithm description:\n1. Calculate the maximum capacity of the bins.\n2. Calculate the remaining capacity of each bin after assigning the item.\n3. Calculate the penalty term that favors bins with lower capacities.\n4. Calculate the number of assigned items in each bin.\n5. Calculate the scores for each bin based on a combination of the item size, remaining capacity, penalty term, and number of assigned items.\n6. Return the scores for the bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n scaling_factor = 1 / np.sqrt(max_capacity) # Adjust the scaling factor as per your requirements\n penalty_term = scaling_factor / np.sqrt(remaining_capacity)\n\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.exp(-remaining_capacity / max_capacity) + np.sin(-num_assigned_items) + penalty_term\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "The new algorithm incorporates a combination of exponential, logarithmic, and trigonometric functions to assign scores to each bin based on the remaining capacity, item size, and a penalty term that favors bins with lower capacities, with the goal of achieving a balanced distribution and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = np.exp(-remaining_capacity / max_capacity) * np.log1p(num_assigned_items) + np.sin(num_assigned_items) - np.cos(remaining_capacity)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00835,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_17.json
================================================
[
{
"algorithm": "My new algorithm calculates the scores for each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, aiming to evenly distribute the items and minimize the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space. Additionally, the algorithm incorporates a logarithmic function and a weighted factor to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + np.log(remaining_capacity) + np.cos(num_assigned_items) - np.log2(bins)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with higher capacities, promoting a more balanced distribution and efficient use of space. To promote performance and avoid utilizing the random component, I will implement the new algorithm using Numpy arrays and vectorized operations.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log10(remaining_capacity) * np.log2(num_assigned_items) - np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a more balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log2(remaining_capacity) * np.log10(num_assigned_items) + np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a power penalty term that favors bins with lower capacities, promoting a more efficient use of space.\n\nPython implementation:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.power(remaining_capacity, 0.5) + np.sqrt(num_assigned_items)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on their current capacity, the size of the item, and a penalty term that takes into account both the number of already assigned items to each bin and the exponential of the square root of the ratio between the bin's remaining capacity and the maximum capacity, with the goal of evenly distributing the items among bins and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n ratio = remaining_capacity / max_capacity\n\n scores = item / remaining_capacity + ratio * num_assigned_items + np.exp(-remaining_capacity / max_capacity) + np.cos(num_assigned_items) + np.exp(np.sqrt(ratio))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with higher capacities, promoting a more balanced distribution. Additionally, the algorithm incorporates a combination of exponential, logarithmic, and trigonometric functions to optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + remaining_capacity / np.max(bins) * num_assigned_items\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, and a penalty term that takes into account the number of already assigned items to each bin, with the aim of achieving a balanced distribution of items while minimizing the number of used bins. The algorithm also incorporates a logarithmic transformation of the remaining capacity and item size to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = (item / remaining_capacity) + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log1p(remaining_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Common backbone idea: Assigning scores to bins based on their current capacity, the size of the item, and a penalty term that considers the number of already assigned items to each bin. \n\nNew algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a more efficient use of space.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.log(remaining_capacity) + np.sqrt(num_assigned_items)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more equal distribution. Additionally, the algorithm incorporates a combination of exponential and hyperbolic functions to optimize the assignment, increasing the complexity and performance of the function.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = np.exp(-remaining_capacity) * np.tanh(num_assigned_items)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a more efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.log(remaining_capacity) + 1 / np.sqrt(num_assigned_items)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on their current capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items among bins and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n num_assigned_items = max_capacity - (bins - item)\n\n scores = item / (bins - item) + (bins - item) / max_capacity * num_assigned_items + np.sqrt(bins - item / max_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on the remaining capacity of each bin, the size of the item, the number of assigned items, and a penalty term that favors bins with lower capacities, promoting a more efficient use of space while maintaining a balanced distribution.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n penalty = np.log(1 + remaining_capacity / np.max(bins))\n\n scores = (item / remaining_capacity) + (remaining_capacity / np.max(bins)) * num_assigned_items + penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic term that favors bins with higher capacities, promoting a more balanced distribution and efficient use of space. Implement the algorithm using vectorized operations for improved performance.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log(remaining_capacity) / np.log(np.max(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, and a penalty term that takes into account the number of already assigned items to each bin, with the aim of achieving a balanced distribution of items while minimizing the number of used bins. The algorithm also incorporates a logarithmic transformation of the remaining capacity and item size to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n assigned_items = np.max(bins) - remaining_capacities - 1\n\n scores = (item / remaining_capacities) + (remaining_capacities / np.max(bins)) * assigned_items + np.log1p(remaining_capacities) + np.cos(assigned_items)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "Backbone idea: The provided algorithms assign scores to bins based on the remaining capacity of each bin, the size of the item, and some penalty terms that consider the number of assigned items and the ratio of capacities.\n\nNew algorithm description: Assign scores to bins by combining the item size, the remaining capacity of each bin, a penalty term based on the difference between the maximum capacity and the remaining capacity, and a term that promotes a more balanced distribution of items among the bins. Implement the algorithm using efficient numpy operations for improved performance.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n ratio_capacity = remaining_capacity / np.max(bins)\n\n scores = item / remaining_capacity + ratio_capacity * num_assigned_items + (np.log(remaining_capacity) / np.log(np.max(bins))) * (1 - ratio_capacity)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a power-law penalty term that favors bins with lower capacities, promoting a more efficient use of space while ensuring a balanced distribution.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = (remaining_capacity / max_capacity) ** 2\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to promote the utilization of larger capacity bins while still maintaining a balanced distribution of items. \n\nAlgorithm description:\n1. Calculate the maximum capacity of the bins.\n2. Calculate the remaining capacity of each bin after assigning the item.\n3. Calculate the penalty term that favors bins with lower capacities.\n4. Calculate the number of assigned items in each bin.\n5. Calculate the scores for each bin based on a combination of the item size, remaining capacity, penalty term, and number of assigned items.\n6. Return the scores for the bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.exp(-remaining_capacity / np.max(bins)) + np.sin(-num_assigned_items)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm involves assigning scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the objective of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more equal distribution. Additionally, the algorithm incorporates a combination of logarithmic and trigonometric functions to optimize the assignment, increasing the complexity and performance of the function.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = np.log1p(remaining_capacity) * np.sin(num_assigned_items)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, and the number of assigned items. It will also include a penalty term that penalizes bins with smaller capacities to encourage a more balanced distribution of items. To further promote efficient use of space, the penalty term will be modified to have an exponential decay with respect to the remaining capacity, and an additional term will be introduced to penalize bins with a large number of assigned items.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.exp(-remaining_capacity / np.max(bins)) * np.log2(num_assigned_items) + np.exp(-num_assigned_items / np.max(bins))\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "The new algorithm incorporates a combination of exponential, logarithmic, and trigonometric functions to assign scores to each bin based on the remaining capacity, item size, and a penalty term that favors bins with lower capacities, with the goal of achieving a balanced distribution and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = np.exp(-remaining_capacity / max_capacity) * np.log1p(num_assigned_items) + np.sin(num_assigned_items) - np.cos(remaining_capacity)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00835,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_18.json
================================================
[
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and penalty terms that favor certain properties of the bins.}\n\n## Algorithm Description:\n{Assign scores to bins based on the bin's remaining capacity, the item size, the number of assigned items, a logarithmic penalty term that favors bins with higher capacities, and a trigonometric penalty term that favors bins with lower capacities, promoting a balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log10(remaining_capacity) * np.log2(num_assigned_items) - np.exp(-np.max(bins) / remaining_capacity) + np.sin(np.pi * remaining_capacity / np.max(bins))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, aiming to evenly distribute the items and minimize the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space. Additionally, the algorithm incorporates a logarithmic function and a weighted factor to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + np.log(remaining_capacity) + np.cos(num_assigned_items) - np.log2(bins)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with higher capacities, promoting a more balanced distribution and efficient use of space. To promote performance and avoid utilizing the random component, I will implement the new algorithm using Numpy arrays and vectorized operations.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log10(remaining_capacity) * np.log2(num_assigned_items) - np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a more balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log2(remaining_capacity) * np.log10(num_assigned_items) + np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a power penalty term that favors bins with lower capacities, promoting a more efficient use of space.\n\nPython implementation:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.power(remaining_capacity, 0.5) + np.sqrt(num_assigned_items)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on their current capacity, the size of the item, and a penalty term that takes into account both the number of already assigned items to each bin and the exponential of the square root of the ratio between the bin's remaining capacity and the maximum capacity, with the goal of evenly distributing the items among bins and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n ratio = remaining_capacity / max_capacity\n\n scores = item / remaining_capacity + ratio * num_assigned_items + np.exp(-remaining_capacity / max_capacity) + np.cos(num_assigned_items) + np.exp(np.sqrt(ratio))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with higher capacities, promoting a more balanced distribution. Additionally, the algorithm incorporates a combination of exponential, logarithmic, and trigonometric functions to optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + remaining_capacity / np.max(bins) * num_assigned_items\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic term that favors bins with lower capacities, promoting a more balanced distribution and efficient use of space.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log(1/(remaining_capacity+1)) / np.log(np.max(bins)+1)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The provided algorithms assign scores to bins based on a combination of the bin's remaining capacity, the item size, and the number of assigned items.\n\nNew algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a hyperbolic function that favors bins with lower capacities, promoting a more equal distribution and efficient use of space.\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = (item / remaining_capacity) + (remaining_capacity / np.max(bins)) * num_assigned_items + np.tanh(remaining_capacity)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more equal distribution. Additionally, the algorithm incorporates a combination of exponential and hyperbolic functions to optimize the assignment, increasing the complexity and performance of the function.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = np.exp(-remaining_capacity) * np.tanh(num_assigned_items)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin and the logarithm of the remaining capacity, with the goal of promoting a balanced distribution and minimizing the number of used bins without compromising the utilization of larger capacity bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log(remaining_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on their current capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items among bins and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n num_assigned_items = max_capacity - (bins - item)\n\n scores = item / (bins - item) + (bins - item) / max_capacity * num_assigned_items + np.sqrt(bins - item / max_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, the number of already assigned items, and a hyperbolic penalty term that favors bins with higher capacities, promoting a more balanced distribution of items while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n penalty = np.tanh(remaining_capacity)\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items - penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on the combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic term that favors bins with higher capacities, promoting a more balanced distribution and efficient use of space. Implement the algorithm using vectorized operations for improved performance.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log(remaining_capacity) / np.log(np.max(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, and a penalty term that takes into account the number of already assigned items to each bin, with the aim of achieving a balanced distribution of items while minimizing the number of used bins. The algorithm also incorporates a logarithmic transformation of the remaining capacity and item size to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n assigned_items = np.max(bins) - remaining_capacities - 1\n\n scores = (item / remaining_capacities) + (remaining_capacities / np.max(bins)) * assigned_items + np.log1p(remaining_capacities) + np.cos(assigned_items)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the bin's remaining capacity, the item size, and the number of assigned items, and incorporates a penalty term that penalizes bins with a large number of assigned items and a linear transformation of the remaining capacity to optimize the assignment while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + 2 * np.sin(remaining_capacity / np.max(bins)) + 3 * np.sqrt(num_assigned_items / np.max(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a power-law penalty term that favors bins with lower capacities, promoting a more efficient use of space while ensuring a balanced distribution.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = (remaining_capacity / max_capacity) ** 2\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to promote the utilization of larger capacity bins while still maintaining a balanced distribution of items. \n\nAlgorithm description:\n1. Calculate the maximum capacity of the bins.\n2. Calculate the remaining capacity of each bin after assigning the item.\n3. Calculate the penalty term that favors bins with lower capacities.\n4. Calculate the number of assigned items in each bin.\n5. Calculate the scores for each bin based on a combination of the item size, remaining capacity, penalty term, and number of assigned items.\n6. Return the scores for the bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n num_assigned_items = np.max(bins) - (bins - item)\n\n scores = item / (bins - item) + ((bins - item) / np.max(bins)) * num_assigned_items + np.exp(-(bins - item) / np.max(bins)) + np.sin(-num_assigned_items)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that penalizes bins with higher capacities and promotes a more balanced distribution.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = -1 * np.log(remaining_capacity / max_capacity)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, and the number of assigned items. It will also include a penalty term that penalizes bins with smaller capacities to encourage a more balanced distribution of items. To further promote efficient use of space, the penalty term will be modified to have an exponential decay with respect to the remaining capacity, and an additional term will be introduced to penalize bins with a large number of assigned items.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.exp(-remaining_capacity / np.max(bins)) * np.log2(num_assigned_items) + np.exp(-num_assigned_items / np.max(bins))\n return scores",
"objective": 0.00825,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_19.json
================================================
[
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and penalty terms that favor certain properties of the bins.}\n\n## Algorithm Description:\n{Assign scores to bins based on the bin's remaining capacity, the item size, the number of assigned items, a logarithmic penalty term that favors bins with higher capacities, and a trigonometric penalty term that favors bins with lower capacities, promoting a balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log10(remaining_capacity) * np.log2(num_assigned_items) - np.exp(-np.max(bins) / remaining_capacity) + np.sin(np.pi * remaining_capacity / np.max(bins))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, aiming to evenly distribute the items and minimize the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space. Additionally, the algorithm incorporates a logarithmic function and a weighted factor to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + np.log(remaining_capacity) + np.cos(num_assigned_items) - np.log2(bins)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with higher capacities, promoting a more balanced distribution and efficient use of space. To promote performance and avoid utilizing the random component, I will implement the new algorithm using Numpy arrays and vectorized operations.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log10(remaining_capacity) * np.log2(num_assigned_items) - np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a more balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log2(remaining_capacity) * np.log10(num_assigned_items) + np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a power penalty term that favors bins with lower capacities, promoting a more efficient use of space.\n\nPython implementation:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.power(remaining_capacity, 0.5) + np.sqrt(num_assigned_items)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, and a penalty term that takes into account the number of already assigned items to each bin, with the aim of achieving a balanced distribution of items while minimizing the number of used bins. The algorithm also incorporates a logistic transformation of the remaining capacity and item size, as well as a sine function of the assigned items, to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n assigned_items = np.max(bins) - remaining_capacities - 1\n\n scores = (item / remaining_capacities) + (remaining_capacities / np.max(bins)) * assigned_items + np.log(remaining_capacities + 1) + np.sin(assigned_items)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with higher capacities, promoting a more balanced distribution. Additionally, the algorithm incorporates a combination of exponential, logarithmic, and trigonometric functions to optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + remaining_capacity / np.max(bins) * num_assigned_items\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The provided algorithms assign scores to bins based on a combination of the bin's remaining capacity, the item size, and the number of assigned items.\n\nNew algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, and a hyperbolic tangent function that promotes a more equal distribution and efficient use of space, while also incorporating a logarithmic penalty term that favors bins with higher capacities.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.tanh(remaining_capacity) + np.log(remaining_capacity)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm description",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.tanh(remaining_capacity)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Based on the common backbone idea in the provided algorithms, the new algorithm assigns scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with higher capacities, promoting a balanced distribution and efficient use of space.\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log(remaining_capacity) + np.log(num_assigned_items)\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin and the logarithm of the remaining capacity, with the goal of promoting a balanced distribution and minimizing the number of used bins without compromising the utilization of larger capacity bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log(remaining_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on their current capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items among bins and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n num_assigned_items = max_capacity - (bins - item)\n\n scores = item / (bins - item) + (bins - item) / max_capacity * num_assigned_items + np.sqrt(bins - item / max_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, the number of already assigned items, and a hyperbolic penalty term that favors bins with higher capacities, promoting a more balanced distribution of items while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n penalty = np.tanh(remaining_capacity)\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items - penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = (item * remaining_capacity * num_assigned_items) * (1 / np.log(1 + remaining_capacity))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, and a penalty term that takes into account the number of already assigned items to each bin, with the aim of achieving a balanced distribution of items while minimizing the number of used bins. The algorithm also incorporates a logarithmic transformation of the remaining capacity and item size to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n assigned_items = np.max(bins) - remaining_capacities - 1\n\n scores = (item / remaining_capacities) + (remaining_capacities / np.max(bins)) * assigned_items + np.log1p(remaining_capacities) + np.cos(assigned_items)\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the bin's remaining capacity, the item size, and the number of assigned items, and incorporates a penalty term that penalizes bins with a large number of assigned items and a linear transformation of the remaining capacity to optimize the assignment while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + 2 * np.sin(remaining_capacity / np.max(bins)) + 3 * np.sqrt(num_assigned_items / np.max(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, and the number of assigned items. It will also include a penalty term that penalizes bins with smaller capacities to encourage a more balanced distribution of items. To further promote efficient use of space, the penalty term will be modified to have an exponential decay with respect to the remaining capacity, and an additional term will be introduced to penalize bins with a large number of assigned items.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + remaining_capacity / np.max(bins) * num_assigned_items + num_assigned_items / np.max(bins)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to promote the utilization of larger capacity bins while still maintaining a balanced distribution of items. \n\nAlgorithm description:\n1. Calculate the maximum capacity of the bins.\n2. Calculate the remaining capacity of each bin after assigning the item.\n3. Calculate the penalty term that favors bins with lower capacities.\n4. Calculate the number of assigned items in each bin.\n5. Calculate the scores for each bin based on a combination of the item size, remaining capacity, penalty term, and number of assigned items.\n6. Return the scores for the bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n num_assigned_items = np.max(bins) - (bins - item)\n\n scores = item / (bins - item) + ((bins - item) / np.max(bins)) * num_assigned_items + np.exp(-(bins - item) / np.max(bins)) + np.sin(-num_assigned_items)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that penalizes bins with higher capacities and promotes a more balanced distribution.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = -1 * np.log(remaining_capacity / max_capacity)\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, and the number of assigned items. It will also include a penalty term that penalizes bins with smaller capacities to encourage a more balanced distribution of items. To further promote efficient use of space, the penalty term will be modified to have an exponential decay with respect to the remaining capacity, and an additional term will be introduced to penalize bins with a large number of assigned items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scaling_factor = np.max(bins)\n scores = item / (bins - item) + ((bins - item) / scaling_factor) * (np.max(bins) - (bins - item)) + np.exp(-(bins - item) / scaling_factor) * np.log2((np.max(bins) - (bins - item))) + np.exp(-((np.max(bins) - (bins - item)) / scaling_factor))\n return scores",
"objective": 0.00825,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_2.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item * bins[bins != bins.max()] / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins.max() - bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximize Rest Capacity\" (MRCA). It assigns an item to the bin with the maximum rest capacity, considering the distance between the item size and the bin capacity, and the number of items already in the bin.\n\nHere is the implementation of the MRCA algorithm in Python:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the maximum rest capacity for each bin\n max_rest_capacities = np.max(bins - item)\n # Assign the item to the bin with the maximum rest capacity\n max_rest_capacity_index = np.argmax(max_rest_capacities)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the maximum rest capacity to 0\n scores[max_rest_capacity_index] = 0\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The algorithms assign an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins.\n\nNew algorithm: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin, and the number of items already assigned to each bin.\n\nDescription: The algorithm calculates the distance between the item size and the bin capacity for each bin, and then assigns the item to the bin with the minimum distance. The score for each bin is calculated as the inverse of the distance between the item size and the bin capacity, and is further adjusted based on the number of items already assigned to the bin, and the number of items already assigned to each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Assign the item to the bin with the minimum distance\n min_distance_index = np.argmin(distances)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins == np.max(bins)))\n # Set the score for the bin with the minimum distance to 0\n scores[min_distance_index] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Maximizing the minimum score.\nNew algorithm: \"Minimize the maximum score\".\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Assign the item to the bin with the minimum score\n min_score_index = np.argmin(distances)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the minimum score to 0\n scores[min_score_index] = 0\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins >= item, 0, np.clip(bins / item, 0, None))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the minimum score\"\n\nMain steps:\n\n1. Calculate the ratio of rest capacity of each bin to the item size.\n2. Set the score for bins with equal rest capacity to the maximum capacity as 0.\n3. Calculate the scores for each bin by multiplying the ratios with the inverse of the bin index (i.e., 1/index).\n4. Return the scores.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with the inverse of the bin index\n scores = ratios * (1 / np.arange(1, len(bins)+1))\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / bins[bins != bins.max()])\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the number of items already assigned to each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.log(np.sum(bins <= item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the sum of the squares of the ratios between the item sizes and the rest capacities of the bins, while also considering the number of empty bins and the standard deviation of the remaining bins' capacities.\"\n\nPython function:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / bins\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by squaring the ratios\n scores = ratios ** 2\n \n # Maximize the sum of the scores by assigning the item to the bin with the largest ratio\n max_ratio_index = np.argmax(ratios)\n scores[max_ratio_index] = 0\n \n # Consider the number of empty bins and the standard deviation of the remaining bins' capacities\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n std_capacity = np.std(bins)\n scores -= (num_empty_bins + 1) * (std_capacity / item)\n \n return scores",
"objective": 0.04729,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / bins\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n \n return scores",
"objective": 0.0489,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the number of empty bins to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n scores = np.zeros_like(bins)\n scores[bins > item] = (num_empty_bins + 1) / (bins[bins > item] / item)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the number of empty bins, and the standard deviation of the remaining bins to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the number of empty bins\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n # Calculate the standard deviation of the remaining bins\n std_dev = np.std(bins[bins > item])\n # Calculate the score for each bin\n scores = np.zeros_like(bins)\n scores[bins > item] = (num_empty_bins + 1) / (std_dev / item)\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin, with a focus on minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / bins\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.05121,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the ratio of the item size to the rest capacity of each bin while minimizing the number of used bins.\"\n\nPython function:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / bins\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n # Minimize the number of used bins by assigning the item to the bin with the highest score\n min_score_index = np.argmax(scores)\n \n # Set the score for the bin with the highest score to 0\n scores[min_score_index] = 0\n \n return scores",
"objective": 0.05161,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the number of empty bins, and the standard deviation of the remaining bins' capacities to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n std_capacity = np.std(bins)\n scores = np.zeros_like(bins)\n scores[bins > item] = (num_empty_bins + 1) * (std_capacity / item)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to minimize the number of used bins by calculating a score for each bin based on its capacity and the item size.\n\nNew algorithm: \"Minimize the number of used bins by assigning items to bins with the closest capacity ratio to the item size, while also considering the number of empty bins and the standard deviation of the remaining bins' capacities.\"\n\nPython function:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / bins\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n # Minimize the number of used bins by assigning the item to the bin with the closest capacity ratio to the item size\n min_ratio_index = np.argmin(np.abs(ratios - 1))\n scores[min_ratio_index] = 0\n \n # Consider the number of empty bins and the standard deviation of the remaining bins' capacities\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n std_capacity = np.std(bins)\n scores += (num_empty_bins + 1) * (std_capacity / item)\n \n return scores",
"objective": 0.05393,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_20.json
================================================
[
{
"algorithm": "The common backbone idea in the provided algorithms is to assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and penalty terms that favor certain properties of the bins.}\n\n## Algorithm Description:\n{Assign scores to bins based on the bin's remaining capacity, the item size, the number of assigned items, a logarithmic penalty term that favors bins with higher capacities, and a trigonometric penalty term that favors bins with lower capacities, promoting a balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log10(remaining_capacity) * np.log2(num_assigned_items) - np.exp(-np.max(bins) / remaining_capacity) + np.sin(np.pi * remaining_capacity / np.max(bins))\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the scores for each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, aiming to evenly distribute the items and minimize the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space. Additionally, the algorithm incorporates a logarithmic function and a weighted factor to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + np.log(remaining_capacity) + np.cos(num_assigned_items) - np.log2(bins)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with higher capacities, promoting a more balanced distribution and efficient use of space. To promote performance and avoid utilizing the random component, I will implement the new algorithm using Numpy arrays and vectorized operations.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log10(remaining_capacity) * np.log2(num_assigned_items) - np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a more balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log2(remaining_capacity) * np.log10(num_assigned_items) + np.exp(-np.max(bins) / remaining_capacity)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "New algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a power penalty term that favors bins with lower capacities, promoting a more efficient use of space.\n\nPython implementation:\n\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / max_capacity) * num_assigned_items + np.power(remaining_capacity, 0.5) + np.sqrt(num_assigned_items)\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, and a penalty term that takes into account the number of already assigned items to each bin, with the aim of achieving a balanced distribution of items while minimizing the number of used bins. The algorithm also incorporates a logistic transformation of the remaining capacity and item size, as well as a sine function of the assigned items, to further optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n assigned_items = np.max(bins) - remaining_capacities - 1\n\n scores = (item / remaining_capacities) + (remaining_capacities / np.max(bins)) * assigned_items + np.log(remaining_capacities + 1) + np.sin(assigned_items)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items and minimizing the number of used bins. The penalty term is adjusted to favor bins with higher capacities, promoting a more balanced distribution. Additionally, the algorithm incorporates a combination of exponential, logarithmic, and trigonometric functions to optimize the assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + remaining_capacity / np.max(bins) * num_assigned_items\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Common backbone idea: The provided algorithms assign scores to bins based on a combination of the bin's remaining capacity, the item size, and the number of assigned items.\n\nNew algorithm description: Assign scores to bins based on a combination of the bin's remaining capacity, the item size, and a hyperbolic tangent function that promotes a more equal distribution and efficient use of space, while also incorporating a logarithmic penalty term that favors bins with higher capacities.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.tanh(remaining_capacity) + np.log(remaining_capacity)\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm description",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.tanh(remaining_capacity)\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Common backbone idea in the provided algorithms: The common backbone idea in the provided algorithms is to assign scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a penalty term that promotes a balanced distribution and minimizes the number of used bins.\n\nNew algorithm description: My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, the number of already assigned items, and an exponential penalty term that favors bins with lower capacities, promoting a more balanced distribution and efficient use of space while minimizing the number of used bins.\n\nCode implementation:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n penalty = np.exp(-remaining_capacity)\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + penalty\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin and the logarithm of the remaining capacity, with the goal of promoting a balanced distribution and minimizing the number of used bins without compromising the utilization of larger capacity bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.log(remaining_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on their current capacity, the size of the item, and a penalty term that takes into account the number of already assigned items to each bin, with the goal of evenly distributing the items among bins and minimizing the number of used bins. The penalty term is adjusted to favor bins with lower capacities, promoting a more efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n num_assigned_items = max_capacity - (bins - item)\n\n scores = item / (bins - item) + (bins - item) / max_capacity * num_assigned_items + np.sqrt(bins - item / max_capacity) + np.cos(num_assigned_items)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, the number of already assigned items, and a hyperbolic penalty term that favors bins with higher capacities, promoting a more balanced distribution of items while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n penalty = np.tanh(remaining_capacity)\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items - penalty\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to bins based on the product of the bin's remaining capacity, the item size, the number of assigned items, and a logarithmic penalty term that favors bins with lower capacities, promoting a balanced distribution and efficient use of space.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = (item * remaining_capacity * num_assigned_items) * (1 / np.log(1 + remaining_capacity))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a penalty term that promotes a balanced distribution. It also incorporates a power function to further penalize bins with higher capacities and encourages the use of larger capacity bins for item assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n penalty = np.power(remaining_capacity, -0.5)\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items - penalty\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to bins based on a combination of the bin's remaining capacity, the item size, the number of assigned items, and a modified penalty term that penalizes bins with higher capacities. The modified penalty term will be the reciprocal of the remaining capacity, which ensures that bins with lower capacity receive a higher penalty and encourages a more balanced distribution.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = bins - item\n num_assigned_items = max_capacity - remaining_capacity\n\n penalty = 1 / remaining_capacity\n\n scores = (item / remaining_capacity) + (remaining_capacity / max_capacity) * num_assigned_items + penalty\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "My new algorithm will assign scores to bins based on the bin's remaining capacity, the item size, and the number of assigned items. It will also include a penalty term that penalizes bins with smaller capacities to encourage a more balanced distribution of items. To further promote efficient use of space, the penalty term will be modified to have an exponential decay with respect to the remaining capacity, and an additional term will be introduced to penalize bins with a large number of assigned items.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / (bins - item) + (bins - item) / np.max(bins) * (np.max(bins) - (bins - item)) + (np.max(bins) - (bins - item)) / np.max(bins)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "The new algorithm aims to promote the utilization of larger capacity bins while still maintaining a balanced distribution of items. \n\nAlgorithm description:\n1. Calculate the maximum capacity of the bins.\n2. Calculate the remaining capacity of each bin after assigning the item.\n3. Calculate the penalty term that favors bins with lower capacities.\n4. Calculate the number of assigned items in each bin.\n5. Calculate the scores for each bin based on a combination of the item size, remaining capacity, penalty term, and number of assigned items.\n6. Return the scores for the bins.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n num_assigned_items = np.max(bins) - (bins - item)\n\n scores = item / (bins - item) + ((bins - item) / np.max(bins)) * num_assigned_items + np.exp(-(bins - item) / np.max(bins)) + np.sin(-num_assigned_items)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores to each bin based on a combination of the bin's remaining capacity, the item size, the number of already assigned items, and a trigonometric penalty term that favors bins with higher capacities, promoting a balanced distribution and efficient use of space, while minimizing the number of used bins.\n\nPython implementation:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items + np.sin(remaining_capacity)\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns scores to each bin based on the bin's remaining capacity, the item size, the number of already assigned items, and a logarithmic penalty term, creating a balance between capacity utilization and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n num_assigned_items = np.max(bins) - remaining_capacity\n\n penalty = np.log(remaining_capacity + 1)\n\n scores = item / remaining_capacity + (remaining_capacity / np.max(bins)) * num_assigned_items - penalty\n return scores",
"objective": 0.00825,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_3.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item * bins[bins != bins.max()] / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins.max() - bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as the inverse of its capacity\n scores = 1 / bins\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= distances / bins\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.log(np.sum(bins <= item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= 0.1 * distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins while considering the distance between the item size and the bin capacity, and the number of items already in the bin.\n\nNew algorithm: \"Minimize the number of used bins by considering the distance between the item size and the bin capacity, and the number of items already in the bin, while also using a penalty term for bins with high standard deviation of the remaining bins' capacities, and adjusting the score based on the number of items already assigned to each bin.\"\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, and also using a penalty term for bins with high standard deviation of the remaining bins' capacities, and adjusting the score based on the number of items already assigned to each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the number of items already in each bin\n num_items = np.count_nonzero(bins)\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Calculate the penalty term for bins with high standard deviation of the remaining bins' capacities\n penalty = std_capacity / item\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin, and adding the penalty term\n scores = (1 / distances) * (len(bins) - num_items) + penalty\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(num_items)\n # Assign the item to the bin with the lowest score\n min_score_index = np.argmin(scores)\n # Set the score for the bin with the lowest score to 0\n scores[min_score_index] = 0\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Minimize Wasted Space\" (MWS), assigns an item to the bin with the minimum wasted space, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the minimum wasted space for each bin\n min_wasted_spaces = np.min(bins - item)\n # Assign the item to the bin with the minimum wasted space\n min_wasted_space_index = np.argmin(min_wasted_spaces)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the minimum wasted space to 0\n scores[min_wasted_space_index] = 0\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins while considering the distance between the item size and the bin capacity, and the number of items already assigned to each bin.\n\nNew algorithm: \"Minimize the number of used bins by prioritizing the distance between the item size and the bin capacity, and the number of items already assigned to each bin, while also considering the number of items that can fit in each bin.\"\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin, and the number of items that can fit in each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n # Adjust the score based on the number of items that can fit in each bin\n scores -= np.log(np.sum(bins > item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Maximizing the minimum score.\nNew algorithm: \"Maximize the minimum score with a twist\".\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to maximize the minimum score, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, but with a twist: instead of assigning the item to the bin with the minimum score directly, it first calculates the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin, and then assigns the item to the bin with the highest score.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Assign the item to the bin with the highest score\n max_score_index = np.argmax(scores)\n # Set the score for the bin with the highest score to 0\n scores[max_score_index] = 0\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins >= item, 0, np.clip(bins / item, 0, None))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimize the maximum score\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / bins[bins != bins.max()])\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the number of items already assigned to each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.log(np.sum(bins <= item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the number of used bins by considering the distance between the item size and the bin capacity, and the number of items already in the bin, while also using a reward term for bins with low standard deviation of the remaining bins' capacities, and adjusting the score based on the number of items already assigned to each bin.\"\n\nDescription: The algorithm assigns an item to the bin with the highest score, considering the rest capacity of each bin, in order to maximize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, and also using a reward term for bins with low standard deviation of the remaining bins' capacities, and adjusting the score based on the number of items already assigned to each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the number of items already in each bin\n num_items = np.count_nonzero(bins)\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Calculate the reward term for bins with low standard deviation of the remaining bins' capacities\n reward = std_capacity / item\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin, and adding the reward term\n scores = (1 / distances) * (len(bins) - num_items) + reward\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.log(num_items)\n # Assign the item to the bin with the highest score\n max_score_index = np.argmax(scores)\n # Set the score for the bin with the highest score to 0\n scores[max_score_index] = 0\n return scores",
"objective": 0.04658,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the sum of the squares of the ratios between the item sizes and the rest capacities of the bins, while also considering the number of empty bins and the standard deviation of the remaining bins' capacities.\"\n\nPython function:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / bins\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by squaring the ratios\n scores = ratios ** 2\n \n # Maximize the sum of the scores by assigning the item to the bin with the largest ratio\n max_ratio_index = np.argmax(ratios)\n scores[max_ratio_index] = 0\n \n # Consider the number of empty bins and the standard deviation of the remaining bins' capacities\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n std_capacity = np.std(bins)\n scores -= (num_empty_bins + 1) * (std_capacity / item)\n \n return scores",
"objective": 0.04729,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Minimize the number of used bins by considering the distance between the item size and the bin capacity, the number of items already in the bin, and the standard deviation of the remaining bins' capacities, while also using a penalty term for bins with high standard deviation of the remaining bins' capacities and a bonus term for bins with low standard deviation of the remaining bins' capacities.\"\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, the number of items already in the bin, the standard deviation of the remaining bins' capacities, and a penalty term for bins with high standard deviation of the remaining bins' capacities and a bonus term for bins with low standard deviation of the remaining bins' capacities.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the number of items already in each bin\n num_items = np.count_nonzero(bins)\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Calculate the penalty term for bins with high standard deviation of the remaining bins' capacities\n penalty = std_capacity / item\n # Calculate the bonus term for bins with low standard deviation of the remaining bins' capacities\n bonus = (1 - std_capacity) / item\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin, adding the penalty term, and subtracting the bonus term\n scores = (1 / distances) * (len(bins) - num_items) + penalty - bonus\n # Assign the item to the bin with the lowest score\n min_score_index = np.argmin(scores)\n # Set the score for the bin with the lowest score to 0\n scores[min_score_index] = 0\n return scores",
"objective": 0.04799,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximize the number of used bins by considering the distance between the item size and the bin capacity, and the number of items already in the bin, while also using a reward term for bins with low standard deviation of the remaining bins' capacities.\"\n\nDescription: The algorithm assigns an item to the bin with the highest score, considering the rest capacity of each bin, in order to maximize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, and also using a reward term for bins with low standard deviation of the remaining bins' capacities.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the number of items already in each bin\n num_items = np.count_nonzero(bins)\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Calculate the reward term for bins with low standard deviation of the remaining bins' capacities\n reward = std_capacity / item\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin, and adding the reward term\n scores = (1 / distances) * (len(bins) - num_items) + reward\n # Assign the item to the bin with the highest score\n max_score_index = np.argmax(scores)\n # Set the score for the bin with the highest score to 0\n scores[max_score_index] = 0\n return scores",
"objective": 0.04829,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_4.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item * bins[bins != bins.max()] / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= np.sqrt(distances)\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.log(np.sum(bins <= item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= 0.1 * distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins while considering the distance between the item size and the bin capacity, and the number of items already in the bin.\n\nNew algorithm: \"Minimize the number of used bins by considering the distance between the item size and the bin capacity, and the number of items already in the bin, while also using a penalty term for bins with high standard deviation of the remaining bins' capacities.\"\n\nDescription: The algorithm assigns an item to the bin with the lowest score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, and also using a penalty term for bins with high standard deviation of the remaining bins' capacities.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the number of items already in each bin\n num_items = np.count_nonzero(bins)\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Calculate the penalty term for bins with high standard deviation of the remaining bins' capacities\n penalty = std_capacity / item\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin, and subtracting the penalty term\n scores = (1 / distances) * (len(bins) - num_items) - penalty\n # Assign the item to the bin with the lowest score\n min_score_index = np.argmin(scores)\n # Set the score for the bin with the lowest score to 0\n scores[min_score_index] = 0\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Minimize Wasted Space\" (MWS), assigns an item to the bin with the minimum wasted space, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the minimum wasted space for each bin\n min_wasted_spaces = np.min(bins - item)\n # Assign the item to the bin with the minimum wasted space\n min_wasted_space_index = np.argmin(min_wasted_spaces)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the minimum wasted space to 0\n scores[min_wasted_space_index] = 0\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins while considering the distance between the item size and the bin capacity, and the number of items already assigned to each bin.\n\nNew algorithm: \"Minimize the number of used bins by prioritizing the distance between the item size and the bin capacity, and the number of items already assigned to each bin, while also considering the number of items that can fit in each bin.\"\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin, and the number of items that can fit in each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n # Adjust the score based on the number of items that can fit in each bin\n scores -= np.log(np.sum(bins > item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins.\nNew algorithm: \"Maximize the number of items in each bin while minimizing the number of used bins\".\n\nDescription: The algorithm assigns an item to the bin with the highest score, considering the rest capacity of each bin, in order to maximize the number of items in each bin, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, but with a twist: instead of assigning the item to the bin with the highest score directly, it first calculates the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity, and then assigns the item to the bin with the highest score.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity\n scores = (len(bins) - np.count_nonzero(bins)) / distances\n # Assign the item to the bin with the highest score\n max_score_index = np.argmax(scores)\n # Set the score for the bin with the highest score to 0\n scores[max_score_index] = 0\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Binning with Optimal Fit\" (BOF)\nBOF assigns an item to the bin with the optimal fit based on the item size and the rest capacity of each bin, while also considering the number of items already in the bin and the standard deviation of the remaining bins' capacities.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= 0.1 * distances\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Adjust the score based on the standard deviation of the remaining bins' capacities\n scores += 0.1 * std_capacity\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Set the score for the bin with the optimal fit to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimize the maximum score\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / bins[bins != bins.max()])\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximize the sum of the squares of the ratios between the item sizes and the rest capacities of the bins, while also considering the number of empty bins and the standard deviation of the remaining bins' capacities, and also using a penalty term for bins with high standard deviation of the remaining bins' capacities and a bonus term for bins with low standard deviation of the remaining bins' capacities, and also considering the number of items already assigned to each bin.\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity of each bin\n ratios = item / bins\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by squaring the ratios\n scores = ratios ** 2\n \n # Maximize the sum of the scores by assigning the item to the bin with the largest ratio\n max_ratio_index = np.argmax(ratios)\n scores[max_ratio_index] = 0\n \n # Consider the number of empty bins and the standard deviation of the remaining bins' capacities\n num_empty_bins = np.count_nonzero(bins == np.max(bins))\n std_capacity = np.std(bins)\n scores -= (num_empty_bins + 1) * (std_capacity / item)\n \n # Use a penalty term for bins with high standard deviation of the remaining bins' capacities\n penalty = std_capacity / item\n scores += penalty\n \n # Use a bonus term for bins with low standard deviation of the remaining bins' capacities\n bonus = (1 - std_capacity) / item\n scores -= bonus\n \n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size, the rest capacity of each bin, and the number of items already assigned to each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.log(np.sum(bins <= item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins while considering the distance between the item size and the bin capacity, the number of items already in the bin, and the standard deviation of the remaining bins' capacities.\n\nNew algorithm: \"Minimize the number of used bins by considering the distance between the item size and the bin capacity, the number of items already in the bin, and the standard deviation of the remaining bins' capacities, while also using a penalty term for bins with high standard deviation of the remaining bins' capacities and a bonus term for bins with low standard deviation of the remaining bins' capacities, and also considering the number of items already assigned to each bin.\"\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, the number of items already in the bin, the standard deviation of the remaining bins' capacities, and a penalty term for bins with high standard deviation of the remaining bins' capacities and a bonus term for bins with low standard deviation of the remaining bins' capacities, and also considering the number of items already assigned to each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the number of items already in each bin\n num_items = np.count_nonzero(bins)\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Calculate the penalty term for bins with high standard deviation of the remaining bins' capacities\n penalty = std_capacity / item\n # Calculate the bonus term for bins with low standard deviation of the remaining bins' capacities\n bonus = (1 - std_capacity) / item\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin, adding the penalty term, and subtracting the bonus term\n scores = (1 / distances) * (len(bins) - num_items) + penalty - bonus\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Set the score for the bin with the lowest score to 0\n scores[np.argmin(scores)] = 0\n return scores",
"objective": 0.04598,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Balanced Distribution\" (BALD), assigns an item to the bin with the balanced distribution of the item sizes and the rest capacities of the bins, while also considering the number of items already in the bin and the standard deviation of the remaining bins' capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the balance score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n balance_scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Adjust the balance score based on the standard deviation of the remaining bins' capacities\n balance_scores += 0.1 * std_capacity\n # Calculate the score for each bin as the inverse of the balance score\n scores = 1 / balance_scores\n # Set the score for the bin with the optimal balance to 0\n scores[np.argmin(balance_scores)] = 0\n return scores",
"objective": 0.04658,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_5.json
================================================
[
{
"algorithm": "The new algorithm uses a combination of the item's size and the distance between the item's size and the bin's capacity to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size and the distance\n scores = np.log(item / distances)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item * bins[bins != bins.max()] / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Maximum Spread\" (MS), assigns an item to the bin with the maximum spread of item sizes, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the spread of item sizes for each bin\n spreads = np.var(bins)\n # Assign the item to the bin with the maximum spread of item sizes\n max_spread_index = np.argmax(spreads)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the spread of item sizes\n scores = (1 / distances) * spreads\n # Set the score for the bin with the maximum spread of item sizes to 0\n scores[max_spread_index] = 0\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as 0\n scores = np.zeros_like(bins)\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = bins - item\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.sum(bins <= item)\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum Score with Bin Size Penalty\". It penalizes bins based on their sizes to encourage using smaller bins first.\n\nHere is the implementation in Python:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n # Add a penalty term based on the size of the bin\n penalty = (bins - min(bins)) / (max(bins) - min(bins))\n scores += penalty\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item's size, the distance between the item's size and the bin's capacity, and the standard deviation of the remaining bins' capacities to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n \n # Calculate the score based on the item's size, the distance, and the standard deviation\n scores = np.log(item / distances) + np.log(distances / std_capacity)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The algorithm uses a combination of the item size, the number of items already in the bin, and the standard deviation of the remaining bins' capacities to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the number of items already in each bin\n num_items = np.count_nonzero(bins)\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin, and subtracting the standard deviation of the remaining bins' capacities\n scores = (1 / distances) * (len(bins) - num_items) - std_capacity\n # Set the score for the bin with the lowest score to 0\n min_score_index = np.argmin(scores)\n scores[min_score_index] = 0\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Minimize Wasted Space\" (MWS), assigns an item to the bin with the minimum wasted space, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the minimum wasted space for each bin\n min_wasted_spaces = np.min(bins - item)\n # Assign the item to the bin with the minimum wasted space\n min_wasted_space_index = np.argmin(min_wasted_spaces)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the minimum wasted space to 0\n scores[min_wasted_space_index] = 0\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": " New algorithm: Bin Packing with Adaptive Scoring and Item Size Weighting (BPAS-ISW)\n\nMain steps:\n\n1. Initialize the scores for each bin as a constant value.\n2. Calculate the absolute difference between the item size and the bin capacity for each bin.\n3. Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size.\n4. Adjust the score based on the number of items already assigned to each bin.\n5. Adjust the score based on the total capacity of the bins.\n6. Set the score for the bin with the minimum distance to 0.\n7. Adapt the score based on the number of items already in the bin.\n8. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size\n scores -= 0.1 * distances * item\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Adjust the score based on the total capacity of the bins\n scores += 0.1 * np.log(np.sum(bins))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n # Adapt the score based on the number of items already in the bin\n scores += 0.1 * np.log(np.sum(bins == item))\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins while considering the distance between the item size and the bin capacity, and the number of items already assigned to each bin.\n\nNew algorithm: \"Minimize the number of used bins by prioritizing the distance between the item size and the bin capacity, and the number of items already assigned to each bin, while also considering the number of items that can fit in each bin.\"\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin, and the number of items that can fit in each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n # Adjust the score based on the number of items that can fit in each bin\n scores -= np.log(np.sum(bins > item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins.\nNew algorithm: \"Maximize the number of items in each bin while minimizing the number of used bins\".\n\nDescription: The algorithm assigns an item to the bin with the highest score, considering the rest capacity of each bin, in order to maximize the number of items in each bin, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, but with a twist: instead of assigning the item to the bin with the highest score directly, it first calculates the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity, and then assigns the item to the bin with the highest score.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity\n scores = (len(bins) - np.count_nonzero(bins)) / distances\n # Assign the item to the bin with the highest score\n max_score_index = np.argmax(scores)\n # Set the score for the bin with the highest score to 0\n scores[max_score_index] = 0\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Binning with Optimal Fit\" (BOF)\nBOF assigns an item to the bin with the optimal fit based on the item size and the rest capacity of each bin, while also considering the number of items already in the bin and the standard deviation of the remaining bins' capacities.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= 0.1 * distances\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Adjust the score based on the standard deviation of the remaining bins' capacities\n scores += 0.1 * std_capacity\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Set the score for the bin with the optimal fit to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(bins >= item, 1, 0)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Binning with Optimal Fit and Standard Deviation\" (BOFD)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= 0.1 * distances\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Adjust the score based on the standard deviation of the remaining bins' capacities\n scores += 0.1 * std_capacity\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Set the score for the bin with the optimal fit to 0\n scores[np.argmin(distances)] = 0\n # Calculate the standard deviation of the scores\n std_scores = np.std(scores)\n # Adjust the score based on the standard deviation of the scores\n scores += 0.1 * std_scores\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimize the maximum score\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04246,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_6.json
================================================
[
{
"algorithm": "The new algorithm uses a combination of the item's size and the distance between the item's size and the bin's capacity to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size and the distance\n scores = np.log(item / distances)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item * bins[bins != bins.max()] / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Maximum Spread\" (MS), assigns an item to the bin with the maximum spread of item sizes, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the spread of item sizes for each bin\n spreads = np.var(bins)\n # Assign the item to the bin with the maximum spread of item sizes\n max_spread_index = np.argmax(spreads)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the spread of item sizes\n scores = (1 / distances) * spreads\n # Set the score for the bin with the maximum spread of item sizes to 0\n scores[max_spread_index] = 0\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as 0\n scores = np.zeros_like(bins)\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = bins - item\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.sum(bins <= item)\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "My new algorithm is called \"Maximum Score with Item Size Bonus\". It rewards bins based on their sizes to encourage using larger bins when possible.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n # Add a bonus term based on the size of the bin\n bonus = (bins - min(bins)) / (max(bins) - min(bins))\n scores += bonus\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item's size, the distance between the item's size and the bin's capacity, and the standard deviation of the remaining bins' capacities to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n \n # Calculate the score based on the item's size, the distance, and the standard deviation\n scores = np.log(item / distances) + np.log(distances / std_capacity)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: Bin Packing with Adaptive Scoring and Item Size Weighting (BPAS-ISW)\n\nMain steps:\n\n1. Initialize the scores for each bin as a constant value.\n2. Calculate the absolute difference between the item size and the bin capacity for each bin.\n3. Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size.\n4. Adjust the score based on the number of items already assigned to each bin.\n5. Adjust the score based on the total capacity of the bins.\n6. Set the score for the bin with the minimum distance to 0.\n7. Adapt the score based on the number of items already in the bin.\n8. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the Euclidean distance between the item size and the bin capacity for each bin\n distances = np.sqrt((bins - item)**2)\n # Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size\n scores -= 0.1 * distances * item\n # Set the score for the bin with the minimum distance to a small negative value\n scores[np.argmin(distances)] = -0.1\n # Adapt the score based on the number of items already in the bin, but only for bins with a similar size to the current item\n scores += 0.1 * np.log(np.sum(bins == item))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Minimize Wasted Space\" (MWS), assigns an item to the bin with the minimum wasted space, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the minimum wasted space for each bin\n min_wasted_spaces = np.min(bins - item)\n # Assign the item to the bin with the minimum wasted space\n min_wasted_space_index = np.argmin(min_wasted_spaces)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the minimum wasted space to 0\n scores[min_wasted_space_index] = 0\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": " New algorithm: Bin Packing with Adaptive Scoring and Item Size Weighting (BPAS-ISW)\n\nMain steps:\n\n1. Initialize the scores for each bin as a constant value.\n2. Calculate the absolute difference between the item size and the bin capacity for each bin.\n3. Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size.\n4. Adjust the score based on the number of items already assigned to each bin.\n5. Adjust the score based on the total capacity of the bins.\n6. Set the score for the bin with the minimum distance to 0.\n7. Adapt the score based on the number of items already in the bin.\n8. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size\n scores -= 0.1 * distances * item\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Adjust the score based on the total capacity of the bins\n scores += 0.1 * np.log(np.sum(bins))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n # Adapt the score based on the number of items already in the bin\n scores += 0.1 * np.log(np.sum(bins == item))\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins while considering the distance between the item size and the bin capacity, and the number of items already assigned to each bin.\n\nNew algorithm: \"Minimize the number of used bins by prioritizing the distance between the item size and the bin capacity, and the number of items already assigned to each bin, while also considering the number of items that can fit in each bin.\"\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin, and the number of items that can fit in each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n # Adjust the score based on the number of items that can fit in each bin\n scores -= np.log(np.sum(bins > item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins.\nNew algorithm: \"Maximize the number of items in each bin while minimizing the number of used bins\".\n\nDescription: The algorithm assigns an item to the bin with the highest score, considering the rest capacity of each bin, in order to maximize the number of items in each bin, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, but with a twist: instead of assigning the item to the bin with the highest score directly, it first calculates the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity, and then assigns the item to the bin with the highest score.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity\n scores = (len(bins) - np.count_nonzero(bins)) / distances\n # Assign the item to the bin with the highest score\n max_score_index = np.argmax(scores)\n # Set the score for the bin with the highest score to 0\n scores[max_score_index] = 0\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Binning with Optimal Fit\" (BOF)\nBOF assigns an item to the bin with the optimal fit based on the item size and the rest capacity of each bin, while also considering the number of items already in the bin and the standard deviation of the remaining bins' capacities.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= 0.1 * distances\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Adjust the score based on the standard deviation of the remaining bins' capacities\n scores += 0.1 * std_capacity\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Set the score for the bin with the optimal fit to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / sum(bins)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the best fit or the least waste of space.\n\nNew algorithm: \"Maximize Bin Utilization\" (MBU)\nMBU assigns an item to the bin with the highest potential utilization, considering the item size, the bin capacity, and the number of items already in the bin.\n\nDescription: MBU calculates the potential utilization of each bin by dividing the bin capacity by the item size, then adds the number of items already in the bin. The item is assigned to the bin with the highest potential utilization.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the potential utilization for each bin\n potential_utilizations = bins / item + np.arange(len(bins))\n # Assign the item to the bin with the highest potential utilization\n max_potential_utilization_index = np.argmax(potential_utilizations)\n # Calculate the score for each bin as the inverse of the potential utilization\n scores = 1 / potential_utilizations\n # Set the score for the bin with the highest potential utilization to 0\n scores[max_potential_utilization_index] = 0\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Minimize the maximum score\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.04246,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_7.json
================================================
[
{
"algorithm": "The new algorithm uses a combination of the item's size and the distance between the item's size and the bin's capacity to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size and the distance\n scores = np.log(item / distances)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item * bins[bins != bins.max()] / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Maximum Spread\" (MS), assigns an item to the bin with the maximum spread of item sizes, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the spread of item sizes for each bin\n spreads = np.var(bins)\n # Assign the item to the bin with the maximum spread of item sizes\n max_spread_index = np.argmax(spreads)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the spread of item sizes\n scores = (1 / distances) * spreads\n # Set the score for the bin with the maximum spread of item sizes to 0\n scores[max_spread_index] = 0\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as 0\n scores = np.zeros_like(bins)\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = bins - item\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.sum(bins <= item)\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "My new algorithm is called \"Maximum Score with Item Size Bonus\". It rewards bins based on their sizes to encourage using larger bins when possible.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n # Add a bonus term based on the size of the bin\n bonus = (bins - min(bins)) / (max(bins) - min(bins))\n scores += bonus\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item's size, the distance between the item's size and the bin's capacity, and the standard deviation of the remaining bins' capacities to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n \n # Calculate the score based on the item's size, the distance, and the standard deviation\n scores = np.log(item / distances) + np.log(distances / std_capacity)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: Bin Packing with Adaptive Scoring and Item Size Weighting (BPAS-ISW)\n\nMain steps:\n\n1. Initialize the scores for each bin as a constant value.\n2. Calculate the absolute difference between the item size and the bin capacity for each bin.\n3. Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size.\n4. Adjust the score based on the number of items already assigned to each bin.\n5. Adjust the score based on the total capacity of the bins.\n6. Set the score for the bin with the minimum distance to 0.\n7. Adapt the score based on the number of items already in the bin.\n8. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the Euclidean distance between the item size and the bin capacity for each bin\n distances = np.sqrt((bins - item)**2)\n # Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size\n scores -= 0.1 * distances * item\n # Set the score for the bin with the minimum distance to a small negative value\n scores[np.argmin(distances)] = -0.1\n # Adapt the score based on the number of items already in the bin, but only for bins with a similar size to the current item\n scores += 0.1 * np.log(np.sum(bins == item))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Minimize Wasted Space\" (MWS), assigns an item to the bin with the minimum wasted space, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the minimum wasted space for each bin\n min_wasted_spaces = np.min(bins - item)\n # Assign the item to the bin with the minimum wasted space\n min_wasted_space_index = np.argmin(min_wasted_spaces)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the minimum wasted space to 0\n scores[min_wasted_space_index] = 0\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the distance between the item size and the bin capacity, and adjust the score based on this distance.\n\nNew algorithm: \"Adaptive Score with Item Size and Capacity Ratio\" (ASC-IR)\n\nDescription: ASC-IR calculates the ratio of the item size to the bin capacity for each bin, and adjusts the score based on this ratio, taking into account the number of items already assigned to each bin and the total capacity of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the bin capacity for each bin\n ratios = item / bins\n # Adjust the score based on the ratio, taking into account the number of items already assigned to each bin\n scores = np.log(ratios) - 0.1 * np.log(np.sum(bins == item))\n # Set the score for the bin with the maximum ratio to 0\n scores[np.argmax(ratios)] = 0\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": " New algorithm: Bin Packing with Adaptive Scoring and Item Size Weighting (BPAS-ISW)\n\nMain steps:\n\n1. Initialize the scores for each bin as a constant value.\n2. Calculate the absolute difference between the item size and the bin capacity for each bin.\n3. Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size.\n4. Adjust the score based on the number of items already assigned to each bin.\n5. Adjust the score based on the total capacity of the bins.\n6. Set the score for the bin with the minimum distance to 0.\n7. Adapt the score based on the number of items already in the bin.\n8. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size\n scores -= 0.1 * distances * item\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Adjust the score based on the total capacity of the bins\n scores += 0.1 * np.log(np.sum(bins))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n # Adapt the score based on the number of items already in the bin\n scores += 0.1 * np.log(np.sum(bins == item))\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins while considering the distance between the item size and the bin capacity, and the number of items already assigned to each bin.\n\nNew algorithm: \"Minimize the number of used bins by prioritizing the distance between the item size and the bin capacity, and the number of items already assigned to each bin, while also considering the number of items that can fit in each bin.\"\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin, and the number of items that can fit in each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n # Adjust the score based on the number of items that can fit in each bin\n scores -= np.log(np.sum(bins > item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins.\nNew algorithm: \"Minimize the number of used bins while maximizing the number of items in each bin\".\n\nDescription: The algorithm assigns an item to the bin with the lowest score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, but with a twist: instead of assigning the item to the bin with the lowest score directly, it first calculates the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity, and then assigns the item to the bin with the lowest score.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity\n scores = (len(bins) - np.count_nonzero(bins)) / distances\n # Assign the item to the bin with the lowest score\n min_score_index = np.argmin(scores)\n # Set the score for the bin with the lowest score to 0\n scores[min_score_index] = 0\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Binning with Adaptive Fit\" (BAF)\nBAF assigns an item to the bin with the adaptive fit based on the item size, rest capacity of each bin, and the number of items already in the bin, while also considering the standard deviation of the remaining bins' capacities and the item's size relative to the bin's capacity.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= 0.1 * distances\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Adjust the score based on the standard deviation of the remaining bins' capacities\n scores += 0.1 * std_capacity\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Adjust the score based on the item's size relative to the bin's capacity\n scores += 0.1 * item / bins\n # Set the score for the bin with the optimal fit to 0\n scores[np.argmin(distances)] = 0\n # Adjust the score based on the item's size relative to the bin's capacity\n scores += 0.1 * np.log(item / bins)\n # Adjust the score based on the standard deviation of the remaining bins' capacities\n scores += 0.1 * np.log(std_capacity)\n # Set the score for the bin with the optimal fit to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms aim to optimize the usage of bins by assigning items to bins with the best fit, considering various factors such as distance, spread, and number of items already in the bins.\n\nNew algorithm: \"Binning with Dynamic Fit\" (BDF)\nBDF assigns an item to the bin with the dynamic fit based on the item size, rest capacity of each bin, and the number of items already in the bin, while also considering the standard deviation of the remaining bins' capacities and the item's size relative to the bin's capacity.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= 0.1 * distances\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Adjust the score based on the standard deviation of the remaining bins' capacities\n scores += 0.1 * std_capacity\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Adjust the score based on the item's size relative to the bin's capacity\n scores += 0.1 * item / bins\n # Set the score for the bin with the optimal fit to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04186,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Binning with Optimal Fit\" (BOF)\nBOF assigns an item to the bin with the optimal fit based on the item size and the rest capacity of each bin, while also considering the number of items already in the bin and the standard deviation of the remaining bins' capacities.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= 0.1 * distances\n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n # Adjust the score based on the standard deviation of the remaining bins' capacities\n scores += 0.1 * std_capacity\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Set the score for the bin with the optimal fit to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04196,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_8.json
================================================
[
{
"algorithm": "The new algorithm uses a combination of the item's size and the distance between the item's size and the bin's capacity to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size and the distance\n scores = np.log(item / distances)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score, taking into account the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (1 - (bins[i] / max_capacity))\n else:\n scores[i] = 0\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins.\n\nNew algorithm: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, and also considers the distance between the item's size and the bin's capacity to calculate the score.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size and the distance\n scores = np.log(item / distances)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Normalize the scores by dividing by the sum of all scores\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item * bins[bins != bins.max()] / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Maximum Spread\" (MS), assigns an item to the bin with the maximum spread of item sizes, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the spread of item sizes for each bin\n spreads = np.var(bins)\n # Assign the item to the bin with the maximum spread of item sizes\n max_spread_index = np.argmax(spreads)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the spread of item sizes\n scores = (1 / distances) * spreads\n # Set the score for the bin with the maximum spread of item sizes to 0\n scores[max_spread_index] = 0\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as 0\n scores = np.zeros_like(bins)\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = bins - item\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.sum(bins <= item)\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "My new algorithm is called \"Maximum Score with Item Size Bonus\". It rewards bins based on their sizes to encourage using larger bins when possible.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n # Add a bonus term based on the size of the bin\n bonus = (bins - min(bins)) / (max(bins) - min(bins))\n scores += bonus\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item's size, the distance between the item's size and the bin's capacity, and the standard deviation of the remaining bins' capacities to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n \n # Calculate the score based on the item's size, the distance, and the standard deviation\n scores = np.log(item / distances) + np.log(distances / std_capacity)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Item Size Penalty\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the Euclidean distance between the item size and the bin capacity for each bin\n distances = np.sqrt((bins - item)**2)\n # Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size\n scores -= 0.1 * distances * item\n # Set the score for the bin with the minimum distance to a small positive value\n scores[np.argmin(distances)] = 0.1\n # Adapt the score based on the number of items already in the bin, but only for bins with a similar size to the current item\n scores += 0.1 * np.log(np.sum(bins == item))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Minimize Wasted Space\" (MWS), assigns an item to the bin with the minimum wasted space, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the minimum wasted space for each bin\n min_wasted_spaces = np.min(bins - item)\n # Assign the item to the bin with the minimum wasted space\n min_wasted_space_index = np.argmin(min_wasted_spaces)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the minimum wasted space to 0\n scores[min_wasted_space_index] = 0\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the distance between the item size and the bin capacity, and adjust the score based on this distance.\n\nNew algorithm: \"Adaptive Score with Item Size and Capacity Ratio\" (ASC-IR)\n\nDescription: ASC-IR calculates the ratio of the item size to the bin capacity for each bin, and adjusts the score based on this ratio, taking into account the number of items already assigned to each bin and the total capacity of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the bin capacity for each bin\n ratios = item / bins\n # Adjust the score based on the ratio, taking into account the number of items already assigned to each bin\n scores = np.log(ratios) - 0.1 * np.log(np.sum(bins == item))\n # Set the score for the bin with the maximum ratio to 0\n scores[np.argmax(ratios)] = 0\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": " New algorithm: Bin Packing with Adaptive Scoring and Item Size Weighting (BPAS-ISW)\n\nMain steps:\n\n1. Initialize the scores for each bin as a constant value.\n2. Calculate the absolute difference between the item size and the bin capacity for each bin.\n3. Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size.\n4. Adjust the score based on the number of items already assigned to each bin.\n5. Adjust the score based on the total capacity of the bins.\n6. Set the score for the bin with the minimum distance to 0.\n7. Adapt the score based on the number of items already in the bin.\n8. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size\n scores -= 0.1 * distances * item\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Adjust the score based on the total capacity of the bins\n scores += 0.1 * np.log(np.sum(bins))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n # Adapt the score based on the number of items already in the bin\n scores += 0.1 * np.log(np.sum(bins == item))\n return scores",
"objective": 0.04135,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins while considering the distance between the item size and the bin capacity, and the number of items already assigned to each bin.\n\nNew algorithm: \"Minimize the number of used bins by prioritizing the distance between the item size and the bin capacity, and the number of items already assigned to each bin, while also considering the number of items that can fit in each bin.\"\n\nDescription: The algorithm assigns an item to the bin with the minimum score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already assigned to each bin, and the number of items that can fit in each bin.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity\n scores = 1 / distances\n # Adjust the score based on the number of items already assigned to each bin\n scores -= np.log(np.sum(bins <= item))\n # Adjust the score based on the number of items that can fit in each bin\n scores -= np.log(np.sum(bins > item))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Minimizing the number of used bins.\nNew algorithm: \"Minimize the number of used bins while maximizing the number of items in each bin\".\n\nDescription: The algorithm assigns an item to the bin with the lowest score, considering the rest capacity of each bin, in order to minimize the number of used bins, while also taking into account the distance between the item size and the bin capacity, and the number of items already in the bin, but with a twist: instead of assigning the item to the bin with the lowest score directly, it first calculates the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity, and then assigns the item to the bin with the lowest score.\n\nImplementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the score for each bin as the ratio of the number of items already in the bin to the distance between the item size and the bin capacity\n scores = (len(bins) - np.count_nonzero(bins)) / distances\n # Assign the item to the bin with the lowest score\n min_score_index = np.argmin(scores)\n # Set the score for the bin with the lowest score to 0\n scores[min_score_index] = 0\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": " My new algorithm is called \"Maximum Score with Rest Capacity Penalty\". It penalizes bins based on their remaining capacity to discourage using almost full bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n # Add a penalty term based on the remaining capacity of the bin\n penalty = (max(bins) - bins) / max(bins)\n scores -= penalty\n \n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/CodeLlama34B/Run3/population_generation_9.json
================================================
[
{
"algorithm": "The new algorithm uses a combination of the item's size and the distance between the item's size and the bin's capacity to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size and the distance\n scores = np.log(item / distances) + np.sqrt(distances)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Normalize the scores by dividing by the sum of all scores\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03532,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item's size and the distance between the item's size and the bin's capacity to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size and the distance\n scores = np.log(item / distances)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the scores for each bin based on the item size and the rest capacity of the bins.\n\nNew algorithm: \"Maximum Score with Item Size Penalty\"\nThis algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various combinations of the item size, the rest capacity of each bin, and the distance between the item size and the maximum capacity of the bins to calculate the score.\n\nNew algorithm: The new algorithm uses a combination of the item size, the rest capacity of each bin, and the ratio of the item size to the maximum capacity of the bins to calculate the score.\n\nImplementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (1 - (bins[i] / max_capacity)) * (1 - (item / max_capacity))\n else:\n scores[i] = 0\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score, taking into account the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] < max_capacity:\n scores[i] = (item / (bins[i] - item + 1)) * (1 - (bins[i] / max_capacity))\n else:\n scores[i] = 0\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": " Common backbone idea: Assign an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins.\n\nNew algorithm: The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, and also considers the distance between the item's size and the bin's capacity to calculate the score.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the score based on the item's size and the distance\n scores = np.log(item / distances)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n # Normalize the scores by dividing by the sum of all scores\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item size and the rest capacity of each bin to calculate the score for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item * bins[bins != bins.max()] / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = np.log(item / (bins[bins != bins.max()] - item + 1))\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item / bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": " New algorithm: \"Maximum Score with Restricted Capacity\"\n\nMain steps: Assign an item to the bin with the maximum score, considering the rest capacity of each bin, while ensuring that the total capacity of all bins does not exceed a certain threshold.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum score for each bin\n max_score = np.max(bins)\n \n # Calculate the restricted capacity for each bin\n restricted_capacity = np.minimum(bins, max_score)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n scores[restricted_capacity > 0] = np.log(item / (restricted_capacity[restricted_capacity > 0] - item + 1))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Dynamic Binning\" (DB), dynamically adjusts the scores for each bin based on the current state of the bins and the item being assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as 0\n scores = np.zeros_like(bins)\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = bins - item\n # Adjust the score based on the distance between the item size and the bin capacity\n scores -= distances\n # Adjust the score based on the number of items already assigned to each bin\n scores += np.sum(bins <= item)\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "My new algorithm is called \"Maximum Score with Item Size Bonus\". It rewards bins based on their sizes to encourage using larger bins when possible.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by dividing the ratios with the bin index\n scores = ratios / np.arange(1, len(bins)+1)\n \n # Add a bonus term based on the size of the bin\n bonus = (bins - min(bins)) / (max(bins) - min(bins))\n scores += bonus\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a combination of the item's size, the distance between the item's size and the bin's capacity, and the standard deviation of the remaining bins' capacities to calculate the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item's size and the bin's capacity\n distances = np.abs(bins - item)\n \n # Calculate the standard deviation of the remaining bins' capacities\n std_capacity = np.std(bins)\n \n # Calculate the score based on the item's size, the distance, and the standard deviation\n scores = np.log(item / distances) + np.log(distances / std_capacity)\n \n # Set the score to zero if the bin's capacity is equal to the maximum capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / bins[bins != bins.max()]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: \"Maximum Score with Item Size Penalty\"",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the Euclidean distance between the item size and the bin capacity for each bin\n distances = np.sqrt((bins - item)**2)\n # Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size\n scores -= 0.1 * distances * item\n # Set the score for the bin with the minimum distance to a small positive value\n scores[np.argmin(distances)] = 0.1\n # Adapt the score based on the number of items already in the bin, but only for bins with a similar size to the current item\n scores += 0.1 * np.log(np.sum(bins == item))\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm, called \"Minimize Wasted Space\" (MWS), assigns an item to the bin with the minimum wasted space, considering the distance between the item size and the bin capacity, and the number of items already in the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the distance between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Calculate the minimum wasted space for each bin\n min_wasted_spaces = np.min(bins - item)\n # Assign the item to the bin with the minimum wasted space\n min_wasted_space_index = np.argmin(min_wasted_spaces)\n # Calculate the score for each bin as the inverse of the distance between the item size and the bin capacity, multiplied by the number of items already in the bin\n scores = (1 / distances) * (len(bins) - np.count_nonzero(bins))\n # Set the score for the bin with the minimum wasted space to 0\n scores[min_wasted_space_index] = 0\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": " Common backbone idea: The provided algorithms use various methods to calculate the distance between the item size and the bin capacity, and adjust the score based on this distance.\n\nNew algorithm: \"Adaptive Score with Item Size and Capacity Ratio\" (ASC-IR)\n\nDescription: ASC-IR calculates the ratio of the item size to the bin capacity for each bin, and adjusts the score based on this ratio, taking into account the number of items already assigned to each bin and the total capacity of the bins.\n\nPython implementation:\n```\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the bin capacity for each bin\n ratios = item / bins\n # Adjust the score based on the ratio, taking into account the number of items already assigned to each bin\n scores = np.log(ratios) - 0.1 * np.log(np.sum(bins == item))\n # Set the score for the bin with the maximum ratio to 0\n scores[np.argmax(ratios)] = 0\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": " New algorithm: Bin Packing with Adaptive Scoring and Item Size Weighting (BPAS-ISW)\n\nMain steps:\n\n1. Initialize the scores for each bin as a constant value.\n2. Calculate the absolute difference between the item size and the bin capacity for each bin.\n3. Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size.\n4. Adjust the score based on the number of items already assigned to each bin.\n5. Adjust the score based on the total capacity of the bins.\n6. Set the score for the bin with the minimum distance to 0.\n7. Adapt the score based on the number of items already in the bin.\n8. Return the scores for the bins for assignment.\n\nPython implementation:\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n # Initialize the scores for each bin as a constant value\n scores = 1\n # Calculate the absolute difference between the item size and the bin capacity for each bin\n distances = np.abs(bins - item)\n # Adjust the score based on the distance between the item size and the bin capacity, weighted by the item size\n scores -= 0.1 * distances * item\n # Adjust the score based on the number of items already assigned to each bin\n scores += 0.1 * np.log(np.sum(bins <= item))\n # Adjust the score based on the total capacity of the bins\n scores += 0.1 * np.log(np.sum(bins))\n # Set the score for the bin with the minimum distance to 0\n scores[np.argmin(distances)] = 0\n # Adapt the score based on the number of items already in the bin\n scores += 0.1 * np.log(np.sum(bins == item))\n return scores",
"objective": 0.04135,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin, while avoiding using bins with the maximum rest capacity. The goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item)\n\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, calculated by subtracting the item size from the bin capacity, and avoids using bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin based on its current rest capacity and the size of the item, where the score is equal to the absolute value of the difference between the rest capacity and the item size, multiplied by -1 if the bin is empty, to prioritize filling the empty bins first, or multiplied by 1 if the bin is not empty.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(bins - item) * np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))\n return scores",
"objective": 0.13281,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = bins[i] - item\n else:\n scores[i] = -1000\n \n return scores",
"objective": 0.14418,
"other_inf": null
},
{
"algorithm": "The algorithm first calculates the score for each bin by dividing the rest capacity of the bin by the item size, then subtracting 1 if the rest capacity equals the maximum capacity. Next, it sets the score to 0 if the rest capacity is less than the item size. Finally, it returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(bins, item)\n scores[bins == np.max(bins)] -= 1\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, considering the rest capacity of the bin, and returns the scores for all bins after the assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize an array of scores with zeros\n\n # Calculate the score for each bin based on their rest capacity\n scores = np.where(bins == np.max(bins), 0, bins - np.max(bins) + item + 1)\n \n return scores",
"objective": 0.32971,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Calculate the ratio of the capacity remaining in each bin to the size of the current item.\n2. Assign a score of 0 to bins that have the same capacity as their maximum capacity.\n3. Assign a score of 1 to bins whose remaining capacity is 1 larger than the size of the current item.\n4. Assign a score of 2 to bins whose remaining capacity is 2 larger than the size of the current item.\n5. Assign a score of 3 to bins whose remaining capacity is 3 larger than the size of the current item.\n6. Continue this pattern and assign scores in increasing order to bins with increasing available capacity.\n7. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item) # Assign scores based on ratio\n return scores",
"objective": 0.36543,
"other_inf": null
},
{
"algorithm": "The algorithm scores each bin based on a score function that takes into account both the remaining capacity of the bin and the size of the item being assigned. The main steps of the algorithm are: \n1. Initialize an empty Numpy array 'scores' with the same size as 'bins' to store the scores for each bin.\n2. Calculate the score for each bin by dividing the remaining capacity of the bin by the size of the item, and store the result in the corresponding index of 'scores'.\n3. Return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = bins[bins > item] / item\n return scores",
"objective": 0.3763,
"other_inf": null
},
{
"algorithm": "\nThe algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment.\nThe main steps of the algorithm are as follows:\n1. Calculate the available capacities of all bins by subtracting 'item' from 'bins'.\n2. Filter out the bins with available capacity equal to the maximum capacity ('bins_max') using a mask.\n3. Assign a score of 0 to all bins that have 'bins_max' capacity.\n4. For the remaining bins, calculate the score by dividing the available capacity by the difference between 'bins_max' and the available capacity.\n5. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score for each bin is calculated as the difference between the rest capacity and twice the size of the item, with a lower bound of zero, and the final scores are stored in a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - 2 * item, 0)\n return scores",
"objective": 0.86699,
"other_inf": null
},
{
"algorithm": "The novel score function assigns an item to the bin with the maximum score, taking into account the rest capacity of each bin, and aims to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = item - bins[mask]\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "We first calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, and then subtract 1 from the score of the bin with the maximum capacity. Finally, we return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n max_index = np.argmax(bins)\n scores[max_index] -= 1\n return scores",
"objective": 1.51484,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin by dividing the rest capacity of the bin by the size of the item and subtracting it from the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins) / item\n scores = (bins / item) - max_score\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_1.json
================================================
[
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with greater remaining capacity and takes into consideration the maximum capacity of existing bins when assigning items, aiming to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins[bins >= item]) * (max_capacity / bins[bins >= item])\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The algorithm assigns scores to each bin based on its remaining capacity and the item's size, where bins with a higher remaining capacity receive higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1/item) * bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the maximum possible item that can be assigned to it, the remaining capacity, and the gap between the bin capacity and item size",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.maximum(bins[bins >= item] - item, item) - np.maximum(bins[bins >= item] - item - 1, 0)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / bins[bins >= item]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores based on the number of bins needed to accommodate the remaining items after placing the current item in each bin, while maximizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_bins = np.max(np.ceil(bins / item)) # Calculate the maximum number of bins needed to hold the remaining items\n scores = max_bins * bins - item * np.arange(1, len(bins) + 1) # Calculate scores\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score of each bin using a combination of the bin's remaining capacity and the item's size, taking into account the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n \n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New Algorithm: The algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment. The algorithm calculates the score for each bin by dividing the available capacity by the square of the difference between 'bins_max' and the available capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask]) ** 2\n return scores",
"objective": 0.04497,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score of each bin using a combination of the bin's remaining capacity and the item's size, taking into account the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item) * np.sqrt(bins[bins != max_capacity] / item)\n \n return scores",
"objective": 0.04628,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score of each bin using a combination of the bin's remaining capacity and the item's size, taking into account the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = np.sqrt(bins[bins != max_capacity] / item)\n \n return scores",
"objective": 0.04769,
"other_inf": null
},
{
"algorithm": "The novel algorithm assigns higher scores to bins with smaller rest capacities while considering the difference between the bin's capacity and the item's size and the bin's index, aiming to fill bins more evenly and efficiently.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = np.exp(- bin_capacities[i] / item) * (i + 1)\n \n return scores",
"objective": 0.0488,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score is calculated by a product of the bin capacity and the negative of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -item * bins\n scores[bins <= item] = np.min(scores) -1\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "In contrast to the provided algorithm, this updated algorithm prioritizes bins with greater remaining capacity by utilizing a smaller score decrement for each unit of increased capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item)\n scores[remaining_capacity > 0] -= remaining_capacity[remaining_capacity > 0] % item\n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins > item\n scores = scores.astype(int)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin and the item's size, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = bins[bins != bins.max()] / (item + 1)\n return scores",
"objective": 0.06681,
"other_inf": null
},
{
"algorithm": "Score bins based on the ratio of their available capacity to the square of the item's size, taking into account the current bin index to improve assignment distribution.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n bin_index = np.arange(len(bins))\n scores = np.empty_like(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = bin_capacities[i] / item ** 2 * (bin_index[i] + 1)\n \n return scores",
"objective": 0.07023,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign higher scores to bins with larger rest capacities, prioritizing bins with indices closer to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between each bin's rest capacity and the item size\n differences = bins - item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n differences[bins == max(bins)] = 0\n \n # Calculate the scores for each bin using a weighted sum of the difference and the bin index, with the weight proportional to the item size\n scores = differences + np.power(differences, item) * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.07486,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_10.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "My new algorithm considers the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the logarithm of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log(bins - item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the cube root of the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.power(bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.power(bins - item + 1, 1/3), 1/3)\n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - np.mean(bins)) / surplus[surplus > 0]\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Score bins as a weighted sum of the bin's current utilization, the number of bins used, the difference between the bin's capacity and the item size, and the geometric mean of the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + (bins - item) + np.sqrt(bins * item)\n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - np.max(bins)) / surplus[surplus > 0]\n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "Calculate scores based on bin capacities, item size, and a penalty for near-full bins to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins + item >= np.max(bins)] -= 1\n scores[bins <= item] = 0\n return scores",
"objective": 0.02817,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Scores are computed as the sum of the bin's current utilization divided by its capacity, the number of times bin has been used, and the harmonic mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + 1/(1/item + 1/bins)\n return scores",
"objective": 0.02837,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is computed as the sum of the bin's current utilization, the number of items it contains, the cube roots of the difference between the bin's capacity and the item size, the number of bins that have been used so far, and the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.sum(bins >= item) + np.power(bins - item + 1, 1/3) + np.arange(len(bins)) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, the square root of the difference between the bin's capacity and the item size, and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1) + np.log(bins)\n return scores",
"objective": 0.0335,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the sum of the following: a fraction of the item size divided by the difference between the bin's remaining capacity and the item size, plus the square root of the ratio between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins) + np.sqrt(bins / item)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.03662,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_11.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "My new algorithm considers the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the logarithm of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log(bins - item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Maximize the sum of the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size while considering the bin's current utilization and the number of times it has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + np.sqrt(bins - item) + bins / (bins - item + 1) + np.arange(len(bins))\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the cube root of the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.power(bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.power(bins - item + 1, 1/3), 1/3)\n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the square root of the difference between the bin's capacity and the item size, and the cube root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1) + np.power(bins, 1/3)\n return scores",
"objective": 0.01811,
"other_inf": null
},
{
"algorithm": "Score bins as a weighted sum of the bin's current utilization, the number of bins used, the difference between the bin's capacity and the item size, and the harmonic mean of the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + (bins - item) + 2 * bins * item / (bins + item)\n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - np.mean(bins)) / surplus[surplus > 0]\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Score bins as a weighted sum of the bin's current utilization, the number of bins used, the difference between the bin's capacity and the item size, and the geometric mean of the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + (bins - item) + np.sqrt(bins * item)\n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - np.max(bins)) / surplus[surplus > 0]\n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate scores based on bin capacities, item size, and a penalty for near-full bins while considering the percentage of remaining capacities in the bins to minimize the number of bins used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins + item >= np.max(bins)] -= 1\n scores[bins <= item] = 0\n rem_cap = (bins/np.max(bins))\n scores = scores - np.log10(rem_cap+1e-10)\n return scores",
"objective": 0.02727,
"other_inf": null
},
{
"algorithm": "Calculate scores based on bin capacities, item size, and a penalty for near-full bins to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins + item >= np.max(bins)] -= 1\n scores[bins <= item] = 0\n return scores",
"objective": 0.02817,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Scores are computed as the sum of the bin's current utilization divided by its capacity, the number of times bin has been used, and the harmonic mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + 1/(1/item + 1/bins)\n return scores",
"objective": 0.02837,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_12.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the square root of the difference between the bin's capacity and the item size, and the geometric mean of the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/2) + np.sqrt(bins * item)\n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and two terms that increase as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1) + np.log(bins) / (bins - item + 1)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "My new algorithm considers the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "Compute scores based on a weighted sum of the bin's utilization, the number of items that are already in the bin, the difference between the item's size and the remaining capacity of the bin, and the ratio between the item's size and the bin's total capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins - item + 1 + (item / bins) ** 3\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the logarithm of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log(bins - item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Maximize the sum of the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size while considering the bin's current utilization and the number of times it has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + np.sqrt(bins - item) + bins / (bins - item + 1) + np.arange(len(bins))\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the summation of bins' current utilization, the number of times the bin has been used, the bin's remaining capacity and the cube root of the difference between the bin's capacity and the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.power((bins - item + 1), 1/3)\n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the square root of the difference between the bin's capacity and the item size, and the cube root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1) + np.power(bins, 1/3)\n return scores",
"objective": 0.01811,
"other_inf": null
},
{
"algorithm": "Score bins as a weighted sum of the bin's current utilization, the number of bins used, the difference between the bin's capacity and the item size, and the harmonic mean of the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + (bins - item) + 2 * bins * item / (bins + item)\n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - np.mean(bins)) / surplus[surplus > 0]\n return scores",
"objective": 0.01942,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_13.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the square root of the difference between the bin's capacity and the item size, and the geometric mean of the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/2) + np.sqrt(bins * item)\n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/6) + np.power(bins - item + 1, 1/6) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and two terms that increase as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1) + np.log(bins) / (bins - item + 1)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "My new algorithm considers the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "Compute scores based on a weighted sum of the bin's utilization, the number of items that are already in the bin, the difference between the item's size and the remaining capacity of the bin, and the ratio between the item's size and the bin's total capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins - item + 1 + (item / bins) ** 3\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the logarithm of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log(bins - item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Maximize the sum of the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size while considering the bin's current utilization and the number of times it has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + np.sqrt(bins - item) + bins / (bins - item + 1) + np.arange(len(bins))\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the summation of bins' current utilization, the number of times the bin has been used, the bin's remaining capacity and the cube root of the difference between the bin's capacity and the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.power((bins - item + 1), 1/3)\n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the square root of the difference between the bin's capacity and the item size, and the cube root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1) + np.power(bins, 1/3)\n return scores",
"objective": 0.01811,
"other_inf": null
},
{
"algorithm": "Score bins as a weighted sum of the bin's current utilization, the number of bins used, the difference between the bin's capacity and the item size, and the harmonic mean of the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + (bins - item) + 2 * bins * item / (bins + item)\n return scores",
"objective": 0.01851,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_14.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the square root of the difference between the bin's capacity and the item size, and the geometric mean of the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/2) + np.sqrt(bins * item)\n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/6) + np.power(bins - item + 1, 1/6) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the maximum surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / (bins[surplus > 0] + np.sqrt(item))\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and two terms that increase as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1) + np.log(bins) / (bins - item + 1)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "My new algorithm considers the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "Compute scores based on a weighted sum of the bin's utilization, the number of items that are already in the bin, the difference between the item's size and the remaining capacity of the bin, and the ratio between the item's size and the bin's total capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins - item + 1 + (item / bins) ** 3\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the logarithm of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log(bins - item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Maximize the sum of the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size while considering the bin's current utilization and the number of times it has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins + np.sqrt(bins - item) + bins / (bins - item + 1) + np.arange(len(bins))\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the summation of bins' current utilization, the number of times the bin has been used, the bin's remaining capacity and the cube root of the difference between the bin's capacity and the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.power((bins - item + 1), 1/3)\n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "Emphasize bin utilization and item fitting, penalize successive bin usage, and consider capacity relative to item size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1) + np.log(bins - item + 1) / np.log(bins) * (bins / (item + 1))\n return scores",
"objective": 0.01801,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_15.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the modified number of times the bin has been used, the difference between the bin's capacity and the item size, and the cube root of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + 2 * np.arange(len(bins)) + bins - item + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/6) + np.power(bins - item + 1, 1/6) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the maximum surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / (bins[surplus > 0] + np.sqrt(item))\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Modify the score function by introducing a parameter 'beta' to control the trade-off between bin utilization and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins, beta=1):\n scores = np.ceil((beta * (bins - np.max(bins)) - item) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the square roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the cube roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1) + np.sqrt(bins - item + 1) + np.power(bins, 1/3) * np.power(item, 1/3)\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and two terms that increase as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1) + np.log(bins) / (bins - item + 1)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigning items according to the bin's utilization percentage, usage count, rest capacity, and difference between the rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log((bins - item + 1)/(bins + 1))\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "My new algorithm considers the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "Compute scores based on a weighted sum of the bin's utilization, the number of items that are already in the bin, the difference between the item's size and the remaining capacity of the bin, and the ratio between the item's size and the bin's total capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins - item + 1 + (item / bins) ** 3\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the logarithm of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log(bins - item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "New algorithm: The score includes a reciprocal of bin size penalty and an item size normalized bin utilization; other terms are kept.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1) + np.log(bins - item + 1) / np.log(bins) * (item / bins)\n return scores",
"objective": 0.01751,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_16.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the modified number of times the bin has been used, the difference between the bin's capacity and the item size, and the cube root of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + 2 * np.arange(len(bins)) + bins - item + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/6) + np.power(bins - item + 1, 1/6) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the maximum surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / (bins[surplus > 0] + np.sqrt(item))\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Modify the score function by introducing a parameter 'beta' to control the trade-off between bin utilization and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins, beta=1):\n scores = np.ceil((beta * (bins - np.max(bins)) - item) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the square roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the cube roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1) + np.sqrt(bins - item + 1) + np.power(bins, 1/3) * np.power(item, 1/3)\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and two terms that increase as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1) + np.log(bins) / (bins - item + 1)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigning items according to the bin's utilization percentage, usage count, rest capacity, and difference between the rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log((bins - item + 1)/(bins + 1))\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) + bins + 1 / (bins - item)\n return scores",
"objective": 0.0168,
"other_inf": null
},
{
"algorithm": "My new algorithm considers the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "Compute scores based on a weighted sum of the bin's utilization, the number of items that are already in the bin, the difference between the item's size and the remaining capacity of the bin, and the ratio between the item's size and the bin's total capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins - item + 1 + (item / bins) ** 3\n return scores",
"objective": 0.01731,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the logarithm of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log(bins - item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_17.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the modified number of times the bin has been used, the difference between the bin's capacity and the item size, and the cube root of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + 2 * np.arange(len(bins)) + bins - item + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/6) + np.power(bins - item + 1, 1/6) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a score for each bin based on the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the reciprocal of the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + 1 / np.abs(bins - item) + 1 / np.abs(bins - item) ** 2\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a score for each bin based on the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + 1 / np.abs(bins - item)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the maximum surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / (bins[surplus > 0] + np.sqrt(item))\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Modify the score function by introducing a parameter 'beta' to control the trade-off between bin utilization and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins, beta=1):\n scores = np.ceil((beta * (bins - np.max(bins)) - item) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the square roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the cube roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1) + np.sqrt(bins - item + 1) + np.power(bins, 1/3) * np.power(item, 1/3)\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and two terms that increase as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1) + np.log(bins) / (bins - item + 1)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the bin's current utilization, the number of times the bin has been used, the arithmetic mean of the bin's capacity and the item size, and the negative cube root of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + (bins + item) / 2 - np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigning items according to the bin's utilization percentage, usage count, rest capacity, and difference between the rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log((bins - item + 1)/(bins + 1))\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) + bins + 1 / (bins - item)\n return scores",
"objective": 0.0168,
"other_inf": null
},
{
"algorithm": "My new algorithm considers the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) + bins + 1 / (bins - item) + np.power(bins - item, 1/3)\n return scores",
"objective": 0.0171,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_18.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the modified number of times the bin has been used, the difference between the bin's capacity and the item size, and the cube root of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + 2 * np.arange(len(bins)) + bins - item + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/6) + np.power(bins - item + 1, 1/6) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "Scores are developed as the sum of the current utilization of the bins, the number of times the bins have been utilized, the geometric mean of the item's size and bin's capacity, and exponential of difference between the bin's maximum capacity and bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins) + np.exp(bins - bins.max())\n return scores",
"objective": 0.01248,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a score for each bin based on the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the reciprocal of the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + 1 / np.abs(bins - item) + 1 / np.abs(bins - item) ** 2\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a score for each bin based on the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + 1 / np.abs(bins - item)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm calculates a score for each bin based on the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, the reciprocal of the difference between the bin's remaining capacity and the item size, the item utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + 1 / np.abs(bins - item) + 1 / np.abs(bins - item) ** 2 + item / bins\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the maximum surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / (bins[surplus > 0] + np.sqrt(item))\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Modify the score function by introducing a parameter 'beta' to control the trade-off between bin utilization and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins, beta=1):\n scores = np.ceil((beta * (bins - np.max(bins)) - item) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the square roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the cube roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1) + np.sqrt(bins - item + 1) + np.power(bins, 1/3) * np.power(item, 1/3)\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and two terms that increase as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1) + np.log(bins) / (bins - item + 1)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the bin's current utilization, the number of times the bin has been used, the arithmetic mean of the bin's capacity and the item size, and the negative cube root of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + (bins + item) / 2 - np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigning items according to the bin's utilization percentage, usage count, rest capacity, and difference between the rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log((bins - item + 1)/(bins + 1))\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "Consider the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, the reciprocal of the difference between the bin's capacity and the item size, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) + bins + 1 / (bins - item)\n return scores",
"objective": 0.0168,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_19.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's total utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, the square roots of the bin's maximum capacity and the item size, and the item's contribution to the bin's fullness.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins) * np.sqrt(item) + item * (bins - item + 1) / bins\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "The newly developed algorithm calculates the scores based on the bin's current utilization, the number of times the bin has been used, the cubic root of the bin's maximum capacity, the harmonic mean between the item's size and the bin's capacity, the reciprocal of the difference between the bin's remaining capacity and the item's size, and the geometric mean between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins.max(), 1/3) + 2 * item * bins / (item + bins) + 1 / np.abs(bins - item) + np.sqrt(bins - item) * np.sqrt(item)\n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the modified number of times the bin has been used, the difference between the bin's capacity and the item size, and the cube root of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + 2 * np.arange(len(bins)) + bins - item + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's total utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, the square roots of the bin's maximum capacity and the item size, and the item's contribution to the bin's fullness.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item) + item * (bins - item + 1) / bins\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/6) + np.power(bins - item + 1, 1/6) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "Scores are developed as the sum of the current utilization of the bins, the number of times the bins have been utilized, the geometric mean of the item's size and bin's capacity, and exponential of difference between the bin's maximum capacity and bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins) + np.exp(bins - bins.max())\n return scores",
"objective": 0.01248,
"other_inf": null
},
{
"algorithm": "The newly developed algorithm calculates the scores based on the bin's current utilization, the number of times the bin has been used, the cubic root of the bin's maximum capacity, the harmonic mean between the item's size and the bin's capacity, the reciprocal of the difference between the bin's remaining capacity and the item's size, and the geometric mean between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + 2 * item * bins / (item + bins)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a score for each bin based on the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + 1 / np.abs(bins - item)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm calculates a score for each bin based on the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, the reciprocal of the difference between the bin's remaining capacity and the item size, the item utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + 1 / np.abs(bins - item) + 1 / np.abs(bins - item) ** 2 + item / bins\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the maximum surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / (bins[surplus > 0] + np.sqrt(item))\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the bin's current utilization, the most recent used information, and the variance between the cube roots of the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + (bins + item) / 2 - np.sqrt(np.var(np.power(bins - item + 1, 1/3)))\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Modify the score function by introducing a parameter 'beta' to control the trade-off between bin utilization and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins, beta=1):\n scores = np.ceil((beta * (bins - np.max(bins)) - item) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the square roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the cube roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1) + np.sqrt(bins - item + 1) + np.power(bins, 1/3) * np.power(item, 1/3)\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and two terms that increase as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1) + np.log(bins) / (bins - item + 1)\n return scores",
"objective": 0.0163,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_2.json
================================================
[
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with greater remaining capacity and takes into consideration the maximum capacity of existing bins when assigning items, aiming to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins[bins >= item]) * (max_capacity / bins[bins >= item])\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " The new algorithm determines the score of each feasible bin based on a weighted combination of the item's size and the bin's remaining capacity, penalized by the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n mask = bins >= item\n scores[mask] = item / bins[mask] * ((bins[mask] / item) ** 0.3) * ((max_capacity / bins[mask]) ** 1.7)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The algorithm assigns scores to each bin based on its remaining capacity and the item's size, where bins with a higher remaining capacity receive higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1/item) * bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the maximum possible item that can be assigned to it, the remaining capacity, and the gap between the bin capacity and item size",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.maximum(bins[bins >= item] - item, item) - np.maximum(bins[bins >= item] - item - 1, 0)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm adjusts the weights of the bin's rest capacity and bin's index to adapt to specific scenarios, achieving better performance in minimizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (i + 1) * (1 - bins[i] / item)\n \n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / bins[bins >= item]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores based on the number of bins needed to accommodate the remaining items after placing the current item in each bin, while maximizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_bins = np.max(np.ceil(bins / item)) # Calculate the maximum number of bins needed to hold the remaining items\n scores = max_bins * bins - item * np.arange(1, len(bins) + 1) # Calculate scores\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm adjusts the weights of the bin's rest capacity and bin's index to adapt to specific scenarios, achieving better performance in minimizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (1 - bin_capacities[i] / item) * (i + 1) * np.exp(-bins[i] / item)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item/2)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The new algorithm adjusts the weights of the bin's rest capacity and bin's index to adapt to specific scenarios, achieving better performance in minimizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = np.exp(-bin_capacities[i] / item) * (i + 1) * np.exp(-bins[i] / item)\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to the bin with the maximum score calculated as the bin's current capacity divided by the square root of the product of the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.sqrt(bins * item) + np.arange(len(bins))\n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "The new algorithm adjusts the weights of the bin's rest capacity and bin's index to adapt to specific scenarios, achieving better performance in minimizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (i + 1) * np.exp(-bins[i] / item)\n \n return scores",
"objective": 0.04487,
"other_inf": null
},
{
"algorithm": "New Algorithm: The algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment. The algorithm calculates the score for each bin by dividing the available capacity by the square of the difference between 'bins_max' and the available capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask]) ** 2\n return scores",
"objective": 0.04497,
"other_inf": null
},
{
"algorithm": "This new algorithm utilizes a redesigned score function, which includes the remaining capacity ratio, item size, and square root of the remaining capacity to item size ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = ((bins[bins != max_capacity] - item) / (max_capacity - item) * np.sqrt(bins[bins != max_capacity] / item))**3\n \n return scores",
"objective": 0.04618,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score of each bin using a combination of the bin's remaining capacity and the item's size, taking into account the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item) * np.sqrt(bins[bins != max_capacity] / item)\n \n return scores",
"objective": 0.04628,
"other_inf": null
},
{
"algorithm": "The algorithm scores bins based on a combination of their remaining capacity, the item size, and the squared difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = np.exp(-bin_capacities[i] / item) * (i + 1) * np.exp(-(bins[i] - item) ** 2 / item ** 2)\n \n return scores",
"objective": 0.04709,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_20.json
================================================
[
{
"algorithm": "The new algorithm scores based on the bin's total utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, the square roots of the bin's maximum capacity and the item size, and the item's contribution to the bin's fullness.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins) * np.sqrt(item) + item * (bins - item + 1) / bins\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "The newly developed algorithm calculates the scores based on the bin's current utilization, the number of times the bin has been used, the cubic root of the bin's maximum capacity, the harmonic mean between the item's size and the bin's capacity, the reciprocal of the difference between the bin's remaining capacity and the item's size, and the geometric mean between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins.max(), 1/3) + 2 * item * bins / (item + bins) + 1 / np.abs(bins - item) + np.sqrt(bins - item) * np.sqrt(item)\n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest rest capacity relative to item size, considering only bins with rest capacity below the maximum capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.max(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the modified number of times the bin has been used, the difference between the bin's capacity and the item size, and the cube root of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + 2 * np.arange(len(bins)) + bins - item + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01016,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's total utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, the square roots of the bin's maximum capacity and the item size, and the item's contribution to the bin's fullness.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3) + np.sqrt(bins) * np.sqrt(item) + item * (bins - item + 1) / bins\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "The underlying common concept in the provided algorithms is the combination of bin utilization, usage frequency, and the relationship between bin capacity and item size, which can be extended by adding a logarithmic term to capture the gap between bin capacity and item size.}*\n\n* *{The new algorithm scores bins based on the combination of bin utilization, usage frequency, logarithmic difference between bin capacity and item size, and the geometric mean of bin capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.log(bins - item + 1) + np.sqrt(bins * item)\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the lowest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / bins[surplus > 0]\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm scores based on the bin's current utilization, the number of times the bin has been used, the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity, and the square roots of the bin's maximum capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/6) + np.power(bins - item + 1, 1/6) + np.sqrt(bins) * np.sqrt(item)\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "Scores are developed as the sum of the current utilization of the bins, the number of times the bins have been utilized, the geometric mean of the item's size and bin's capacity, and exponential of difference between the bin's maximum capacity and bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins) + np.exp(bins - bins.max())\n return scores",
"objective": 0.01248,
"other_inf": null
},
{
"algorithm": "The newly developed algorithm calculates the scores based on the bin's current utilization, the number of times the bin has been used, the cubic root of the bin's maximum capacity, the harmonic mean between the item's size and the bin's capacity, the reciprocal of the difference between the bin's remaining capacity and the item's size, and the geometric mean between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + 2 * item * bins / (item + bins)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a score for each bin based on the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + 1 / np.abs(bins - item)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm calculates a score for each bin based on the bin's current utilization, the number of times the bin has been used, the geometric mean of the bin's capacity and the item size, the reciprocal of the difference between the bin's remaining capacity and the item size, the item utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins * item) + 1 / np.abs(bins - item) + 1 / np.abs(bins - item) ** 2 + item / bins\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm computes the score based on the bin's maximum capacity, the bin's current utilization, the number of times the bin has been used, and the harmonic mean between the item's size and the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins.max() / (bins - item + 1) + bins / (bins - item + 1) + np.arange(len(bins)) + 2 * item * (bins - item) / (item + bins - item)\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "New algorithm: This algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power, where the exponent of the power is a parameter.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**1.5\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin increases with a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)**2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the maximum surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (surplus[surplus > 0] - np.mean(surplus)) / (bins[surplus > 0] + np.sqrt(item))\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "Take the average of the top three highest scores in the original algorithm and combine it with the mean of the bin capacities.",
"code": "import numpy as np\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + (bins + item) / 2 - np.sqrt(np.var(np.power(bins - item + 1, 1/3)))\n return scores",
"objective": 0.01519,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_3.json
================================================
[
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_bin = np.max(bins) # Determine the maximum bin capacity\n surplus = bins - item # Calculate the surplus capacity in each bin\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - max_bin) / surplus[surplus > 0] # Calculate scores based on relative surplus capacity\n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with greater remaining capacity and takes into consideration the maximum capacity of existing bins when assigning items, aiming to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins[bins >= item]) * (max_capacity / bins[bins >= item])\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins))\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores based on the number of bins needed to accommodate the remaining items after placing the current item in each bin, while maximizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_bins = max(bins / item)\n scores = (max_bins - 1) * bins - item * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The algorithm assigns scores to each bin based on its remaining capacity and the item's size, where bins with a higher remaining capacity receive higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1/item) * bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the linear combination of its relative over-capacity (relative to the item), index, and the inverse of its relative remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n relative_over_capacities = (bins - max_capacity) / max_capacity\n relative_remaining_capacities = bin_capacities / item\n scores = -1.0 * relative_over_capacities - np.log(relative_remaining_capacities) - np.arange(len(bins))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the maximum possible item that can be assigned to it, the remaining capacity, and the square of the gap between the bin capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.maximum(bins[bins >= item] - item, item) - np.power(np.maximum(bins[bins >= item] - item - 1, 0), 2)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the maximum possible item that can be assigned to it, the remaining capacity, and the gap between the bin capacity and item size",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.maximum(bins[bins >= item] - item, item) - np.maximum(bins[bins >= item] - item - 1, 0)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm adjusts the weights of the bin's rest capacity and bin's index to adapt to specific scenarios, achieving better performance in minimizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (i + 1) * (1 - bins[i] / item)\n \n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / bins\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " Prioritize bins which have over-capacities considering their indices and the inverse of their relative rest capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n relative_over_capacities = (bins - max_capacity) / max_capacity\n relative_remaining_capacities = bin_capacities / item\n scores = relative_over_capacities * (1.0 + np.log(relative_remaining_capacities)) + np.arange(len(bins))**2\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, where the score is calculated as the bin's current capacity divided by the item size, plus the bin's number of remaining items",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item + np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores based on the number of bins needed to accommodate the remaining items after placing the current item in each bin, while maximizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_bins = np.max(np.ceil(bins / item)) # Calculate the maximum number of bins needed to hold the remaining items\n scores = max_bins * bins - item * np.arange(1, len(bins) + 1) # Calculate scores\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm adjusts the weights of the bin's rest capacity and bin's index to adapt to specific scenarios, achieving better performance in minimizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (1 - bin_capacities[i] / item) * (i + 1) * np.exp(-bins[i] / item)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins[bins >= item] - item/2)\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Algorithm Description: Calculate the score for each bin, which is inversely proportional to its rest capacity (relative to the item) and bin's index and modulated by a weight term.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (bins[i] / item) * (1 / (i + 1)) * (1 - bin_capacities[i] / item)\n \n return scores",
"objective": 0.04276,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_4.json
================================================
[
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins, max_bin=100): # Define a fixed maximum bin capacity\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - max_bin) / surplus[surplus > 0]\n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "Considering both bin utilization and item size with non-uniform weighting of bins, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / (surplus + 1) - np.arange(len(bins)) * surplus ** 2 / (bins + 1)\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins)) + np.sqrt(np.maximum(bins - item, 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, but it penalizes the bins with smaller rest capacity more heavily, in order to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1)\n scores[bins < 2 * item] = scores[bins < 2 * item] / 2\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Considering bin utilization and item size, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / surplus - np.arange(len(bins)) * surplus ** 2\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with greater remaining capacity and takes into consideration the maximum capacity of existing bins when assigning items, aiming to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins[bins >= item]) * (max_capacity / bins[bins >= item])\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins))\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores based on the number of bins needed to accommodate the remaining items after placing the current item in each bin, while maximizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_bins = max(bins / item)\n scores = (max_bins - 1) * bins - item * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The algorithm assigns scores to each bin based on its remaining capacity and the item's size, where bins with a higher remaining capacity receive higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1/item) * bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a weighted sum of the inverse of the remaining capacity and the item size, with a higher weight for the inverse of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1.5 / (bins - item + 1) + 0.5 * item / bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the linear combination of its relative over-capacity (relative to the item), index, and the inverse of its relative remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n bin_capacities = bins - item\n relative_over_capacities = (bins - max_capacity) / max_capacity\n relative_remaining_capacities = bin_capacities / item\n scores = -1.0 * relative_over_capacities - np.log(relative_remaining_capacities) - np.arange(len(bins))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of its index and the negative logarithm of its relative remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_capacities = bins - item\n scores = -np.log(bin_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The algorithm evaluates bins based on their remaining capacity and the number of bins required to accommodate the remaining items, maximizing the utilization of bins with more space while minimizing the need for additional bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_bins = max(bins / item)\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins[bins >= item] / item - np.arange(1, len(bins[bins >= item]) + 1)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the maximum possible item that can be assigned to it, the remaining capacity, and the gap between the bin capacity and item size",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.maximum(bins[bins >= item] - item, item) - np.maximum(bins[bins >= item] - item - 1, 0)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The algorithm evaluates each bin based on its remaining capacity after accommodating the item and prioritizes bins with the maximum available space along with the smallest remaining gap.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n rem = bins[bins >= item] - item\n scores[bins >= item] = np.maximum(rem, item) - rem * np.maximum(rem - 1, 0) / item\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / bins\n return scores",
"objective": 0.04095,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_5.json
================================================
[
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index decreases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 + bins - np.arange(len(bins)) + item / (bins - item + 1) + 1\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins, max_bin=100): # Define a fixed maximum bin capacity\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - max_bin) / surplus[surplus > 0]\n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increase. However, it also considers the average of the remaining capacities of all the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / (np.arange(len(bins)) + 1)) + np.mean(bins[bins >= item])\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Prefers bins based on their remaining capacity and the space left after assigning the item, maximizing space utilization while considering the size of the item",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / surplus * (surplus + item) - np.arange(len(bins)) * surplus\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increases. However, now the fraction term gives more weight to the bins near the current assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / ((np.arange(len(bins)) + 1)**2))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Considering both bin utilization and item size with non-uniform weighting of bins, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / (surplus + 1) - np.arange(len(bins)) * surplus ** 2 / (bins + 1)\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the sum of the following: a fraction of the item size divided by the difference between the bin's remaining capacity and the item size, plus the square root of the ratio between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins - item + 1)) + np.sqrt(bins / item)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins)) + np.sqrt(np.maximum(bins - item, 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assigns an item to the bin which maximizes a score that is the sum of a bin index term that decreases as the bin index increases, a term that decreases as the remaining capacity of the bin decreases, and a constant that prevents bin index zero from having zero score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.arange(len(bins)) + 1 + item / (bins - item + 1) + 1\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Considering bin utilization and item size, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / surplus - np.arange(len(bins)) * surplus ** 2\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with greater remaining capacity and takes into consideration the maximum capacity of existing bins when assigning items, aiming to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins[bins >= item]) * (max_capacity / bins[bins >= item])\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins))\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + 0.5\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate scores based on a weighted combination of the inverse of the remaining capacity, the size of the item, and the maximum number of bins needed to accommodate the remaining items after placing the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins - item + 1))**2 + (bins / (bins + item))**2\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores based on the number of bins needed to accommodate the remaining items after placing the current item in each bin, while maximizing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_bins = max(bins / item)\n scores = (max_bins - 1) * bins - item * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The algorithm assigns scores to each bin based on its remaining capacity and the item's size, where bins with a higher remaining capacity receive higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (-1/item) * bins\n return scores",
"objective": 0.03984,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_6.json
================================================
[
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index decreases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 + bins - np.arange(len(bins)) + item / (bins - item + 1) + 1\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins, max_bin=100): # Define a fixed maximum bin capacity\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - max_bin) / surplus[surplus > 0]\n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the sum of the following: a fraction of the item size divided by the difference between the bin's remaining capacity and the item size, plus the square root of the ratio between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins) + np.sqrt(bins / item)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Algorithm: Iterate through bins to score with better scores if the rest capacities are higher than the capacity. If so, score with item size divided by rest capacity times an item size dependent factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins - item + 1)) * (item / max(bins[bins >= item]))\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increase. However, it also considers the average of the remaining capacities of all the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / (np.arange(len(bins)) + 1)) + np.mean(bins[bins >= item])\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Prefers bins based on their remaining capacity and the space left after assigning the item, maximizing space utilization while considering the size of the item",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / surplus * (surplus + item) - np.arange(len(bins)) * surplus\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increases. However, now the fraction term gives more weight to the bins near the current assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / ((np.arange(len(bins)) + 1)**2))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Considering both bin utilization and item size with non-uniform weighting of bins, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / (surplus + 1) - np.arange(len(bins)) * surplus ** 2 / (bins + 1)\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the sum of the following: a fraction of the item size divided by the difference between the bin's remaining capacity and the item size, plus the square root of the ratio between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins - item + 1)) + np.sqrt(bins / item)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Considering both bin utilization and item size with non-uniform weighting of bins, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / (surplus + 1) - np.arange(len(bins)) * surplus / (bins + 1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins)) + np.sqrt(np.maximum(bins - item, 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assigns an item to the bin which maximizes a score that is the sum of a bin index term that decreases as the bin index increases, a term that decreases as the remaining capacity of the bin decreases, and a constant that prevents bin index zero from having zero score.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = np.arange(len(bins)) + 1 + item / (bins - item + 1) + 1\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Considering bin utilization and item size, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins)) * (bins - item) ** 2\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with greater remaining capacity and takes into consideration the maximum capacity of existing bins when assigning items, aiming to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins[bins >= item]) * (max_capacity / bins[bins >= item])\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins))\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + 0.5\n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_7.json
================================================
[
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the product of a term that increases as the bin index decreases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1 + bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins, max_bin=100): # Define a fixed maximum bin capacity\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - max_bin) / surplus[surplus > 0]\n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the sum of the following: a fraction of the item size divided by the difference between the bin's remaining capacity and the item size, plus the square root of the ratio between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins) + np.sqrt(bins / item)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Algorithm: Iterate through bins to score with better scores if the rest capacities are higher than the capacity. If so, score with item size divided by rest capacity times an item size dependent factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins - item + 1)) * (item / max(bins[bins >= item]))\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increase. However, it also considers the average of the remaining capacities of all the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / (np.arange(len(bins)) + 1)) + np.mean(bins[bins >= item])\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Prefers bins based on their remaining capacity and the space left after assigning the item, maximizing space utilization while considering the size of the item",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / surplus * (surplus + item) - np.arange(len(bins)) * surplus\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increases. However, now the fraction term gives more weight to the bins near the current assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / ((np.arange(len(bins)) + 1)**2))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Considering both bin utilization and item size with non-uniform weighting of bins, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / (surplus + 1) - np.arange(len(bins)) * surplus ** 2 / (bins + 1)\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Considering bin utilization and item size, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n epsilon = 1e-6\n scores = bins / np.maximum(epsilon, bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Considering both bin utilization and item size with non-uniform weighting of bins, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / (surplus + 1) - np.arange(len(bins)) * surplus / (bins + 1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Adds a term to the score that prioritizes bins with a higher capacity. If a bin has a capacity 50% higher than the item, the score is increased by the square root of the difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(np.minimum(bins, item)/item**2) + np.sqrt(1 / (np.arange(len(bins)) + 1))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins)) + np.sqrt(np.maximum(bins - item, 1))\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increase. However, it also considers the average of the remaining capacities of all the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.mean(bins[bins >= item])\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Considering bin utilization and item size, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins)) * (bins - item) ** 2\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins with greater remaining capacity and takes into consideration the maximum capacity of existing bins when assigning items, aiming to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins[bins >= item]) * (max_capacity / bins[bins >= item])\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins))\n return scores",
"objective": 0.03944,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_8.json
================================================
[
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the logarithm of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log(bins - item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - np.max(bins)) / surplus[surplus > 0]\n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, the square root of the difference between the bin's capacity and the item size, and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1) + np.log(bins)\n return scores",
"objective": 0.0335,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the sum of the following: a fraction of the item size divided by the difference between the bin's remaining capacity and the item size, plus the square root of the ratio between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins) + np.sqrt(bins / item)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.03662,
"other_inf": null
},
{
"algorithm": "Algorithm: Iterate through bins to score with better scores if the rest capacities are higher than the capacity. If so, score with item size divided by rest capacity times an item size dependent factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins - item + 1)) * (item / bins.max())\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin that maximizes a score which includes a capacity term that increases as the remaining capacity of the bin decreases, and also a term that decreases as the bin index increase. However, it also considers the average of the remaining capacities of all the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / (bins - item + 1) + np.sqrt(1 / (np.arange(len(bins)) + 1)) + np.mean(bins[bins >= item])\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Prefers bins based on their remaining capacity and the space left after assigning the item, maximizing space utilization while considering the size of the item",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / surplus * (surplus + item) - np.arange(len(bins)) * surplus\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, the square root of the difference between the bin's capacity and the item size, and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.log(bins)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Considering both bin utilization and item size with non-uniform weighting of bins, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / (surplus + 1) - np.arange(len(bins)) * surplus ** 2 / (bins + 1)\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Considering bin utilization and item size, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n epsilon = 1e-6\n scores = bins / np.maximum(epsilon, bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Considering both bin utilization and item size with non-uniform weighting of bins, priority is given to bins that can accommodate the item with the least amount of remaining capacity while maximizing the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / (surplus + 1) - np.arange(len(bins)) * surplus / (bins + 1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates scores for each bin by considering the bin's remaining capacity and the size of the item, and then prioritizing bins with smaller remaining capacities and larger capacities relative to the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * (np.maximum(bins - item, 0) / item + 1) - np.arange(len(bins))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum(bins - item, 1) + np.arange(len(bins)) + np.sqrt(np.maximum(bins - item, 1))\n return scores",
"objective": 0.03894,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run1/population_generation_9.json
================================================
[
{
"algorithm": "Scores are computed as the sum of the bin's current utilization, the number of times the bin has been used, and the geometric mean between the item size and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(item * bins)\n return scores",
"objective": 0.01227,
"other_inf": null
},
{
"algorithm": "Algorithm: Start by calculating a tentative score for each bin by subtracting the bin capacity from the maximum capacity and then dividing the result by the item size. Round the resulting scores down to the nearest integer and, if the rest capacity of a bin is less than or equal to the item size, set its score to 0. Finally, return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins <= item] = 0\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score that is calculated as the sum of a term that increases as the bin index increases and a term that increases as the remaining capacity of the bin decreases.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = bins - np.arange(len(bins)) + item / (bins - item + 1)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "My new algorithm considers the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + 1 / (bins - item + 1)\n return scores",
"objective": 0.0169,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the logarithm of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.log(bins - item + 1)\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the cube root of the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity, and the cube root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.power(bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.power(bins - item + 1, 1/3), 1/3)\n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score as the sum of the bin's current utilization, the number of times the bin has been used, the bin's remaining capacity and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + bins + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - np.mean(bins)) / surplus[surplus > 0]\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Prioritize bins with the highest surplus capacity relative to item size, considering only bins below the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = np.zeros_like(surplus)\n scores[surplus > 0] = (bins[surplus > 0] - np.max(bins)) / surplus[surplus > 0]\n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "Calculate scores based on bin capacities, item size, and a penalty for near-full bins to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ceil((bins - np.max(bins)) / item)\n scores[bins + item >= np.max(bins)] -= 1\n scores[bins <= item] = 0\n return scores",
"objective": 0.02817,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, the square root of the difference between the bin's capacity and the item size, and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1) + np.log(bins)\n return scores",
"objective": 0.0335,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the sum of the following: a fraction of the item size divided by the difference between the bin's remaining capacity and the item size, plus the square root of the ratio between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / bins) + np.sqrt(bins / item)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.sqrt(bins - item + 1)\n return scores",
"objective": 0.03662,
"other_inf": null
},
{
"algorithm": "The score is computed as the sum of the bin's current utilization, the number of times the bin has been used, and the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Algorithm: Iterate through bins to score with better scores if the rest capacities are higher than the capacity. If so, score with item size divided by rest capacity times an item size dependent factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = (item / (bins - item + 1)) * (item / bins.max())\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "The score is computed as the sum of the bin's current utilization, the number of times the bin has been used, and the cube roots of the difference between the bin's capacity and the item size and the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.power(bins - item + 1, 1/3)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Prefers bins based on their remaining capacity and the space left after assigning the item, maximizing space utilization while considering the size of the item",
"code": "import numpy as np\n\ndef score(item, bins):\n surplus = bins - item\n scores = bins / surplus * (surplus + item) - np.arange(len(bins)) * surplus\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, the square root of the difference between the bin's capacity and the item size, and the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins)) + np.log(bins)\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the sum of the bin's current utilization, the number of times the bin has been used, and the square root of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins))\n return scores",
"objective": 0.03833,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin, while avoiding using bins with the maximum rest capacity. The goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item)\n\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, calculated by subtracting the item size from the bin capacity, and avoids using bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin based on its current rest capacity and the size of the item, where the score is equal to the absolute value of the difference between the rest capacity and the item size, multiplied by -1 if the bin is empty, to prioritize filling the empty bins first, or multiplied by 1 if the bin is not empty.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(bins - item) * np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))\n return scores",
"objective": 0.13281,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = bins[i] - item\n else:\n scores[i] = -1000\n \n return scores",
"objective": 0.14418,
"other_inf": null
},
{
"algorithm": "The algorithm first calculates the score for each bin by dividing the rest capacity of the bin by the item size, then subtracting 1 if the rest capacity equals the maximum capacity. Next, it sets the score to 0 if the rest capacity is less than the item size. Finally, it returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(bins, item)\n scores[bins == np.max(bins)] -= 1\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, considering the rest capacity of the bin, and returns the scores for all bins after the assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize an array of scores with zeros\n\n # Calculate the score for each bin based on their rest capacity\n scores = np.where(bins == np.max(bins), 0, bins - np.max(bins) + item + 1)\n \n return scores",
"objective": 0.32971,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Calculate the ratio of the capacity remaining in each bin to the size of the current item.\n2. Assign a score of 0 to bins that have the same capacity as their maximum capacity.\n3. Assign a score of 1 to bins whose remaining capacity is 1 larger than the size of the current item.\n4. Assign a score of 2 to bins whose remaining capacity is 2 larger than the size of the current item.\n5. Assign a score of 3 to bins whose remaining capacity is 3 larger than the size of the current item.\n6. Continue this pattern and assign scores in increasing order to bins with increasing available capacity.\n7. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item) # Assign scores based on ratio\n return scores",
"objective": 0.36543,
"other_inf": null
},
{
"algorithm": "The algorithm scores each bin based on a score function that takes into account both the remaining capacity of the bin and the size of the item being assigned. The main steps of the algorithm are: \n1. Initialize an empty Numpy array 'scores' with the same size as 'bins' to store the scores for each bin.\n2. Calculate the score for each bin by dividing the remaining capacity of the bin by the size of the item, and store the result in the corresponding index of 'scores'.\n3. Return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = bins[bins > item] / item\n return scores",
"objective": 0.3763,
"other_inf": null
},
{
"algorithm": "\nThe algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment.\nThe main steps of the algorithm are as follows:\n1. Calculate the available capacities of all bins by subtracting 'item' from 'bins'.\n2. Filter out the bins with available capacity equal to the maximum capacity ('bins_max') using a mask.\n3. Assign a score of 0 to all bins that have 'bins_max' capacity.\n4. For the remaining bins, calculate the score by dividing the available capacity by the difference between 'bins_max' and the available capacity.\n5. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score for each bin is calculated as the difference between the rest capacity and twice the size of the item, with a lower bound of zero, and the final scores are stored in a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - 2 * item, 0)\n return scores",
"objective": 0.86699,
"other_inf": null
},
{
"algorithm": "The novel score function assigns an item to the bin with the maximum score, taking into account the rest capacity of each bin, and aims to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = item - bins[mask]\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "We first calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, and then subtract 1 from the score of the bin with the maximum capacity. Finally, we return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n max_index = np.argmax(bins)\n scores[max_index] -= 1\n return scores",
"objective": 1.51484,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin by dividing the rest capacity of the bin by the size of the item and subtracting it from the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins) / item\n scores = (bins / item) - max_score\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_1.json
================================================
[
{
"algorithm": "Prioritize bins with more remaining capacity by giving them higher scores. If a bin's capacity is less than twice the item's size, assign a score of 0 to it.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n scores = np.zeros_like(bins)\n scores[(capacities > 0) & (capacities < 2 * item)] = 1 / capacities[(capacities > 0) & (capacities < 2 * item)]\n scores[capacities >= 2 * item] = 1\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "Score bins based on the inverse of the ratio of the bin's remaining capacity to the item's size, with a penalty factor for partially used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0.0, 1.0 / ((bins / item) - np.floor(bins / item)))\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins.max() - bins - item\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Prioritize empty bins and maximize the utilization rate of bins by calculating the score based on the rest capacity and utilization rate of each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1/(1 + np.abs(bins - item))*np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))*np.where(bins == np.max(bins),\n 3,\n bins/np.max(bins))\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / bins[bins >= item]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "This algorithm differs in the score function by adding the square of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) ** 2\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign items to bins based on a score function, similar to Algorithm 1; Each bin receives the item with the highest score, with a maximum score of one; empty bins are not used; aim to minimize the number of bins used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins\n scores[scores > 1.0] = 1.0\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, while a bin with a score equals zero will not be used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / np.log2(bins[bins != max_capacity])\n scores[scores == np.inf] = 0.\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "My algorithm assigns the item to the bin with the maximum score, where the score is calculated as the product of the bin's rest capacity and the inverse of the difference between the size of the item and the rest capacity of the bin, while giving priority to filling bins with a smaller capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * np.where(bins != item, 1 / (bins - item), 0)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Score bins with lower remaining capacities with higher values. If a bin's capacity is equal to the item's size, assign a score of 0 to it.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n scores = np.zeros_like(bins)\n scores[capacities != item] = 1 / capacities[capacities != item]\n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the highest score, calculated as the product of bin capacity and the number of items the bin can fit with current item",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n \n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n fit_count = (bin_capacity - item) // item\n scores[i] = bin_capacity * fit_count\n \n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "Assign bins based on the following score formula: score = (1 - (bin capacity / maximum capacity)) * ( remaining capacity / item size ) * (remaining capacity / remaining capacity after placing the item)",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n\n scores = (1 - (bins / max_capacity)) * (bins - item) / item * (bins - item) / np.maximum(bins - 2 * item, 1)\n\n return scores",
"objective": 0.11591,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin by dividing the remaining capacity of the bin by the square root of the difference between the maximum bin capacity and the current item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n scores[bins != max_capacity] = bins[bins != max_capacity] / np.sqrt(max_capacity - item)\n return scores",
"objective": 0.11732,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "The modified algorithm calculates scores by taking the natural logarithm of the ratios, multiplying them by an increasing factor, and adding a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = np.log(bins.astype(float) / item)\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor and adding a constant\n scores = ratios * np.arange(1, len(bins)+1) + 1\n \n return scores",
"objective": 0.12899,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a higher score to bins that are closer to being filled up to their maximum capacity, giving priority to bins that are close to becoming full.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = -np.abs(bins-item) - np.square(bins-np.max(bins)) / np.max(bins)\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, while penalizing bins with a smaller capacity than the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / (bins[bins != max_capacity] - item + 1)\n scores[bins == max_capacity] = np.log10(max_capacity)\n return scores",
"objective": 0.13251,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_10.json
================================================
[
{
"algorithm": "New algorithm: Prioritizes bins with higher remaining capacity by incorporating a logarithmic function that assigns higher scores to bins with greater capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities / item ** 2\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "Improved algorithm considers the number of items in the bin, the current bin capacity, and the total number of items in all bins",
"code": "import numpy as np\n\ndef score(item, bins):\n num_items_per_bin = bins / item\n bin_capacities = bins - item\n total_num_items = np.sum(num_items_per_bin)\n total_bin_capacities = np.sum(bin_capacities)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + (num_items_per_bin - np.floor(num_items_per_bin)) / (1.0 - (num_items_per_bin - np.floor(num_items_per_bin)))) * (1.0 + bin_capacities / (total_bin_capacities - bin_capacities)) * (1.0 + total_num_items / (total_bin_capacities - total_num_items))\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with lower scores to prioritize their utilization, and factor in the relative remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 + np.where(remaining_capacities <= (max_capacity / 10), np.log(remaining_capacities / item), 0.0)\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity and the inverse of the square root of the number of items in the bin, with weights adjusted by the square of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (np.log(num_items_in_bin + 1) + 1) * remaining_capacities * (bins ** 2) / ((bins / item) - np.floor(bins / item)) ** 2 * 1.0 / (max_capacity ** 2)\n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a sigmoid function to penalize bins with higher loads, which encourages assigning items to bins with lower loads to balance the loads.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity - 0.5)))\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "The new algorithm evaluates the bin score based on a weighted combination of the bin capacity and the ratio of the item size to the bin capacity, while considering the current remaining capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * (1.0 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))) + (max_capacity - bins) / (max_capacity - item)\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Uses an exponential function to penalize bins with low remaining capacity to encourage utilization of bins with higher capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - (bins // item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity by scoring them exponentially based on their capacity ratio and penalizing bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * np.exp(remaining_capacities / max_capacity)\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2)\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Computes a score for each bin based on its capacity modulation, weighted by its remaining capacity and penalized for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with negative scores to prioritize their utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 + np.where(remaining_capacities <= (max_capacity / 10), -1.0, 0.0)\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "The proposed algorithm assigns items to bins by evaluating the bin score based on a combination of the bin's remaining capacity, the bin's maximum capacity, and the item size, while also considering the number of items in each bin and the total number of items in all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n total_num_items = np.sum(num_items_in_bin)\n total_bin_capacities = np.sum(bins)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + (num_items_in_bin - np.floor(num_items_in_bin)) / (1.0 - (num_items_in_bin - np.floor(num_items_in_bin)))) * (1.0 + (remaining_capacities / np.max(remaining_capacities)) * (1.0 + (bins / max_capacity))) * (1.0 + (total_num_items / total_bin_capacities))\n return scores",
"objective": 0.01529,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(bins / item))))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Minimize the number of bins by scoring bins based on their capacity and utilization ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n if bins[bins.shape[0]-1] >= max_capacity:\n bins[bins.shape[0]-1] = max_capacity - item\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the ratio of the maximum achievable capacity to the actual capacity for each bin if the current item would be assigned to it.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (np.floor((bins + item) / max_capacity) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the cubic root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) ** 2 * (bins ** (1/3)) / (max_capacity ** (1/3))\n return scores",
"objective": 0.0158,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_11.json
================================================
[
{
"algorithm": "New algorithm: Prioritizes bins with higher remaining capacity by incorporating a logarithmic function that assigns higher scores to bins with greater capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities / item ** 2\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic component by the number of times a bin has been used",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "Improved algorithm considers the number of items in the bin, the current bin capacity, and the total number of items in all bins",
"code": "import numpy as np\n\ndef score(item, bins):\n num_items_per_bin = bins / item\n bin_capacities = bins - item\n total_num_items = np.sum(num_items_per_bin)\n total_bin_capacities = np.sum(bin_capacities)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + (num_items_per_bin - np.floor(num_items_per_bin)) / (1.0 - (num_items_per_bin - np.floor(num_items_per_bin)))) * (1.0 + bin_capacities / (total_bin_capacities - bin_capacities)) * (1.0 + total_num_items / (total_bin_capacities - total_num_items))\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity and greater occupancy while penalizing bins with low remaining capacity and high occupancy.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n occupancy_rate = 1.0 - remaining_capacities / bins\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * (1.0 + np.exp(-occupancy_rate / (1.0 - occupancy_rate))) / (1.0 + np.exp(-(remaining_capacities / item) / (remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with lower scores to prioritize their utilization, and factor in the relative remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 + np.where(remaining_capacities <= (max_capacity / 10), np.log(remaining_capacities / item), 0.0)\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity and the inverse of the square root of the number of items in the bin, with weights adjusted by the square of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (np.log(num_items_in_bin + 1) + 1) * remaining_capacities * (bins ** 2) / ((bins / item) - np.floor(bins / item)) ** 2 * 1.0 / (max_capacity ** 2)\n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a sigmoid function to penalize bins with higher loads, which encourages assigning items to bins with lower loads to balance the loads.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(bins / max_capacity - 0.5)))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "Assign a score by combining the basic component of the previous algorithms, a capacity modulation factor, and a score decay factor penalized for bins with a low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5 * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2)\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a sigmoid function to penalize bins with higher loads, which encourages assigning items to bins with lower loads to balance the loads.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity - 0.5)))\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / (bins / item - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-remaining_capacities))\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Uses an exponential function to penalize bins with low remaining capacity to encourage utilization of bins with higher capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - (bins // item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity by scoring them exponentially based on their capacity ratio and penalizing bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * np.exp(remaining_capacities / max_capacity)\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2)\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Computes a score for each bin based on its capacity modulation, weighted by its remaining capacity and penalized for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with negative scores to prioritize their utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 + np.where(remaining_capacities <= (max_capacity / 10), -1.0, 0.0)\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "The proposed algorithm assigns items to bins by evaluating the bin score based on a combination of the bin's remaining capacity, the bin's maximum capacity, and the item size, while also considering the number of items in each bin and the total number of items in all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n total_num_items = np.sum(num_items_in_bin)\n total_bin_capacities = np.sum(bins)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + (num_items_in_bin - np.floor(num_items_in_bin)) / (1.0 - (num_items_in_bin - np.floor(num_items_in_bin)))) * (1.0 + (remaining_capacities / np.max(remaining_capacities)) * (1.0 + (bins / max_capacity))) * (1.0 + (total_num_items / total_bin_capacities))\n return scores",
"objective": 0.01529,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.01539,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_12.json
================================================
[
{
"algorithm": "New algorithm: Prioritizes bins with higher remaining capacity by incorporating a logarithmic function that assigns higher scores to bins with greater capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities / item ** 2\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic part of the score function with the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the exponent of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a combination of logarithmic and exponential functions, considering the item size, bin capacity, and an adjustment factor to encourage utilization of less-filled bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = bins / (bins - item)\n score_2 = np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n score_3 = np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n scores = score_1 * score_2 + score_3 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic component by the number of times a bin has been used",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "Improved algorithm considers the number of items in the bin, the current bin capacity, and the total number of items in all bins",
"code": "import numpy as np\n\ndef score(item, bins):\n num_items_per_bin = bins / item\n bin_capacities = bins - item\n total_num_items = np.sum(num_items_per_bin)\n total_bin_capacities = np.sum(bin_capacities)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + (num_items_per_bin - np.floor(num_items_per_bin)) / (1.0 - (num_items_per_bin - np.floor(num_items_per_bin)))) * (1.0 + bin_capacities / (total_bin_capacities - bin_capacities)) * (1.0 + total_num_items / (total_bin_capacities - total_num_items))\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))))\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity and greater occupancy while penalizing bins with low remaining capacity and high occupancy.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n occupancy_rate = 1.0 - remaining_capacities / bins\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * (1.0 + np.exp(-occupancy_rate / (1.0 - occupancy_rate))) / (1.0 + np.exp(-(remaining_capacities / item) / (remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity and the inverse of the square root of the number of items in the bin, with weights adjusted by the square of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (np.log(num_items_in_bin + 1) + 1) * remaining_capacities * (bins ** 2) / ((bins / item) - np.floor(bins / item)) ** 2 * 1.0 / (max_capacity ** 2)\n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a sigmoid function to penalize bins with higher loads, which encourages assigning items to bins with lower loads to balance the loads.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(bins / max_capacity - 0.5)))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "Assign a score by combining the basic component of the previous algorithms, a capacity modulation factor, and a score decay factor penalized for bins with a low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5 * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2)\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a sigmoid function to penalize bins with higher loads, which encourages assigning items to bins with lower loads to balance the loads.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity - 0.5)))\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / (bins / item - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-remaining_capacities))\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Uses an exponential function to penalize bins with low remaining capacity to encourage utilization of bins with higher capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - (bins // item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity by scoring them exponentially based on their capacity ratio and penalizing bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * np.exp(remaining_capacities / max_capacity)\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2)\n return scores",
"objective": 0.01499,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_13.json
================================================
[
{
"algorithm": "New algorithm: Prioritizes bins with higher remaining capacity by incorporating a logarithmic function that assigns higher scores to bins with greater capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities / item ** 2\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic part of the score function with the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the exponent of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a combination of logarithmic and exponential functions, considering the item size, bin capacity, and an adjustment factor to encourage utilization of less-filled bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = bins / (bins - item)\n score_2 = np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n score_3 = np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n scores = score_1 * score_2 + score_3 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic component by the number of times a bin has been used",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it divided by the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))) / (np.floor(bins / item) + 1))\n return scores",
"objective": 0.01217,
"other_inf": null
},
{
"algorithm": "Improved algorithm considers the number of items in the bin, the current bin capacity, and the total number of items in all bins",
"code": "import numpy as np\n\ndef score(item, bins):\n num_items_per_bin = bins / item\n bin_capacities = bins - item\n total_num_items = np.sum(num_items_per_bin)\n total_bin_capacities = np.sum(bin_capacities)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + (num_items_per_bin - np.floor(num_items_per_bin)) / (1.0 - (num_items_per_bin - np.floor(num_items_per_bin)))) * (1.0 + bin_capacities / (total_bin_capacities - bin_capacities)) * (1.0 + total_num_items / (total_bin_capacities - total_num_items))\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))))\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity and greater occupancy while penalizing bins with low remaining capacity and high occupancy.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n occupancy_rate = 1.0 - remaining_capacities / bins\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * (1.0 + np.exp(-occupancy_rate / (1.0 - occupancy_rate))) / (1.0 + np.exp(-(remaining_capacities / item) / (remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A common theme is to score bins based on their remaining capacity and penalize bins with lower capacity. My new algorithm scores bins based on their relative remaining capacity and the potential number of items they can hold after adding the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * np.exp((remaining_capacities / max_capacity) ** 2)\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a sigmoid function to penalize bins with higher loads, which encourages assigning items to bins with lower loads to balance the loads.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(bins / max_capacity - 0.5)))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "Assign a score by combining the basic component of the previous algorithms, a capacity modulation factor, and a score decay factor penalized for bins with a low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5 * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2)\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize bins with lower remaining capacities to balance loads using a sigmoid function, encouraging assigning items to bins with higher remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 /((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity - 0.5)))\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / (bins / item - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-remaining_capacities))\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Uses an exponential function to penalize bins with low remaining capacity to encourage utilization of bins with higher capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - (bins // item)) * bins ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity by scoring them exponentially based on their capacity ratio and penalizing bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * np.exp(remaining_capacities / max_capacity)\n return scores",
"objective": 0.01489,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_14.json
================================================
[
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2) * np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the remaining capacity with its logarithm to prioritize bins with higher capacity and discourage assigning to bins that are nearly full.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "Further penalizing bins with low remaining capacity by multiplying the exponent of the logarithmic component by $\\sqrt{(max\\_capacity -remaining\\_capacities)}$",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.sqrt(max_capacity - remaining_capacities)\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic part of the score function with the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the exponent of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a combination of logarithmic and exponential functions, considering the item size, bin capacity, and an adjustment factor to encourage utilization of less-filled bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = bins / (bins - item)\n score_2 = np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n score_3 = np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n scores = score_1 * score_2 + score_3 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic component by the number of times a bin has been used",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it divided by the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))) / (np.floor(bins / item) + 1))\n return scores",
"objective": 0.01217,
"other_inf": null
},
{
"algorithm": "Improved algorithm considers the number of items in the bin, the current bin capacity, and the total number of items in all bins",
"code": "import numpy as np\n\ndef score(item, bins):\n num_items_per_bin = bins / item\n bin_capacities = bins - item\n total_num_items = np.sum(num_items_per_bin)\n total_bin_capacities = np.sum(bin_capacities)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + (num_items_per_bin - np.floor(num_items_per_bin)) / (1.0 - (num_items_per_bin - np.floor(num_items_per_bin)))) * (1.0 + bin_capacities / (total_bin_capacities - bin_capacities)) * (1.0 + total_num_items / (total_bin_capacities - total_num_items))\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))))\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity and greater occupancy while penalizing bins with low remaining capacity and high occupancy.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n occupancy_rate = 1.0 - remaining_capacities / bins\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * (1.0 + np.exp(-occupancy_rate / (1.0 - occupancy_rate))) / (1.0 + np.exp(-(remaining_capacities / item) / (remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it divided by the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item)) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))) / (np.floor(bins / item) + 1))\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A common theme is to score bins based on their remaining capacity and penalize bins with lower capacity. My new algorithm scores bins based on their relative remaining capacity and the potential number of items they can hold after adding the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * np.exp((remaining_capacities / max_capacity) ** 2)\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a sigmoid function to penalize bins with higher loads, which encourages assigning items to bins with lower loads to balance the loads.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(bins / max_capacity - 0.5)))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "Assign a score by combining the basic component of the previous algorithms, a capacity modulation factor, and a score decay factor penalized for bins with a low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5 * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2)\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize bins with lower remaining capacities to balance loads using a sigmoid function, encouraging assigning items to bins with higher remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 /((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity - 0.5)))\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / (bins / item - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-remaining_capacities))\n return scores",
"objective": 0.01459,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_15.json
================================================
[
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2) * np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the remaining capacity with its logarithm to prioritize bins with higher capacity and discourage assigning to bins that are nearly full.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins[-1]\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "Further penalizing bins with low remaining capacity by multiplying the exponent of the logarithmic component by $\\sqrt{(max\\_capacity -remaining\\_capacities)}$",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.sqrt(max_capacity - remaining_capacities)\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic part of the score function with the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the exponent of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm multiplies the logarithmic component by the maximum capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a combination of logarithmic and exponential functions, considering the item size, bin capacity, and an adjustment factor to encourage utilization of less-filled bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = bins / (bins - item)\n score_2 = np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n score_3 = np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n scores = score_1 * score_2 + score_3 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the power of the rest capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins ** 2 / (bins - item) * np.log(bins + 1) ** np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic component by the number of times a bin has been used",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it divided by the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))) / (np.floor(bins / item) + 1))\n return scores",
"objective": 0.01217,
"other_inf": null
},
{
"algorithm": "Improved algorithm considers the number of items in the bin, the current bin capacity, and the total number of items in all bins",
"code": "import numpy as np\n\ndef score(item, bins):\n num_items_per_bin = bins / item\n bin_capacities = bins - item\n total_num_items = np.sum(num_items_per_bin)\n total_bin_capacities = np.sum(bin_capacities)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + (num_items_per_bin - np.floor(num_items_per_bin)) / (1.0 - (num_items_per_bin - np.floor(num_items_per_bin)))) * (1.0 + bin_capacities / (total_bin_capacities - bin_capacities)) * (1.0 + total_num_items / (total_bin_capacities - total_num_items))\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))))\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity and greater occupancy while penalizing bins with low remaining capacity and high occupancy.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n occupancy_rate = 1.0 - remaining_capacities / bins\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * (1.0 + np.exp(-occupancy_rate / (1.0 - occupancy_rate))) / (1.0 + np.exp(-(remaining_capacities / item) / (remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it divided by the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item)) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))) / (np.floor(bins / item) + 1))\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A common theme is to score bins based on their remaining capacity and penalize bins with lower capacity. My new algorithm scores bins based on their relative remaining capacity and the potential number of items they can hold after adding the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * np.exp((remaining_capacities / max_capacity) ** 2)\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "The new algorithm uses a sigmoid function to penalize bins with higher loads, which encourages assigning items to bins with lower loads to balance the loads.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(bins / max_capacity - 0.5)))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "Assign a score by combining the basic component of the previous algorithms, a capacity modulation factor, and a score decay factor penalized for bins with a low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5 * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2)\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01429,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_16.json
================================================
[
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2) * np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the remaining capacity with its logarithm to prioritize bins with higher capacity and discourage assigning to bins that are nearly full.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins[-1]\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the power of the rest capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins + 1) ** np.arange(len(bins))\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic part of the score function with the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiply the square root of the maximum capacity for each bin by the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.sqrt(max_capacity) * (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1))\n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the exponent of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "Assign items to bins with higher priority to lower-used bins but give a moderate weight to the logarithmic part.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins + 2) ** np.arange(len(bins))\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm multiplies the logarithmic component by the maximum capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a combination of logarithmic and exponential functions, considering the item size, bin capacity, and an adjustment factor to encourage utilization of less-filled bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = bins / (bins - item)\n score_2 = np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n score_3 = np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n scores = score_1 * score_2 + score_3 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the logarithmic component by the maximum possible number of items that can be packed into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_num_items = np.ceil(bins / item).astype(int)\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) * max_num_items\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the power of the rest capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins ** 2 / (bins - item) * np.log(bins + 1) ** np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic component by the number of times a bin has been used",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it divided by the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))) / (np.floor(bins / item) + 1))\n return scores",
"objective": 0.01217,
"other_inf": null
},
{
"algorithm": "Improved algorithm considers the number of items in the bin, the current bin capacity, and the total number of items in all bins",
"code": "import numpy as np\n\ndef score(item, bins):\n num_items_per_bin = bins / item\n bin_capacities = bins - item\n total_num_items = np.sum(num_items_per_bin)\n total_bin_capacities = np.sum(bin_capacities)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + (num_items_per_bin - np.floor(num_items_per_bin)) / (1.0 - (num_items_per_bin - np.floor(num_items_per_bin)))) * (1.0 + bin_capacities / (total_bin_capacities - bin_capacities)) * (1.0 + total_num_items / (total_bin_capacities - total_num_items))\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))))\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity and greater occupancy while penalizing bins with low remaining capacity and high occupancy.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n occupancy_rate = 1.0 - remaining_capacities / bins\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * (1.0 + np.exp(-occupancy_rate / (1.0 - occupancy_rate))) / (1.0 + np.exp(-(remaining_capacities / item) / (remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it divided by the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item)) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))) / (np.floor(bins / item) + 1))\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it and the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n return scores",
"objective": 0.01348,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_17.json
================================================
[
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm squares the score function and adds the maximum capacity of the bin to the input item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2 + bins.max() + item\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2) * np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "The new algorithm adds the square root of the bin's maximum capacity to the item size and multiplies the score function by the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2 * bins.max() + np.sqrt(bins.max()) + item\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the remaining capacity with its logarithm to prioritize bins with higher capacity and discourage assigning to bins that are nearly full.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins[-1]\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The score is determined by the square root of how many items are already in the bin, the remaining capacity of the bin, and the size of the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) * np.log(bins) ** (np.arange(len(bins)) ** 1.3)\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm aims to maximize the normalized logarithmic component multiplied by the third power of distance between the bin capacity and the average of bin capacities",
"code": "import numpy as np\n\ndef score(item, bins):\n avg_bin = np.mean(bins)\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) * (np.square(bins - avg_bin))\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the power of the rest capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins + 1) ** np.arange(len(bins))\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "The new algorithm combines the essence of logarithmic part and exponential function, giving priority to less-occupied bins with higher remaining capacities for accommodating the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = bins / (bins - item) * np.log(bins + 2) ** np.arange(len(bins))\n score_2 = np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n scores = score_1 * score_2 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic part of the score function with the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic component by the number of times a bin has been used and add it to the result of dividing the bin capacity by the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))) * np.arange(len(bins))\n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the exponent of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "Assign items to bins with higher priority to lower-used bins but give a moderate weight to the logarithmic part.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins + 2) ** np.arange(len(bins))\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm multiplies the logarithmic component by the maximum capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Rate based on the log of the rest capacity of each bin multiplied by the inverse exponent of the number of times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins) ** (np.arange(len(bins)) + 1)) / (bins - item)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a combination of logarithmic and exponential functions, considering the item size, bin capacity, and an adjustment factor to encourage utilization of less-filled bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = bins / (bins - item)\n score_2 = np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n score_3 = np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n scores = score_1 * score_2 + score_3 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the logarithmic component by the maximum possible number of items that can be packed into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_num_items = np.ceil(bins / item).astype(int)\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) * max_num_items\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the power of the rest capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins ** 2 / (bins - item) * np.log(bins + 1) ** np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic component by the number of times a bin has been used",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute a score based on the square of the exponential function of maximum achievable capacity for each bin if the current item would be assigned to it divided by the number of already contained items.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = - (np.square(np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))) / (np.floor(bins / item) + 1))\n return scores",
"objective": 0.01217,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_18.json
================================================
[
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm squares the score function and adds the maximum capacity of the bin to the input item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2 + bins.max() + item\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2) * np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Algorithm: Raise the input item size to the power of maximum capacity, and then square the score function.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins + item) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2) ** 2\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the score function by the square root of the bin's maximum capacity and adds the square of both the item size and the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2 * bins.max() + np.sqrt(bins.max())) ** 2 + (item ** 2 + bins.max())\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the remaining capacity with its logarithm to prioritize bins with higher capacity and discourage assigning to bins that are nearly full.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins[-1]\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score is determined by the number of items the bin could accommodate besides the current item, the number of items the bin already contains, and the difference between the bin's capacity and the current item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * np.log(bins - item) * bins / (bins - item + np.arange(len(bins)) ** 2)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The score is determined by the square root of how many items are already in the bin, the remaining capacity of the bin, and the size of the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) * np.log(bins) ** (np.arange(len(bins)) ** 1.3)\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm aims to maximize the normalized logarithmic component multiplied by the third power of distance between the bin capacity and the average of bin capacities",
"code": "import numpy as np\n\ndef score(item, bins):\n avg_bin = np.mean(bins)\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) * (np.square(bins - avg_bin))\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "The new algorithm first finds the smallest bin that can accommodate the item if such a bin exists, then gives higher priority to used bins. The items are packed into the bins in a way that minimizes the number of used bins and makes the item distribution over bins as uniform as possible.",
"code": "import numpy as np\ndef score(item, bins):\n inds = np.argwhere(bins >= item).flatten()\n if len(inds) == 0:\n return np.zeros(len(bins))\n smallest_feasible_bin_idx = inds[0] \n smallest_feasible_bin = bins[inds[0]]\n scores = bins / (bins - item) * np.log(bins + 1) ** np.arange(len(bins))\n scores[inds] *= np.arange(len(inds))\n scores[smallest_feasible_bin_idx] /= np.log(smallest_feasible_bin + 1) ** 2\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the power of the rest capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins + 1) ** np.arange(len(bins))\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "Adjusted Algorithm: Assigns bins with less remaining capacity and higher scores to the current item, considering their occupancy.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = (bins / bins + 1) * np.log(bins + 2) ** np.arange(len(bins))\n score_2 = 1.0 / ((remaining_capacities / item) * (bins / item))\n scores = score_1 * score_2 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic part of the score function with the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic component by the number of times a bin has been used and add it to the result of dividing the bin capacity by the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))) * np.arange(len(bins))\n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the exponent of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "Assign items to bins with higher priority to lower-used bins but give a moderate weight to the logarithmic part.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins + 2) ** np.arange(len(bins))\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Algorithm description: The new algorithm multiplies the logarithmic component by the maximum capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Rate based on the log of the rest capacity of each bin multiplied by the inverse exponent of the number of times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins) ** (np.arange(len(bins)) + 1)) / (bins - item)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a combination of logarithmic and exponential functions, considering the item size, bin capacity, and an adjustment factor to encourage utilization of less-filled bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = bins / (bins - item)\n score_2 = np.log(bins) ** (np.arange(len(bins)) ** 1) * np.arange(len(bins))\n score_3 = np.exp(-(np.floor(bins / item) + 1) * (1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2))\n scores = score_1 * score_2 + score_3 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the logarithmic component by the maximum possible number of items that can be packed into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_num_items = np.ceil(bins / item).astype(int)\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) * max_num_items\n return scores",
"objective": 0.01187,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_19.json
================================================
[
{
"algorithm": "My new algorithm subtracts a normalized logarithmic component and the exponential function, then multiplied by a cubic form of the available rest capacity",
"code": "import numpy as np\ndef score(item, bins):\n avg_bin = np.mean(bins)\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 3 * (bins ** 3 / avg_bin ** 2) - np.exp(bins / avg_bin)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm subtracts the multiplication of the item size and the bin's maximum capacity from the square of the score function multiplied by the maximum capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.square(bins/(bins - item) + np.log(bins)**(np.arange(len(bins))**1) * bins.max())\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2) * np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Algorithm: Raise the input item size to the power of maximum capacity, and then square the score function.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins + item) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2) ** 2\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm comprises the subtraction of the square of the item size multiplied by the sum of the bin's rest capacity and the average of all bins from the quotient of the normalized logarithmic component and the cube of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n avg_bin = np.mean(bins)\n numerator = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1))\n denominator = bins.max() ** 3 * (bins + avg_bin)\n scores = ((numerator / denominator) - item ** 2) ** 2\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the score function by the square root of the bin's rest capacity and adds the product of item size and the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) * ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) ** 2 + np.sqrt(bins.max())) + item * bins.max()\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm subtracts the multiplication of the item size and the bin's maximum capacity from the square of the score function multiplied by the maximum capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2 * bins.max() - item * bins.max()) ** 2\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the remaining capacity with its logarithm to prioritize bins with higher capacity and discourage assigning to bins that are nearly full.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins[-1]\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the score function by the square root of the bin's maximum capacity and adds the square of both the item size and the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) ** 2 + np.sqrt(bins.max())) ** 2 + (item ** 2 + bins.max())\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score is determined by the number of items the bin could accommodate besides the current item, the number of items the bin already contains, and the difference between the bin's capacity and the current item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * np.log(bins - item) * bins / (bins - item + np.arange(len(bins)) ** 2)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The score is determined by the square root of how many items are already in the bin, the remaining capacity of the bin, and the size of the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) * np.log(bins) ** (np.arange(len(bins)) ** 1.3)\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the remaining capacity with its logarithm to prioritize bins with higher capacity and discourage assigning to bins that are nearly full.",
"code": "import numpy as np\n\ndef score(item, bins):\n avg_capacity = np.mean(bins)\n remaining_capacities = (bins - item) / avg_capacity\n scores = np.log(1. / remaining_capacities) * remaining_capacities\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm aims to maximize the normalized logarithmic component multiplied by the third power of distance between the bin capacity and the average of bin capacities",
"code": "import numpy as np\n\ndef score(item, bins):\n avg_bin = np.mean(bins)\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) * (np.square(bins - avg_bin))\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the cube of the score function multiplied by the bin's maximum capacity by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 3 / bins) ** 2\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "The new algorithm subtracts the square of the item size multiplied by the sum of the bin's rest capacity and the average of all bins from the product of the normalized logarithmic component and the cube of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n avg_bin = np.mean(bins)\n scores = ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 3 * (bins + avg_bin) - item ** 2) ** 2\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": "My new algorithm boosts the weight of the logarithmic part with the power of the rest capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) * np.log(bins + 1) ** np.arange(len(bins))\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "Adjusted Algorithm: Assigns bins with less remaining capacity and higher scores to the current item, considering their occupancy.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n score_1 = (bins / bins + 1) * np.log(bins + 2) ** np.arange(len(bins))\n score_2 = 1.0 / ((remaining_capacities / item) * (bins / item))\n scores = score_1 * score_2 * remaining_capacities / max_capacity\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "My new algorithm multiplies the logarithmic part of the score function with the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item / (bins - item) * np.log(bins) ** np.arange(len(bins))\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The algorithm multiplies the logarithmic component by the square of the maximum capacity of the bin",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * (bins.max()) ** 2\n return scores",
"objective": 0.01117,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_2.json
================================================
[
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n average_remaining_capacity = np.mean(bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the inverse of the number of partially used bins, and 3. the inverse of the square of the difference between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (np.where(bins == max_capacity, 1, num_partially_used_bins + 1)) + 1.0 / ((bins - item) ** 2 + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted combination of the inverse of the ratio of the bin's remaining capacity to the item's size and the inverse of the number of partially used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (np.where(bins == max_capacity, 1, num_partially_used_bins + 1))\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "Prioritize bins with more remaining capacity by giving them higher scores. If a bin's capacity is less than twice the item's size, assign a score of 0 to it.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n scores = np.zeros_like(bins)\n scores[(capacities > 0) & (capacities < 2 * item)] = 1 / capacities[(capacities > 0) & (capacities < 2 * item)]\n scores[capacities >= 2 * item] = 1\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted combination of the inverse of the remaining capacity and the inverse of the difference between the bin's capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = 1.0 / remaining_capacities + 1.0 / ((bins / item) - np.floor(bins / item))\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Score bins based on the inverse of the ratio of the bin's remaining capacity to the item's size, with a penalty factor for partially used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0.0, 1.0 / ((bins / item) - np.floor(bins / item)))\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the lowest score calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, minus the number of times the bin has been used. The bin with the lowest score is guaranteed to have the most remaining capacity after the item is assigned.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the square of the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item)**2 + np.arange(len(bins))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score of each bin by taking the square root of the bin's current capacity divided by the difference between the bin's capacity and the item size, and adding the bin's ID.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "This algorithm differs in the score function by adding the logarithm of the bin capacity to power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 2)\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Combine the idea of prioritizing empty bins and maximizing bin utilization from Algorithm 2 with the idea of using the inverse of the difference between item size and bin capacity from Algorithm 3, while adding a penalty for bins that have been used more than once.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (1 / (np.abs(bins - item) + 1)) * np.where(bins == max_capacity, 0.0, np.where(bins == max_capacity - item, -1, 1)) * np.where(bins > max_capacity, 1, bins / max_capacity)\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "This algorithm differs in the score function by adding a combination of a power function and the capacity of bins to the score",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins ** (np.arange(len(bins)) ** 2)\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = item / bins[bins >= item]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "This algorithm differs in the score function by adding the square of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins)) ** 2\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "This algorithm calculates the ratio of the bin's residual capacity to the maximum capacity and multiplies it by the antilog of the square of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / bins.max()) * (np.e ** -(np.arange(len(bins)) ** 2))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "My algorithm assigns the item to the bin with the maximum score, where the score is calculated as the product of the bin's rest capacity and the inverse of the difference between the size of the item and the rest capacity of the bin, while giving priority to filling bins with a smaller capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.full_like(bins, 1 / len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_20.json
================================================
[
{
"algorithm": "My new algorithm subtracts a normalized logarithmic component and the exponential function, then multiplied by a cubic form of the available rest capacity",
"code": "import numpy as np\ndef score(item, bins):\n avg_bin = np.mean(bins)\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 3 * (bins ** 3 / avg_bin ** 2) - np.exp(bins / avg_bin)\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the score function by the sum of the rest capacity and the item size, and then subtracts the item size by the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins + 1) ** (np.arange(len(bins)) ** 1) * bins.max()) * (bins + item) - item * bins) ** 2\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2)\n return scores",
"objective": 0.00644,
"other_inf": null
},
{
"algorithm": "The new algorithm subtracts the multiplication of the item size and the bin's maximum capacity from the square of the score function multiplied by the maximum capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.square(bins/(bins - item) + np.log(bins)**(np.arange(len(bins))**1) * bins.max())\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": " New algorithm: The score is determined by how much remaining capacity a bin has, how many items are already in the bin, and the size of the current item. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1.2) * np.log(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Algorithm: Raise the input item size to the power of maximum capacity, and then square the score function.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins + item) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2) ** 2\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the score function by the square of the bin's rest capacity and adds the square of the item size for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.square(bins) * ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)))) ** 2 + np.square(bins.max())) + np.square(item) * bins.max()\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the score function by the square root of the bin's rest capacity and adds the product of item size and the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) * ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) ** 2 + np.sqrt(bins.max())) + item * bins.max()\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is determined by the square root of how many items are already in the bin, the remaining capacity of the bin, the size of the current item, and the ratio of the remaining capacity of the bin to the size of the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) * (bins - item) / item * np.log(bins) ** (np.arange(len(bins)) ** 1.3)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm: Consider a new score function, which takes the square root of the given score and multiplies it with the current bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(((bins / (bins - item) + np.log(bins + item) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2)) * bins\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm subtracts the multiplication of the item size and the bin's maximum capacity from the square of the score function multiplied by the maximum capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1) * bins.max()) ** 2 * bins.max() - item * bins.max()) ** 2\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Combined the remainder of the bins into the square and multiplied the average of all bins by the denominator to provide a better trade-off.",
"code": "import numpy as np\n\ndef score(item, bins):\n avg_bin = np.mean(bins)\n numerator = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1))\n denominator = bins.max() ** 3 * (bins + avg_bin) ** 2\n scores = ((numerator / denominator) - item ** 2) ** 2\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the remaining capacity with its logarithm to prioritize bins with higher capacity and discourage assigning to bins that are nearly full.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins[-1]\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "Algorithm: Raise the input item size to the power of the bins' rest capacity and the square root of the maximum capacity, and then square the score function.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins + item) ** (np.arange(len(bins)) ** 1) * np.sqrt(bins.max())) ** 2) ** 2\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the score function by the square root of the bin's maximum capacity and adds the square of both the item size and the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) ** 2 + np.sqrt(bins.max())) ** 2 + (item ** 2 + bins.max())\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The score is determined by the number of items the bin could accommodate besides the current item, the number of items the bin already contains, and the difference between the bin's capacity and the current item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * np.log(bins - item) * bins / (bins - item + np.arange(len(bins)) ** 2)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The score is determined by the square root of how many items are already in the bin, the remaining capacity of the bin, and the size of the current item.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) / (bins - item) * np.log(bins) ** (np.arange(len(bins)) ** 1.3)\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the remaining capacity with its logarithm to prioritize bins with higher capacity and discourage assigning to bins that are nearly full.",
"code": "import numpy as np\n\ndef score(item, bins):\n avg_capacity = np.mean(bins)\n remaining_capacities = (bins - item) / avg_capacity\n scores = np.log(1. / remaining_capacities) * remaining_capacities\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalizes bins with small rest capacities by dividing the score function multiplied by the bin's maximum capacity by the multiplication of the rest capacity and bin's maximum capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = ((bins / (bins - item) + np.log(bins)**(np.arange(len(bins))**1) * bins.max()) ** 3 / bins / bins.max()) ** 2\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "New algorithm aims to maximize the normalized logarithmic component multiplied by the third power of distance between the bin capacity and the average of bin capacities",
"code": "import numpy as np\n\ndef score(item, bins):\n avg_bin = np.mean(bins)\n scores = (bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)) * (np.square(bins - avg_bin))\n return scores",
"objective": 0.01026,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_3.json
================================================
[
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n average_remaining_capacity = np.mean(bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(remaining_capacities / item)))) / (1.0 + np.sqrt(1))\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(bins / item))))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\nimport random\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n random_numbers = np.random.rand(len(bins))\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(remaining_capacities / item)))) / (1.0 + np.sqrt(num_partially_used_bins)) * random_numbers\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the square root of the remaining capacity of the bin, and 3. the inverse of the number of items that can fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.sqrt(remaining_capacities) + 1.0 / (remaining_capacities / item + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "Score bins based on the bin's remaining capacity and the inverse of the number of partially used bins, weighted by the difference between the bin's capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(remaining_capacities / item))) / (num_partially_used_bins + 1)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of the ratio of the bin's current capacity to the item's size and the inverse of the number of partially used bins, considering the variance in the available bin capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n bin_capacity_variance = np.var(bins)\n scores = (bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)) * (num_partially_used_bins + 1) / (bin_capacity_variance + 1)\n return scores",
"objective": 0.01811,
"other_inf": null
},
{
"algorithm": "The proposed algorithm uses a weighted score that combines the bin's remaining capacity, the weighted inverse of the number of items in the bin, and the item's size, with the weights adjusted based on the score from the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n base_scores = (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(remaining_capacities / item))) / (num_partially_used_bins + 1)\n num_items_in_bin = np.floor(bins / item)\n weights = 1.0 + np.log(num_items_in_bin + 1)\n scores = base_scores * weights\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the inverse of the number of partially used bins, and 3. the inverse of the square of the difference between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used = remaining_capacities > 0\n num_partially_used = partially_used.sum()\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (np.where(bins == max_capacity, 1, num_partially_used + 1)) + 1.0 / ((bins - item) ** 2 + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the inverse of the number of partially used bins, and 3. the inverse of the square of the difference between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (np.where(bins == max_capacity, 1, num_partially_used_bins + 1)) + 1.0 / ((bins - item) ** 2 + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted combination of the inverse of the ratio of the bin's remaining capacity to the item's size and the inverse of the number of partially used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (np.where(bins == max_capacity, 1, num_partially_used_bins + 1))\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.032,
"other_inf": null
},
{
"algorithm": "Assign items to the bin with the highest score calculated by a function of the ratio of the bin's remaining capacity to the item's size, with a bonus for bins where the remaining capacity after assignment is less than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0.0, 1.0 / ((bins / item) - np.floor(bins / item))) + (bins > max_capacity / 2)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Prioritize bins with more remaining capacity by giving them higher scores. If a bin's capacity is less than twice the item's size, assign a score of 0 to it.",
"code": "import numpy as np\n\ndef score(item, bins):\n capacities = bins - item\n scores = np.zeros_like(bins)\n scores[(capacities > 0) & (capacities < 2 * item)] = 1 / capacities[(capacities > 0) & (capacities < 2 * item)]\n scores[capacities >= 2 * item] = 1\n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted combination of the inverse of the ratio of the bin's remaining capacity to the item's size and the inverse of the number of partially used bins.",
"code": "import numpy as np\n\ndef score(item, bins, threshold=1.0):\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (1 + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03642,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted combination of the inverse of the remaining capacity and the inverse of the difference between the bin's capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = 1.0 / remaining_capacities + 1.0 / ((bins / item) - np.floor(bins / item))\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": " Prioritize bins based on a non-linear combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the square root of the number of partially used bins, and 3. the exponential of the difference between the bin's remaining capacity and the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.exp(-(bins - item))\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "Score bins based on the inverse of the ratio of the bin's remaining capacity to the item's size, with a penalty factor for partially used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, 0.0, 1.0 / ((bins / item) - np.floor(bins / item)))\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": " Prioritize bins based on a non-linear combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the square root of the number of partially used bins, and 3. the exponential of the difference between the bin's remaining capacity and the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.sqrt(np.where(bins == max_capacity, 1, num_partially_used_bins + 1)) + np.exp(-(bins - item))\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03723,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_4.json
================================================
[
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on the inverse of the ratio of the bin's remaining capacity and the item's size, modified by the square root of the bin's total capacity and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n total_capacities = bins\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.sqrt(total_capacities) + np.sqrt(remaining_capacities)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(bins / item))))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n weights = (np.sqrt(bins / max_capacity)) * (1.0 + np.exp(-(remaining_capacities / item))) / (np.sqrt(num_items_in_bin + 1))\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * weights\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\nimport random\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n random_numbers = np.random.rand(len(bins))\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(remaining_capacities / item)))) / (1.0 + np.sqrt(num_partially_used_bins)) * random_numbers\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the square root of the remaining capacity of the bin, and 3. the inverse of the number of items that can fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.sqrt(remaining_capacities) + 1.0 / (remaining_capacities / item + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "Score bins based on the bin's remaining capacity and the inverse of the number of partially used bins, weighted by the difference between the bin's capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = 1\n scores = (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(remaining_capacities / item))) / (num_partially_used_bins + 1)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of the ratio of the bin's current capacity to the item's size and the inverse of the number of partially used bins, considering the variance in the available bin capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_partially_used_bins = int(np.mean(bins >= item))\n bin_capacity_variance = np.var(bins)\n scores = (bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)) * (num_partially_used_bins + 1) / (bin_capacity_variance + 1)\n return scores",
"objective": 0.01811,
"other_inf": null
},
{
"algorithm": "The proposed algorithm uses a weighted score that combines the bin's remaining capacity, the weighted inverse of the number of items in the bin, and the item's size, with the weights adjusted based on the score from the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n base_scores = (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(remaining_capacities / item))) / (num_partially_used_bins + 1)\n num_items_in_bin = np.floor(bins / item)\n weights = 1.0 + np.log(num_items_in_bin + 1)\n scores = base_scores * weights\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Assign items to the bin with the highest score calculated by a weighted combination of the ratio of the bin's remaining capacity to the item's size and the inverse of the number of partially used bins, with a bonus for bins where the remaining capacity after assignment is less than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = (1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (num_partially_used_bins + 1)) * (bins > max_capacity / 2)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01892,
"other_inf": null
},
{
"algorithm": "Prioritize bins considering their remaining capacity, the ratio of the item's size to remaining capacity, number of partially used bins, and variance in the available bin capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_partially_used_bins = int(np.mean(bins >= item))\n bin_capacity_variance = np.var(bins)\n bin_capacity_deviation = np.sum((remaining_capacities - np.mean(remaining_capacities))**2) / np.std(remaining_capacities)\n scores = remaining_capacities * 0.5 / ((bins / item) - np.floor(bins / item)) * (num_partially_used_bins + 1) / (bin_capacity_variance + 1) * (1.0 + np.square(np.exp(-(bin_capacity_deviation / item))))\n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have a high remaining capacity and a low number of partially used bins, weighted by the difference between the bin's capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_partially_used_bins = int(np.mean(bins >= item))\n scores = (bins - item + 1.0 / num_partially_used_bins) * 1.0 / ((bins / item) - np.floor(bins / item)) * np.exp(-(remaining_capacities / item))\n return scores",
"objective": 0.02646,
"other_inf": null
},
{
"algorithm": "Assign item to bins using a linear weighted combination of: a bin's remaining capacity normalized by bin capacity variance, the weighted inverse of the number of items in the bin, and a normal distribution function of remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = (remaining_capacities / np.var(bins)) * 1.0 / ((bins / item) - np.floor(bins / item)) * (1.0 / (np.floor(bins / item) + 1)) * (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the inverse of the number of partially used bins, and 3. the inverse of the square of the difference between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used = remaining_capacities > 0\n num_partially_used = partially_used.sum()\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (np.where(bins == max_capacity, 1, num_partially_used + 1)) + 1.0 / ((bins - item) ** 2 + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.02958,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted combination of the inverse of the ratio of the bin's remaining capacity to the item's size and the inverse of the difference between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / ((remaining_capacities - (max_capacity - item)) ** 2 + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.02988,
"other_inf": null
},
{
"algorithm": "A weighted combination of fractional-to-integer ratios between item size and bins' remaining capacity and bins' remaining capacity to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n if bins.size == 0:\n return np.array([])\n score1 = 1.0 / ((bins / item) - np.floor(bins / item))\n score2 = 1.0 / ((item / bins) - np.floor(item / bins))\n scores = 0.6 * score1 + 0.4 * score2\n scores[np.where(bins < item)[0]] = -np.inf\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the inverse of the number of partially used bins, and 3. the inverse of the square of the difference between the bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (np.where(bins == max_capacity, 1, num_partially_used_bins + 1)) + 1.0 / ((bins - item) ** 2 + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted combination of the inverse of the ratio of the bin's remaining capacity to the item's size and the inverse of the number of partially used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (np.where(bins == max_capacity, 1, num_partially_used_bins + 1))\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.032,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_5.json
================================================
[
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Uses an exponential function to penalize bins with low remaining capacity to encourage utilization of bins with higher capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on the inverse of the ratio of the bin's remaining capacity and the item's size, modified by the square root of the bin's total capacity and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n total_capacities = bins\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.sqrt(total_capacities) + np.sqrt(remaining_capacities)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(bins / item))))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n weights = (np.sqrt(bins / max_capacity)) * (1.0 + np.exp(-(remaining_capacities / item))) / (np.sqrt(num_items_in_bin + 1))\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * weights\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\nimport random\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n random_numbers = np.random.rand(len(bins))\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(remaining_capacities / item)))) / (1.0 + np.sqrt(num_partially_used_bins)) * random_numbers\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the square root of the remaining capacity of the bin, and 3. the inverse of the number of items that can fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.sqrt(remaining_capacities) + 1.0 / (remaining_capacities / item + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm: Introduce a regularization term derived from the bin's remaining capacity to the original scoring function to further differentiate and prioritize the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)) * 2 / (1 + 1)) - (remaining_capacities + 1e-6) / (max_capacity + 1e-6) * 0.05\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of the ratio of the bin's current capacity to the item's size and the inverse of the number of partially used bins, considering the variance in the available bin capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = (bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)) * 2 / (1 + 1)\n return scores",
"objective": 0.01811,
"other_inf": null
},
{
"algorithm": "The proposed algorithm uses a weighted score that combines the bin's remaining capacity, the weighted inverse of the number of items in the bin, and the item's size, with the weights adjusted based on the score from the original algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n base_scores = (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(remaining_capacities / item))) / (num_partially_used_bins + 1)\n num_items_in_bin = np.floor(bins / item)\n weights = 1.0 + np.log(num_items_in_bin + 1)\n scores = base_scores * weights\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "New algorithm: Explore rescaling the subtraction component in the original formula to induce flexibility and further discriminate bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n component1 = np.log2((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)))\n component2 = -1.0 * (remaining_capacities / max_capacity) * (1 - remaining_capacities / max_capacity)\n component2[remaining_capacities == 0] = 0.0 # Avoid log0 (when bins = item)\n component2[remaining_capacities / max_capacity == 1.0] = -0.001 # Avoid log0 (when bins are full)\n scores = 1.3 * component1 + 0.7 * component2\n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "Assign items to the bin with the highest score calculated by a weighted combination of the ratio of the bin's remaining capacity to the item's size and the inverse of the number of partially used bins, with a bonus for bins where the remaining capacity after assignment is less than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n scores = (1.0 / ((bins / item) - np.floor(bins / item)) + 1.0 / (num_partially_used_bins + 1)) * (bins > max_capacity / 2)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01892,
"other_inf": null
},
{
"algorithm": "Prioritize bins considering their remaining capacity, the ratio of the item's size to remaining capacity, number of partially used bins, and variance in the available bin capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_partially_used_bins = int(np.mean(bins >= item))\n bin_capacity_variance = np.var(bins)\n bin_capacity_deviation = np.sum((remaining_capacities - np.mean(remaining_capacities))**2) / np.std(remaining_capacities)\n scores = remaining_capacities * 0.5 / ((bins / item) - np.floor(bins / item)) * (num_partially_used_bins + 1) / (bin_capacity_variance + 1) * (1.0 + np.square(np.exp(-(bin_capacity_deviation / item))))\n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Revised algorithm: Explore different weight combinations for the two components in the original formula to enhance bin discrimination and adaptability.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n component1 = np.log2((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)))\n component2 = -1.0 * (remaining_capacities / max_capacity) ** 2 * (1 - remaining_capacities / max_capacity) ** 2\n component2[remaining_capacities == 0] = 0.0 # Avoid log0 (when bins = item)\n component2[remaining_capacities / max_capacity == 1.0] = -0.001 # Avoid log0 (when bins are full)\n scores = 0.6 * component1 + 1.4 * component2\n return scores",
"objective": 0.01972,
"other_inf": null
},
{
"algorithm": "New algorithm: Introduce the bin's normalization score derived from its remaining capacity to the original scoring function to further differentiate and prioritize the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)) * 2 / (1 + 1)) - 1.0 * (remaining_capacities / max_capacity) * (1 - remaining_capacities / max_capacity) * 2\n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Assign items to the bin with the highest score calculated by a weighted combination of the ratio of the bin's remaining capacity to the item's size and the bin's capacity to the total capacity, with a bonus for bins where the remaining capacity after assignment is less than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n total_capacity = sum(bins)\n scores = (1.0 / ((bins / item) - np.floor(bins / item)) + bins / total_capacity) * (bins > max_capacity / 2)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritizing bins based on a weighted sum of the inverse of the ratio of the bin's remaining capacity to the item's size, the square root of the bin's total capacity, and the square of the inverse of the number of items that can fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_bins_can_fit = np.floor(bins / item)\n scores = 1.0 / ((bins / item) - num_bins_can_fit) + np.sqrt(bins) + 1.0 / (num_bins_can_fit + 1)**2\n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the square root of the bin's maximum capacity, and 3. the square of the inverse of the number of items that can fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacities = bins + item\n remaining_capacities = maximum_capacities - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.sqrt(maximum_capacities) + 1.0 / (remaining_capacities / item + 1)**2\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.02203,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_6.json
================================================
[
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Uses an exponential function to penalize bins with low remaining capacity to encourage utilization of bins with higher capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Computes a score for each bin based on its capacity modulation, weighted by its remaining capacity and penalized for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(bins / item))))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "New algorithm: Computes a score for each bin based on its capacity and the item size, modulated by a function of the remaining capacity and penalized for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item)**2 * (1.0 / ((bins / item) - np.floor(bins / item)))) * (remaining_capacities/max_capacity)**0.5\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n weights = (np.sqrt(bins / max_capacity)) * (1.0 + np.exp(-(remaining_capacities / item))) / (np.sqrt(num_items_in_bin + 1))\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * weights\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "New algorithm incorporates a penalty term that discourages assigning items to bins with excessively large remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item))) - 0.1 * (bins - max_capacity)\n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\nimport random\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n random_numbers = np.random.rand(len(bins))\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(remaining_capacities / item)))) / (1.0 + np.sqrt(num_partially_used_bins)) * random_numbers\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "The new algorithm combines the concepts of bin compactness and item-bin size ratio weighting to determine optimal bin assignment, ensuring efficient packing while accommodating the item's specific size constraints.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n weights = (np.sqrt(bins / max_capacity)) * (1.0 + np.exp(-(remaining_capacities / item))) / (np.sqrt(num_items_in_bin + 1))\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * weights\n scores += 0.5 * (1.0 - (num_items_in_bin) / (bins / item))\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item))\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the square root of the remaining capacity of the bin, and 3. the inverse of the number of items that can fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.sqrt(remaining_capacities) + 1.0 / (remaining_capacities / item + 1)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm: Revise the regularization term to suppress the over-optimization caused by the excessive preference for bins with relatively smaller remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)) * 2 / (1 + 1)) - (remaining_capacities + 1e-6) / (max_capacity + 1e-6) * 0.1\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of the ratio of the bin's current capacity to the item's size, the inverse of the number of partially used bins, and the variance in the available bin capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n bins = bins - item\n scores = (bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)) * 2 / (1 + 1)\n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "Use a combination of exponential and a power function to penalize bins that are full or nearly full while rewarding bins with higher remaining capacities to drive item assignment to bins with ample space.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = (1.0 + np.exp(-(remaining_capacities / max_capacity))) ** 2 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 1.5\n return scores",
"objective": 0.01801,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with the least remaining capacity while maintaining a normalized difference condition to avoid premature bin utilization and encourage balanced bin filling.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1.0 / ((bins / item) - np.floor(bins / item))) * (bins / item) / np.max((bins / item), axis=0)\n return scores",
"objective": 0.01811,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of 1. the inverse of the ratio of the bin's remaining capacity to the item's size, 2. the square root of the remaining capacity of the bin, and 3. the inverse of the number of items that can fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) + np.sqrt(remaining_capacities)\n scores[bins < item] = -np.inf\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "New algorithm: Explore rescaling the subtraction component in the original formula to induce flexibility and further discriminate bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n component1 = np.log2((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)))\n component2 = -1.0 * (remaining_capacities / max_capacity) * (1 - remaining_capacities / max_capacity)\n component2[remaining_capacities == 0] = 0.0 # Avoid log0 (when bins = item)\n component2[remaining_capacities / max_capacity == 1.0] = -0.001 # Avoid log0 (when bins are full)\n scores = 1.3 * component1 + 0.7 * component2\n return scores",
"objective": 0.01851,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_7.json
================================================
[
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Uses an exponential function to penalize bins with low remaining capacity to encourage utilization of bins with higher capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Computes a score for each bin based on its capacity modulation, weighted by its remaining capacity and penalized for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with negative scores to prioritize their utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 + np.where(remaining_capacities <= (max_capacity / 10), -1.0, 0.0)\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(bins / item))))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Minimize the number of bins by scoring bins based on their capacity and utilization ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n if bins[bins.shape[0]-1] >= max_capacity:\n bins[bins.shape[0]-1] = max_capacity - item\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n weights = (np.sqrt(bins / max_capacity)) * (1.0 + np.exp(-(remaining_capacities / item))) / (np.sqrt(num_items_in_bin + 1))\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * weights\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "New algorithm incorporates a penalty term that discourages assigning items to bins with excessively large remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item))) - 0.1 * (bins - max_capacity)\n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with negative scores to prioritize their utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 1.5 + np.where(remaining_capacities <= (max_capacity / 10), -1.0, 0.0)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\nimport random\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n random_numbers = np.random.rand(len(bins))\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(remaining_capacities / item)))) / (1.0 + np.sqrt(num_partially_used_bins)) * random_numbers\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.ceil(bins / item)\n weights = 1.0\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * weights\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item))\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item))\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on the weighted sum of the inverse of bin utilization and the product of the bin's maximum capacity and the rate of its utilization to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = ((bins - item) / item) / ((bins / item) - np.floor(bins / item)) * (bins * max_capacity) / (bins * item)\n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm: Modify the original code by replacing the regularization term with a revised one that considers both the remaining capacity and the maximum capacity of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)) * 2 / (1 + 1)) - (remaining_capacities + 1e-6) / (bins + 1e-6) * 0.1\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted combination of the ratio of the bin's current capacity to the item's size, the inverse of the number of partially used bins, and the variance in the available bin capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n bins = bins - item\n scores = (bins / item) * 1.0 / ((bins / item) - np.floor(bins / item)) * 2 / (1 + 1)\n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a decaying exponential function of their remaining capacity, while considering the item size to prevent premature bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item)**2 * np.exp(-(bins - item) / np.max(bins))\n return scores",
"objective": 0.01791,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_8.json
================================================
[
{
"algorithm": "New algorithm: Prioritizes bins with higher remaining capacity by incorporating a logarithmic function that assigns higher scores to bins with greater capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities / item ** 2\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Uses an exponential function to penalize bins with low remaining capacity to encourage utilization of bins with higher capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity by scoring them exponentially based on their capacity ratio and penalizing bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * np.exp(remaining_capacities / max_capacity)\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "Computes a score for each bin based on its capacity modulation, weighted by its remaining capacity and penalized for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with negative scores to prioritize their utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 + np.where(remaining_capacities <= (max_capacity / 10), -1.0, 0.0)\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(bins / item))))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Minimize the number of bins by scoring bins based on their capacity and utilization ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n if bins[bins.shape[0]-1] >= max_capacity:\n bins[bins.shape[0]-1] = max_capacity - item\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Improved algorithm introduces a novel scoring mechanism that considers the current bin capacity and the total remaining capacity of all feasible bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n total_remaining_capacity = np.sum(remaining_capacities)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + remaining_capacities / (max_capacity - remaining_capacities)) * (1.0 + remaining_capacities / total_remaining_capacity)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the cubic root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) ** 2 * (bins ** (1/3)) / (max_capacity ** (1/3))\n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "New algorithm incorporates a penalty term that discourages assigning items to bins with excessively large remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item))) - 0.1 * (bins - max_capacity)\n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with negative scores to prioritize their utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 1.5 + np.where(remaining_capacities <= (max_capacity / 10), -1.0, 0.0)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\nimport random\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n random_numbers = np.random.rand(len(bins))\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(remaining_capacities / item)))) / (1.0 + np.sqrt(num_partially_used_bins)) * random_numbers\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.ceil(bins / item)\n weights = 1.0\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * weights\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item))\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (bins / item - np.floor(bins / item))\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "Iteratively assign items to bins based on the ratio of bin capacity to item size, with the ratio penalized for bins with higher utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) * (1.0 / ((bins / item) - np.floor(bins / item)) + 0.5)\n return scores",
"objective": 0.017,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run2/population_generation_9.json
================================================
[
{
"algorithm": "New algorithm: Prioritizes bins with higher remaining capacity by incorporating a logarithmic function that assigns higher scores to bins with greater capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = np.log(max_capacity / remaining_capacities) * remaining_capacities / item ** 2\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "My new algorithm reduces the strength of the logarithmic component with the power of the times the bin is used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.log(bins) ** (np.arange(len(bins)) ** 1)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity and the inverse of the square root of the number of items in the bin, with weights adjusted by the square of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (np.log(num_items_in_bin + 1) + 1) * remaining_capacities * (bins ** 2) / ((bins / item) - np.floor(bins / item)) ** 2 * 1.0 / (max_capacity ** 2)\n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "{Bins with higher score means that there is a higher probability of being assigned to the item.}",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / item)))\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "The new algorithm evaluates the bin score based on a weighted combination of the bin capacity and the ratio of the item size to the bin capacity, while considering the current remaining capacity of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * (1.0 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))) + (max_capacity - bins) / (max_capacity - item)\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Uses an exponential function to penalize bins with low remaining capacity to encourage utilization of bins with higher capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 / (1.0 + np.exp(-(remaining_capacities / max_capacity)))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have the largest remaining capacity, while penalizing bins that have been partially used, based on a normalized difference between the bin's current capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher remaining capacity by scoring them exponentially based on their capacity ratio and penalizing bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 * np.exp(remaining_capacities / max_capacity)\n return scores",
"objective": 0.01489,
"other_inf": null
},
{
"algorithm": "Computes a score for each bin based on its capacity modulation, weighted by its remaining capacity and penalized for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (remaining_capacities/max_capacity) ** 0.5\n scores[remaining_capacities < 0] = -np.inf\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with negative scores to prioritize their utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 2 + np.where(remaining_capacities <= (max_capacity / 10), -1.0, 0.0)\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(bins / item))))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Minimize the number of bins by scoring bins based on their capacity and utilization ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n if bins[bins.shape[0]-1] >= max_capacity:\n bins[bins.shape[0]-1] = max_capacity - item\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item)))\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Improved algorithm introduces a novel scoring mechanism that considers the current bin capacity and the total remaining capacity of all feasible bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n total_remaining_capacity = np.sum(remaining_capacities)\n scores = ((bins / item) * 1.0 / ((bins / item) - np.floor(bins / item))) * (1.0 + remaining_capacities / (max_capacity - remaining_capacities)) * (1.0 + remaining_capacities / total_remaining_capacity)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the cubic root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) ** 2 * (bins ** (1/3)) / (max_capacity ** (1/3))\n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "New algorithm incorporates a penalty term that discourages assigning items to bins with excessively large remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.exp(-(bins / item))) - 0.1 * (bins - max_capacity)\n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "Reassign bins with lower remaining capacity with negative scores to prioritize their utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = 1.0 / ((bins / item) - np.floor(bins / item)) * (bins / item) ** 1.5 + np.where(remaining_capacities <= (max_capacity / 10), -1.0, 0.0)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "New algorithm adds a randomization step to the previous algorithm to enhance its robustness and efficiency.",
"code": "import numpy as np\nimport random\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n partially_used_bins = np.where(np.logical_and(bins >= item, bins < max_capacity))[0]\n num_partially_used_bins = len(partially_used_bins)\n random_numbers = np.random.rand(len(bins))\n scores = (bins - item) * 0.5 / ((bins / item) - np.floor(bins / item)) * (1.0 + np.square(np.exp(-(remaining_capacities / item)))) / (1.0 + np.sqrt(num_partially_used_bins)) * random_numbers\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.ceil(bins / item)\n weights = 1.0\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item)) * weights\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score, calculated by a weighted combination of the bin's remaining capacity, the inverse of the square root of the number of items in the bin, and the item's size, with weights adjusted by the square root of the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n num_items_in_bin = np.floor(bins / item)\n scores = (0.5 + 0.5 * np.log(num_items_in_bin + 1)) * (bins - item) * 1.0 / ((bins / item) - np.floor(bins / item))\n return scores",
"objective": 0.0166,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a score function, where each bin is assigned the item with the maximum score, and empty bins with maximum capacity are not used; the goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n scores[bins != max_capacity] = item / bins[bins != max_capacity]\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns items to bins based on a novel scoring function that maximizes the score of each bin, while avoiding using bins with the maximum rest capacity. The goal is to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n\n scores[bins != max_capacity] = (bins[bins != max_capacity] - item) / (max_capacity - item)\n\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "One way to design the novel score function is as follows:\n\n```",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n bin_capacities = np.where(bins != item, bins, 0) # Exclude bins with exact capacity\n\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.where(bin_capacities > 0, 1/bin_capacities, 0)\n\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to a bin with the maximum score, taking into account the rest capacity of the bins, and returns the scores for each bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity of each bin to the item size\n ratios = bins.astype(float) / item\n \n # Set the score for bins with equal rest capacity to the maximum capacity as 0\n ratios[bins == max(bins)] = 0\n \n # Calculate the scores for each bin by multiplying the ratios with an increasing factor\n scores = ratios * np.arange(1, len(bins)+1)\n \n return scores",
"objective": 0.12184,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, calculated by subtracting the item size from the bin capacity, and avoids using bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - item\n scores[bins == np.max(bins)] = np.min(scores) - 1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin based on its current rest capacity and the size of the item, where the score is equal to the absolute value of the difference between the rest capacity and the item size, multiplied by -1 if the bin is empty, to prioritize filling the empty bins first, or multiplied by 1 if the bin is not empty.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.abs(bins - item) * np.where(bins == np.max(bins), 0, np.where(bins == np.max(bins) - item, -1, 1))\n return scores",
"objective": 0.13281,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty Numpy array called 'scores'.\n2. Iterate through each bin capacity in 'bins'.\n3. If the bin capacity is equal to the maximum capacity (i.e. not used), assign a score of 0.\n4. If the bin capacity is greater than the item size, assign a score of the bin capacity minus the item size.\n5. If the bin capacity is less than or equal to the item size, assign a negative score of 1000.\n6. Append the score to the 'scores' array.\n7. Return the 'scores' array as the output of the function.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n elif bins[i] > item:\n scores[i] = bins[i] - item\n else:\n scores[i] = -1000\n \n return scores",
"objective": 0.14418,
"other_inf": null
},
{
"algorithm": "The algorithm first calculates the score for each bin by dividing the rest capacity of the bin by the item size, then subtracting 1 if the rest capacity equals the maximum capacity. Next, it sets the score to 0 if the rest capacity is less than the item size. Finally, it returns the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.divide(bins, item)\n scores[bins == np.max(bins)] -= 1\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns the item to the bin with the maximum score, considering the rest capacity of the bin, and returns the scores for all bins after the assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize an array of scores with zeros\n\n # Calculate the score for each bin based on their rest capacity\n scores = np.where(bins == np.max(bins), 0, bins - np.max(bins) + item + 1)\n \n return scores",
"objective": 0.32971,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Calculate the ratio of the capacity remaining in each bin to the size of the current item.\n2. Assign a score of 0 to bins that have the same capacity as their maximum capacity.\n3. Assign a score of 1 to bins whose remaining capacity is 1 larger than the size of the current item.\n4. Assign a score of 2 to bins whose remaining capacity is 2 larger than the size of the current item.\n5. Assign a score of 3 to bins whose remaining capacity is 3 larger than the size of the current item.\n6. Continue this pattern and assign scores in increasing order to bins with increasing available capacity.\n7. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.floor(remaining_capacity[remaining_capacity > 0] / item) # Assign scores based on ratio\n return scores",
"objective": 0.36543,
"other_inf": null
},
{
"algorithm": "The algorithm scores each bin based on a score function that takes into account both the remaining capacity of the bin and the size of the item being assigned. The main steps of the algorithm are: \n1. Initialize an empty Numpy array 'scores' with the same size as 'bins' to store the scores for each bin.\n2. Calculate the score for each bin by dividing the remaining capacity of the bin by the size of the item, and store the result in the corresponding index of 'scores'.\n3. Return the 'scores' array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins > item] = bins[bins > item] / item\n return scores",
"objective": 0.3763,
"other_inf": null
},
{
"algorithm": "\nThe algorithm takes the input of the size 'item' and the rest capacities of feasible bins 'bins' and outputs the scores for the bins for assignment.\nThe main steps of the algorithm are as follows:\n1. Calculate the available capacities of all bins by subtracting 'item' from 'bins'.\n2. Filter out the bins with available capacity equal to the maximum capacity ('bins_max') using a mask.\n3. Assign a score of 0 to all bins that have 'bins_max' capacity.\n4. For the remaining bins, calculate the score by dividing the available capacity by the difference between 'bins_max' and the available capacity.\n5. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n bins_max = np.max(bins)\n capacities = bins - item\n mask = capacities != bins_max\n scores = np.zeros_like(bins)\n scores[mask] = capacities[mask] / (bins_max - capacities[mask])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "The algorithm assigns the item to the bin with the maximum score, where the score for each bin is calculated as the difference between the rest capacity and twice the size of the item, with a lower bound of zero, and the final scores are stored in a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - 2 * item, 0)\n return scores",
"objective": 0.86699,
"other_inf": null
},
{
"algorithm": "The novel score function assigns an item to the bin with the maximum score, taking into account the rest capacity of each bin, and aims to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = bins != np.max(bins)\n scores[mask] = item - bins[mask]\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "We first calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, and then subtract 1 from the score of the bin with the maximum capacity. Finally, we return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n max_index = np.argmax(bins)\n scores[max_index] -= 1\n return scores",
"objective": 1.51484,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin by dividing the rest capacity of the bin by the size of the item and subtracting it from the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_score = np.max(bins) / item\n scores = (bins / item) - max_score\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_1.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Assign items to bins with scores based on the remaining capacity but also incorporate the item size, giving preference to bins that can accommodate the item without leaving too much empty space.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_bin = np.max(bins)\n available_space = bins - item\n scores[available_space >= 0] = max_bin - (available_space[available_space >= 0] * item / max_bin)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm assigns scores to each bin based on the remaining capacity of the bin, where bins with the maximum capacity have a score of zero, and bins with smaller capacities have higher scores based on a certain formula.\nIn each step, the item will be assigned to the bin with the maximum score, and if the rest capacity of a bin equals the maximum capacity, it will not be used.\nThe final goal is to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins) - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score bins by calculating the sum of their normalized capacity with the normalized size of the item and the square root of the bin index, while penalizing bins with less remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins >= item, (1 - bins / max_capacity) + (item / max_capacity) + np.sqrt(np.arange(len(bins))), -np.inf)\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "Assign bins for an item by scoring based on available bin space, prioritizing bins with a difference between maximum and mean bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins.mean()) - (bins - item))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate each bin's score by subtracting the bin's current load from the maximum capacity of the bin and then multiplying by the reciprocal of its load plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, fill_value=0)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n scores[i] = (max_capacity - bin_capacity) / (bin_capacity + 1)\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item + np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins >= item] = 1\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Assigns items to bins based on a score calculated as a function of the bin's remaining capacity, the item's size, and the difference between the bin's capacity and the item's size, with some randomness added to break ties.",
"code": "import numpy as np\nimport random\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_bin = np.max(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity >= 0] = (\n remaining_capacity[remaining_capacity >= 0]\n / (item * max_bin)\n + (bins[remaining_capacity >= 0] - item) / max_bin\n + random.random() / 100\n ) # Calculate score based on remaining capacity, item size, and bin capacity\n return scores",
"objective": 0.04487,
"other_inf": null
},
{
"algorithm": "Score each bin by multiplying the bin's rest capacity with the item's size and then weighting it by a factor that decreases exponentially with the bin's index. Weighting factor ranging from 0 to 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, fill_value=-np.inf)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n diff = bin_capacity - item\n scores[i] = diff * 0.5 ** i\n return scores",
"objective": 0.04829,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizes bins with less remaining capacity and uses a cosine function to calculate scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity > 0] = np.cos(np.pi * (1 - remaining_capacity[remaining_capacity > 0] / item)) # Cosine decay score\n return scores",
"objective": 0.0484,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign bins inversely proportional to their remaining capacity to maximize space utilization and minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins.max() / (bins - item)\n scores[bins <= item] = -np.inf\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "A novel algorithm that assigns scores to bins based on the ratio of the item's size to the bin's capacity, with a higher score for bins with a lower ratio and a penalty for bins that have been used multiple times.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores = np.where(remaining_capacity > 0, item / remaining_capacity - 0.1 * np.arange(len(bins)), -np.inf)\n return scores",
"objective": 0.05081,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Scores bins linearly based on their remaining capacity and index, applies a capacity penalty for full bins, and scales scores based on item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n capacity_penalty = 1 - (bin_capacity / max_capacity)\n index_penalty = np.exp(-i / len(bins))\n score_ratio = (bin_capacity - item) / max_capacity\n scaled_score = score_ratio * capacity_penalty * index_penalty\n scores[i] = scaled_score * item * bin_capacity / max_capacity\n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": "Use a score that is the product of the difference between the bin's remaining capacity and the current item's size, and the reciprocal of the bin's remaining capacity, with a lower bound of zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores = np.where(remaining_capacity > 0, remaining_capacity * (1/remaining_capacity), 0)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "My new algorithm changes the scoring method to give higher priority to bins with less remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item) * (1 - bins[i] / max_capacity)\n\n return scores",
"objective": 0.05765,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the item's size, the remaining capacity of the bin, the maximum capacity of the bin, and the average remaining capacity of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_capacity = np.max(bins)\n avg_remaining_capacity = np.mean(bins - item)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = (bins[i] - item) / (max_capacity - avg_remaining_capacity)\n\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "New algorithm: This algorithm calculates the score for each bin by multiplying the ratio of the bin's rest capacity to the item's size with a weighting factor that decreases exponentially with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.zeros_like(bins)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n ratio = bin_capacity / item\n weighting_factor = np.exp(-i / len(bins))\n scores[i] = ratio * weighting_factor\n return scores",
"objective": 0.05836,
"other_inf": null
},
{
"algorithm": "Algorithm: \n1. Initialize an empty array named scores with the same size as bins.\n2. For each bin capacity in bins:\n a. If the bin capacity equals the maximum capacity, set its score to 0.\n b. Otherwise, calculate the score of the bin by dividing the bin capacity by the item size.\n Note: If the division results in a floating-point value, round it down to the nearest integer.\n c. Assign the calculated score to the corresponding index in scores array.\n3. Return the scores array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(len(bins))\n max_capacity = np.max(bins)\n\n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = 0\n else:\n scores[i] = int(bins[i] / item)\n\n return scores",
"objective": 0.05987,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_10.json
================================================
[
{
"algorithm": "Assign an item to a bin with the maximum score, calculated as a weighted sum of the square of bin capacity, bin index, distance to the center, and number of items fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.min(bins / item)\n scores = 3 * (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + 2 * np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n number_items_in_bin = np.floor(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + number_items_in_bin + np.arange(len(bins)) - np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the square of the difference between the bin's capacity and the item size, and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n squared_remaining_capacities = normalized_remaining_capacities ** 2\n squared_distances_to_the_item = (((bins - item) / item) ** 2) / ((bins - item) / item).max()\n scores = squared_remaining_capacities / squared_remaining_capacities.min() + squared_distances_to_the_item + np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The new algorithm scores bins with a weighted sum of the square of bin remaining capacity, bin index, distance to the bin center, and number of items fit into the bin, but the weights are different.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.min(bins / item)\n scores = 4 * (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) + 1.5 * np.sqrt(distances_to_the_center) + 0.5 * num_fits\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, bin index, a random number, distance to the center, and number of items fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.random.uniform(0, 1, len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as the square root of the sum of the weighted square of the bin's current capacity and the arctangent of the ratio of the bin's capacity to the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\nfrom math import atan, sqrt\n\ndef score(item, bins):\n weighted_capacities = np.sqrt(((bins - item) ** 2) / (bins - item).min())\n ratios = bins / item\n scores = weighted_capacities + np.arctan(ratios) + np.arange(len(bins)) + np.sqrt(np.abs(bins - np.mean(bins)) / np.std(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates a weighted sum of the square of bin capacity, bin index, distance to the average, and number of items fit into the bin, considering the ratio between bin capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = normalized_remaining_capacities ** 2 / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + (bins / item) ** 0.5\n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 0.9)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n number_items_in_bin = np.floor(bins / item) * 0.75\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + number_items_in_bin + np.arange(len(bins)) - np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, bin index, a random number, distance to the center, and number of items fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = np.where(bins >= item, 1, 0)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.random.uniform(0, 1, len(bins)) + num_fits\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the highest score, calculated as a cubed sum of a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the distance to the center of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) + np.arange(len(bins)) + np.abs(bins - np.mean(bins))\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted combination of the bin's remaining capacity that is penalized by the number of item that can be fit into the bin and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities - (normalized_remaining_capacities / np.sum(normalized_remaining_capacities)) * num_fits)**2 / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + 1\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "{New algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, the number of items that fit into the bin, and the score from the previous step.}",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) + np.arange(len(bins)) // 2 + np.arange(len(bins)) + 1\n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "Weighted sum of the weighted score of normalized remaining capacity, the reciprocal of the remaining capacity, and the square root of the remaining capacity, and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([4, 2, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log(bins - item)\n sqrt_remaining_capacities = np.sqrt((bins - item) / (bins - item).max())\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * sqrt_remaining_capacities + np.arange(len(bins))\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, the number of items that fit into the bin, the square root of the bin's capacity, and the reciprocal of the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) // 2 + np.arange(len(bins)) + np.sqrt(bins) + 1 / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score defined as a weighted sum of the bin's rest capacity to the power of 3, the ratio of the bin's rest capacity to the item size, the bin's index, the bin's capacity divided by the item size, the ratio of the number of items that can fit into the bin to the number of items that can fit in the best bin, and the ratio of the square of the bin's current capacity to the square of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n num_fits = bins / item / np.max(bins / item)\n scores = (bins**3) / (bins**3).max() + normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins)) + normalized_capacities / normalized_capacities.min() + num_fits + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns a current item to the bin with the maximum score and updates the rest capacity of the bins, until all items are assigned. The score is calculated based on the bin's rest capacity, the difference between the bin's rest capacity and the item size, the number of times the bin has been used, and the square of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n used_bins_scores = np.arange(len(bins))\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + used_bins_scores + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01077,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_11.json
================================================
[
{
"algorithm": "Assign item to the bin with the maximum score after calculating the score as a weighted sum of score calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the bin's capacity to the power of 3, a Gaussian function of the bin's capacity, the number of items that fit into the bin, and the reciprocal of the variance of the bin's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins - item) / item + np.exp(-(bins - bins.mean()) ** 2 / (2 * bins.std() ** 2)) + np.arange(len(bins)) + np.sqrt(bins) + 1 / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1) + np.random.uniform(0, 1, len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and the inverse of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n num_fits = bins / item / np.max(bins / item)\n normalized_bin_indices = np.minimum(bins / item, 1)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1) + num_fits - normalized_bin_indices\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Score bins with a weighted sum of the bin\u2019s current height, capacity, bin index, and number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n capacity_factors = (bins / bins.max()) ** 2\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * capacity_factors + 0.5 * np.arange(len(bins)) + np.floor(bins / item)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1) / np.max((bins - item) / item)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n number_items_in_bin = np.floor(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + number_items_in_bin + np.arange(len(bins)) - np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the bin's capacity, the number of times the bin has been used, the difference between the bin's capacity and the item size, the distance to the center of bins, and the number of items that fit into the bin, but the weights are different.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = np.floor(bins / item) * 0.5\n scores = (normalized_remaining_capacities ** 2.5) / normalized_remaining_capacities.min() + 0.75 * np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The new algorithm scores bins with a weighted sum of the square of bin remaining capacity, bin index, distance to the bin center, and number of items fit into the bin, but the weights are different.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.min(bins / item)\n scores = 4 * (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) + 1.5 * np.sqrt(distances_to_the_center) + 0.5 * num_fits\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted combination of the bin's remaining capacity that is penalized by the number of item that can be fit into the bin and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item\n scores = (normalized_remaining_capacities - (normalized_remaining_capacities / np.sum(normalized_remaining_capacities)) * num_fits)**2 / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, bin index, a random number, distance to the center, and number of items fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.random.uniform(0, 1, len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, bin index, bin capacity divided by item size, and number of items fit into the bin, and use an exponential function to amplify the difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = np.where(bins >= item, 1, 0)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + (bins / item) + num_fits\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates a weighted sum of the square of bin capacity, bin index, distance to the average, and number of items fit into the bin, considering the ratio between bin capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = normalized_remaining_capacities ** 2 / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + (bins / item) ** 0.5\n return scores",
"objective": 0.00946,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 0.9)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n number_items_in_bin = np.floor(bins / item) * 0.75\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + number_items_in_bin + np.arange(len(bins)) - np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, bin index, a random number, distance to the center, and number of items fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = np.where(bins >= item, 1, 0)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.random.uniform(0, 1, len(bins)) + num_fits\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the highest score, calculated as a cubed sum of a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the distance to the center of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) + np.arange(len(bins)) + np.abs(bins - np.mean(bins))\n return scores",
"objective": 0.00986,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_12.json
================================================
[
{
"algorithm": "Assign item to the bin with the maximum score after calculating the score as a weighted sum of score calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the bin's capacity to the power of 3, a Gaussian function of the bin's capacity, the number of items that fit into the bin, and the reciprocal of the variance of the bin's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins - item) / item + np.exp(-(bins - bins.mean()) ** 2 / (2 * bins.std() ** 2)) + np.arange(len(bins)) + np.sqrt(bins) + 1 / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Prioritize bins with sufficient remaining capacity and a balanced number of items, deterring bins with excessive or minimal items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n items_in_bin = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - (items_in_bin - 1) ** 2 / (items_in_bin - 1).max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1) + np.random.uniform(0, 1, len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the ratio of item size and remaining bin capacity while considering the bin's current height, index, and its capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n capacity_factors = (bins - item) / (bins - item).max()\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * capacity_factors + 0.5 * np.arange(len(bins)) + np.floor(bins / item) + 0.5\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Score bins with a weighted sum of the bin\u2019s current height, capacity, bin index, and number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n capacity_factors = (bins / bins.max()) ** 2\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * capacity_factors + 0.5 * np.arange(len(bins)) + np.floor(bins / item)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1) / np.max((bins - item) / item)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "Improved Score Function: We adjust parameter settings in the existing score function to prioritize bins with ample remaining capacity, proximity to an average bin size, and a high number of items fit to minimize used bin count.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.min(bins / item)\n scores = 6 * (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + 1 * np.arange(len(bins)) + 2 * distances_to_the_center + 1 * num_fits\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n number_items_in_bin = np.floor(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + number_items_in_bin + np.arange(len(bins)) - np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the bin's capacity, the number of times the bin has been used, the difference between the bin's capacity and the item size, the distance to the center of bins, and the number of items that fit into the bin, but the weights are different.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = np.floor(bins / item) * 0.5\n scores = (normalized_remaining_capacities ** 2.5) / normalized_remaining_capacities.min() + 0.75 * np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The new algorithm scores bins with a weighted sum of the square of bin remaining capacity, bin index, distance to the bin center, and number of items fit into the bin, but the weights are different.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.min(bins / item)\n scores = 4 * (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) + 1.5 * np.sqrt(distances_to_the_center) + 0.5 * num_fits\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted combination of the bin's remaining capacity that is penalized by the number of item that can be fit into the bin and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item\n scores = (normalized_remaining_capacities - (normalized_remaining_capacities / np.sum(normalized_remaining_capacities)) * num_fits)**2 / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Score bins with a weighted sum of the square of bin capacity, bin index, and distance to the bin center, and number of items fit into the bin, while using logarithms to magnify the differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = np.where(bins >= item, 1, 0)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.log(distances_to_the_center + 1) + np.log(num_fits + 1)\n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, bin index, bin capacity divided by item size, and number of items fit into the bin, and use an exponential function to amplify the difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = np.where(bins >= item, 1, 0)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + (bins / item) + num_fits\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates a weighted sum of the square of bin capacity, bin index, distance to the average, and number of items fit into the bin, considering the ratio between bin capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = normalized_remaining_capacities ** 2 / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + (bins / item) ** 0.5\n return scores",
"objective": 0.00946,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_13.json
================================================
[
{
"algorithm": "Assign item to the bin with the maximum score after calculating the score as a weighted sum of score calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the bin's capacity to the power of 3, a Gaussian function of the bin's capacity, the number of items that fit into the bin, and the reciprocal of the variance of the bin's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins - item) / item + np.exp(-(bins - bins.mean()) ** 2 / (2 * bins.std() ** 2)) + np.arange(len(bins)) + np.sqrt(bins) + 1 / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Prioritize bins with sufficient remaining capacity and a balanced number of items, deterring bins with excessive or minimal items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n items_in_bin = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - (items_in_bin - 1) ** 2 / (items_in_bin - 1).max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with sufficient remaining capacity and a balanced number of items, while deterring bins with minimal items and preferring bins with average items, while penalizing bins with excessive items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n items_in_bin = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + (bin_item_ratio - 1) ** 2 / (bin_item_ratio - 1).max() - (items_in_bin - 1) ** 2 / (items_in_bin - 1).max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Consider the ratio between the current height of a bin and the item size in addition to the difference between the item size and the remaining capacity of a bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_height_item_ratio = bins / item\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.exp(-bin_height_item_ratio) + np.floor(bins / item * 0.75) + 0.75 * np.arange(len(bins))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Score bins with a weighted sum of the bin\u2019s current height, capacity, bin index, and number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n capacity_factors = (bins / bins.max()) ** 2\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * capacity_factors + 0.5 * np.arange(len(bins)) + np.floor(bins / item)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New Algorithm: Compute a weighted sum of the bin's current size, the bin's capacity to the power of 4, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1) / np.max((bins - item) / item)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "Calculate score as a weighted sum of the bin's current capacity to the power of 2, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the reciprocal of the standard deviation of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) + 1 / np.std(bins)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "Improved Score Function: We adjust parameter settings in the existing score function to prioritize bins with ample remaining capacity, proximity to an average bin size, and a high number of items fit to minimize used bin count.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.min(bins / item)\n scores = 6 * (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + 1 * np.arange(len(bins)) + 2 * distances_to_the_center + 1 * num_fits\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the geometric mean between the bin remaining capacity and itself to the power of 3, the bin index, and the bin's remaining capacity divided by its capacity to power of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (np.sqrt(normalized_remaining_capacities * (normalized_remaining_capacities ** 3))) / (normalized_remaining_capacities.min() ** 2) + np.arange(len(bins)) + bins / bins.min() ** 2\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Considering bins with sufficient capacity to accommodate the current item, assign the item to the bin with the maximum score estimated as a weighted sum of the bin's current capacity, the number of items that could fit into the bin, and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 3) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.min() + 0.3 * np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The new algorithm scores bins with a weighted sum of the square of bin remaining capacity, bin index, distance to the bin center, and number of items fit into the bin, but the weights are different.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.min(bins / item)\n scores = 4 * (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) + 1.5 * np.sqrt(distances_to_the_center) + 0.5 * num_fits\n return scores",
"objective": 0.00855,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted combination of the bin's remaining capacity that is penalized by the number of item that can be fit into the bin and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item\n scores = (normalized_remaining_capacities - (normalized_remaining_capacities / np.sum(normalized_remaining_capacities)) * num_fits)**2 / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Assign an item to a bin with the highest score calculated as a weighted combination of the remaining capacity, the bin's index, the count of items that fit into the bin, a constant, and the logarithm of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item\n scores = (\n normalized_remaining_capacities\n - (normalized_remaining_capacities / np.sum(normalized_remaining_capacities)) * num_fits\n ) ** 2 / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits * 0.1 + np.log1p(bins / item) * 0.5\n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "Score bins with a weighted sum of the square of bin capacity, bin index, and distance to the bin center, and number of items fit into the bin, while using logarithms to magnify the differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = np.where(bins >= item, 1, 0)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.log(distances_to_the_center + 1) + np.log(num_fits + 1)\n return scores",
"objective": 0.00885,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_14.json
================================================
[
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) / normalized_remaining_capacities.mean()\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Prioritize bins with sufficient remaining capacity and a balanced number of items, deterring bins with excessive or minimal items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n items_in_bin = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - (items_in_bin - 1) ** 2 / (items_in_bin - 1).max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the bin's current size, the bin's capacity to the power of 3, the bin's remaining capacity to the power of 2, the bin's available spaces to the power of 2, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins ** 3) / bins.max() ** 3 + (available_spaces ** 2) / available_spaces.max() ** 2 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Consider the ratio between the current height of a bin and the item size in addition to the difference between the item size and the remaining capacity of a bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_height_item_ratio = bins / item\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.exp(-bin_height_item_ratio) + np.floor(bins / item * 0.75) + 0.75 * np.arange(len(bins))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The algorithm computes a weighted sum of the bin's current size, the bin's capacity to the power of 2, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 2) / bins.max() ** 2 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.tanh((bins - item) / item)\n distances_to_the_center = np.tanh(np.abs(bins - np.mean(bins)) / np.std(bins))\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the bin's remaining capacity, the bin's capacity to the power of 4, the bin's position in the list, and the square root of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New Algorithm: Compute a weighted sum of the bin's current size, the bin's capacity to the power of 4, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as a combination of its remaining capacity, the ratio of its current height to the maximum height, and the index of the bin in the list, where higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 2 + 0.25 * (bins / item) ** 2 + 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1) / np.max((bins - item) / item)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "Calculate score as a weighted sum of the bin's current capacity to the power of 2, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the reciprocal of the standard deviation of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) + 1 / np.std(bins)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "Prioritize bins with sufficient remaining capacity and a balanced distribution of items but penalizing higher indexed bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + (bin_item_ratio - 1) ** 2 / (bin_item_ratio - 1).max() - np.arange(len(bins))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the geometric mean between the bin remaining capacity and itself to the power of 3, the bin index, and the bin's remaining capacity divided by its capacity to power of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (np.sqrt(normalized_remaining_capacities * (normalized_remaining_capacities ** 3))) / (normalized_remaining_capacities.min() ** 2) + np.arange(len(bins)) + bins / bins.min() ** 2\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Considering bins with sufficient capacity to accommodate the current item, assign the item to the bin with the maximum score estimated as a weighted sum of the bin's current capacity, the number of items that could fit into the bin, and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 3) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.min() + 0.3 * np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Compute a weighted sum of the bin's current size, the bin's capacity to the power of 3, the bin's remaining capacity to the power of 2, the cube root of the number of times the bin has been used, the cube root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins ** 3) / bins.max() ** 3 + np.cbrt(bins) + np.cbrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00855,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_15.json
================================================
[
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) / normalized_remaining_capacities.mean()\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a weighted sum of the normalized remaining capacities of feasible bins, the square root of the cumulative distance to the center with decay, the square root of the bin index, and the natural logarithm of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1) / np.max((bins - item) / item)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1) + np.log(bins)\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "{Promote bins with a large number of items and penalize bins with a small number of items while considering the remaining capacity.}",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the power of 0.75 of the ratio of its current height to the maximum height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 0.75 - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Consider the ratio between the current height of a bin and the item size in addition to the difference between the item size and the remaining capacity of a bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_height_item_ratio = bins / item\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.exp(-bin_height_item_ratio) + np.floor(bins / item * 0.75) + 0.75 * np.arange(len(bins))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The algorithm computes a weighted sum of the bin's current size, the bin's capacity to the power of 2, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 2) / bins.max() ** 2 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.tanh((bins - item) / item)\n distances_to_the_center = np.tanh(np.abs(bins - np.mean(bins)) / np.std(bins))\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the bin's remaining capacity, the bin's capacity to the power of 4, the bin's position in the list, and the square root of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New Algorithm: Compute a weighted sum of the bin's current size, the bin's capacity to the power of 4, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as a combination of its remaining capacity, the ratio of its current height to the maximum height, and the index of the bin in the list, where higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 2 + 0.25 * (bins / item) ** 2 + 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, cumulative distance to the center with decay, square root of the number of times the bin has been used, and a random number.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1) / np.max((bins - item) / item)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n cumulative_distances_to_the_center = np.cumsum(distances_to_the_center) * np.exp(-np.arange(len(bins)) / len(bins))\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + cumulative_distances_to_the_center + np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "Calculate score as a weighted sum of the bin's current capacity to the power of 2, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the reciprocal of the standard deviation of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) + 1 / np.std(bins)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * bins / bins.max() ** 2.5 + remaining_capacities ** 3 / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the geometric mean between the bin remaining capacity and itself to the power of 3, the bin index, and the bin's remaining capacity divided by its capacity to power of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (np.sqrt(normalized_remaining_capacities * (normalized_remaining_capacities ** 3))) / (normalized_remaining_capacities.min() ** 2) + np.arange(len(bins)) + bins / bins.min() ** 2\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Considering bins with sufficient capacity to accommodate the current item, assign the item to the bin with the maximum score estimated as a weighted sum of the bin's current capacity, the number of items that could fit into the bin, and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 3) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.min() + 0.3 * np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_16.json
================================================
[
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) / normalized_remaining_capacities.mean()\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "Algorithm: The algorithm calculates the score of each bin as a combination of the remaining capacity, the negative of the bin's usage factor (i.e., the proportion of the bin that is already full), and the negative index of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() - 0.5 * bins / bins.max() - 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "{Promote bins with a large number of items and penalize bins with a small number of items while considering the remaining capacity.}",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the power of 0.75 of the ratio of its current height to the maximum height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 0.75 - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "Consider the ratio between the current height of a bin and the item size in addition to the difference between the item size and the remaining capacity of a bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_height_item_ratio = bins / item\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.exp(-bin_height_item_ratio) + np.floor(bins / item * 0.75) + 0.75 * np.arange(len(bins))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The algorithm computes a weighted sum of the bin's current size, the bin's capacity to the power of 2, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 2) / bins.max() ** 2 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "Calculate the score of bins as a weighted sum of a normalized score based on the bin's capacity, a score based on the bin's position, a score based on the bin's height relative to the item size, and a score based on the bin's utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_height_item_ratio = bins / item\n bin_utilization = bins - np.maximum((bins - item), 0)\n scores = (normalized_remaining_capacities ** 3) / normalized_remaining_capacities.min() + (bin_height_item_ratio ** 2) / bin_height_item_ratio.max() ** 2 + 0.5 * np.arange(len(bins)) + 0.25 * np.log(bin_utilization + 1)\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the bin's remaining capacity, the bin's capacity to the power of 4, the bin's position in the list, and the square root of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New Algorithm: Compute a weighted sum of the bin's current size, the bin's capacity to the power of 4, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * bins / bins.max() ** 2.5 + remaining_capacities / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm determines the score of a bin based on the following criteria: the bin's remaining capacity, the bin's position, the bin's capacity, and the number of times the bin has been used. The score is calculated as the sum of these factors, each weighted by a different power.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins / bins.max()) ** 3 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "Calculate score as a weighted sum of the bin's current capacity to the power of 2, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the reciprocal of the standard deviation of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) + 1 / np.std(bins)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * bins / bins.max() ** 2.5 + remaining_capacities ** 3 / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the geometric mean between the bin remaining capacity and itself to the power of 3, the bin index, and the bin's remaining capacity divided by its capacity to power of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (np.sqrt(normalized_remaining_capacities * (normalized_remaining_capacities ** 3))) / (normalized_remaining_capacities.min() ** 2) + np.arange(len(bins)) + bins / bins.min() ** 2\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Considering bins with sufficient capacity to accommodate the current item, assign the item to the bin with the maximum score estimated as a weighted sum of the bin's current capacity, the number of items that could fit into the bin, and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 3) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.min() + 0.3 * np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_17.json
================================================
[
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) / normalized_remaining_capacities.mean()\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "Algorithm: The algorithm calculates the score of each bin as a combination of the remaining capacity, the negative of the bin's usage factor (i.e., the proportion of the bin that is already full), and the negative index of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() - 0.5 * bins / bins.max() - 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "{Promote bins with a large number of items and penalize bins with a small number of items while considering the remaining capacity.}",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the power of 0.75 of the ratio of its current height to the maximum height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 0.75 - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the sum of its current height and the maximum height, the item size, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.25 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins + bins.max()) / bins.max() - 0.25 * np.arange(len(bins)) + 0.25 * item / bins.max()\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The algorithm computes a weighted sum of the bin's current size, the bin's capacity to the power of 2, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 2) / bins.max() ** 2 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm calculates the score of each bin as a combination of its remaining capacity, the ratio of its remaining capacity to its original capacity, and the negative index of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (normalized_remaining_capacities / (bins / bins.max())) - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the bin's remaining capacity, the bin's capacity to the power of 4, the bin's position in the list, and the square root of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New Algorithm: Compute a weighted sum of the bin's current size, the bin's capacity to the power of 4, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 / bins ** 2 + remaining_capacities / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm determines the score of a bin based on the following criteria: the bin's remaining capacity, the bin's position, the bin's capacity, and the number of times the bin has been used. The score is calculated as the sum of these factors, each weighted by a different power.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins / bins.max()) ** 3 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "Calculate score as a weighted sum of the bin's current capacity to the power of 2, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the reciprocal of the standard deviation of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) + 1 / np.std(bins)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * bins / bins.max() ** 2.5 + remaining_capacities ** 3 / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the bin's remaining capacity to the power of 2, the bin's position in the list, the bin's capacity to the power of 3, and the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + (bins ** 3) / bins.max() ** 3 + remaining_capacities\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Considering bins with sufficient capacity to accommodate the current item, assign the item to the bin with the maximum score estimated as a weighted sum of the bin's current capacity, the number of items that could fit into the bin, and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 3) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.min() + 0.3 * np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_18.json
================================================
[
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) / normalized_remaining_capacities.mean()\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "Algorithm: The algorithm calculates the score of each bin as a combination of the remaining capacity, the negative of the bin's usage factor (i.e., the proportion of the bin that is already full), and the negative index of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() - 0.5 * bins / bins.max() - 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "{Promote bins with a large number of items and penalize bins with a small number of items while considering the remaining capacity.}",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the power of 0.75 of the ratio of its current height to the maximum height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 0.75 - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the sum of its current height and the maximum height, the item size, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.25 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins + bins.max()) / bins.max() - 0.25 * np.arange(len(bins)) + 0.25 * item / bins.max()\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the power of 0.6 of the ratio of its current height to the maximum height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 0.6 - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, remaining capacity, and its inverse index in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * (bins.size - np.arange(len(bins)))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the bin's remaining capacity, the bin's capacity to the power of 4, the bin's position in the list, and the square root of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New Algorithm: Compute a weighted sum of the bin's current size, the bin's capacity to the power of 4, the bin's remaining capacity to the power of 3, the square root of the number of times the bin has been used, the square root of the number of empty spaces in the bin, and the position of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n available_spaces = bins - np.maximum((bins - item), 0)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins ** 4) / bins.max() ** 4 + np.sqrt(bins) + np.sqrt(available_spaces) + np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm scores bins based on their capacity, considering the item's size, bin's original capacity, and the bin's position, with a logarithmic component and a weighted sum of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (normalized_remaining_capacities / (bins / bins.max())) - 0.25 * np.arange(len(bins)) + np.log(bins / bins.max()) + np.array([(item / bins[i])**3 for i in range(0, len(bins))])\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 / bins ** 2 + remaining_capacities / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm determines the score of a bin based on the following criteria: the bin's remaining capacity, the bin's position, the bin's capacity, and the number of times the bin has been used. The score is calculated as the sum of these factors, each weighted by a different power.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins / bins.max()) ** 3 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "Calculate score as a weighted sum of the bin's current capacity to the power of 2, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the reciprocal of the standard deviation of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) + 1 / np.std(bins)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * bins / bins.max() ** 2.5 + remaining_capacities ** 3 / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the bin's remaining capacity to the power of 2, the bin's position in the list, the bin's capacity to the power of 3, and the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + (bins ** 3) / bins.max() ** 3 + remaining_capacities\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Considering bins with sufficient capacity to accommodate the current item, assign the item to the bin with the maximum score estimated as a weighted sum of the bin's current capacity, the number of items that could fit into the bin, and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 3) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.min() + 0.3 * np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_19.json
================================================
[
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) / normalized_remaining_capacities.mean()\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "Algorithm: The algorithm calculates the score of each bin as a combination of the remaining capacity, the negative of the bin's usage factor (i.e., the proportion of the bin that is already full), and the negative index of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() - 0.5 * bins / bins.max() - 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * remaining_capacities / remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "{Promote bins with a large number of items and penalize bins with a small number of items while considering the remaining capacity.}",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the power of 0.75 of the ratio of its current height to the maximum height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 0.75 - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a weighted sum of its remaining capacity, the inverse of its index in the list, and the difference between its current height and the maximum height.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.25 * normalized_remaining_capacities / normalized_remaining_capacities.min() - 0.25 * np.arange(len(bins)) + 0.25 * (bins - bins.max()) / bins.max()\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the power of 0.6 of the ratio of its current height to the maximum height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 0.6 - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, remaining capacity, and its inverse index in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * (bins.size - np.arange(len(bins)))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin as a combination of the bin's normalized remaining capacity, the square root of the bin's current height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * np.sqrt(bins / bins.max()) - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The score of each bin is a weighted sum of a high power of its remaining capacity to promote empty bins, a low power of its current height to penalize full bins, and its index in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 5) / remaining_capacities.min() - (bins / bins.max()) ** 0.2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm scores bins based on their capacity, considering the item's size, bin's original capacity, and the bin's position, with a logarithmic component and a weighted sum of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (normalized_remaining_capacities / (bins / bins.max())) - 0.25 * np.arange(len(bins)) + np.log(bins / bins.max()) + np.array([(item / bins[i])**3 for i in range(0, len(bins))])\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 / bins ** 2 + remaining_capacities / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm determines the score of a bin based on the following criteria: the bin's remaining capacity, the bin's position, the bin's capacity, and the number of times the bin has been used. The score is calculated as the sum of these factors, each weighted by a different power.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins / bins.max()) ** 3 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "Calculate score as a weighted sum of the bin's current capacity to the power of 2, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the reciprocal of the standard deviation of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) + 1 / np.std(bins)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * bins / bins.max() ** 2.5 + remaining_capacities ** 3 / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the bin's remaining capacity to the power of 2, the bin's position in the list, the bin's capacity to the power of 3, and the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + (bins ** 3) / bins.max() ** 3 + remaining_capacities\n return scores",
"objective": 0.00825,
"other_inf": null
},
{
"algorithm": "Considering bins with sufficient capacity to accommodate the current item, assign the item to the bin with the maximum score estimated as a weighted sum of the bin's current capacity, the number of items that could fit into the bin, and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 3) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.min() + 0.3 * np.arange(len(bins))\n return scores",
"objective": 0.00835,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_2.json
================================================
[
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = (normalized_remaining_capacities**2) / normalized_remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.02183,
"other_inf": null
},
{
"algorithm": "Calculate each bin's score by multiplying the bin's current load by the reciprocal of the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate each bin's score by subtracting the bin's current load from the maximum capacity of the bin and then multiplying by the reciprocal of its load plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = 1000 # Replace with learned parameter or constant\n scores = np.full_like(bins, fill_value=0)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n scores[i] = (max_capacity - bin_capacity) / (bin_capacity + 1)\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Assign items to bins with scores based on the remaining capacity but also incorporate the item size, giving preference to bins that can accommodate the item without leaving too much empty space.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_bin = np.max(bins)\n available_space = bins - item\n scores[available_space >= 0] = max_bin - (available_space[available_space >= 0] * item / max_bin)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Assign bins inversely proportional to the sum of bin's current capacity and the item size to give precedence to bins with lower current capacities and minimize the usage of additional bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins + item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "`The new algorithm calculates each bin's score by taking the difference between the bin's current capacity and the maximum capacity of the bin, multiplying it by the square root of the bin's load plus one, and dividing by the bin's capacity.`",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, fill_value=0)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n scores[i] = (max_capacity - bin_capacity) * np.sqrt(bin_capacity + 1) / bin_capacity\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate each bin's score by subtracting the bin's current load from the maximum capacity of the bin and then multiplying by the reciprocal of its load.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, fill_value=0)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n scores[i] = (max_capacity - bin_capacity) / (bin_capacity + 1) * np.exp(item / bin_capacity)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with smaller remaining capacities and larger capacities and uses a polynomial function to calculate scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity >= 0] = 2 * (np.cos(np.pi * (remaining_capacity[remaining_capacity >= 0] / bins[remaining_capacity >= 0])) + 1)**2 + item / bins[remaining_capacity >= 0]\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate each bin's score by subtracting the bin's current load from a combination of the item size and maximum capacity of the bin and then multiplying by the reciprocal of its load plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, fill_value=0)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n scores[i] = (max_capacity + item - bin_capacity) / (bin_capacity + 1)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Score bins by calculating the sum of their normalized capacity with the normalized size of the item and the square root of the bin index, while penalizing bins with less remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.where(bins >= item, (1 - bins / max_capacity) + (item / max_capacity) + np.sqrt(np.arange(len(bins))), -np.inf)\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "Assign bins for an item by scoring based on available bin space, prioritizing bins with a difference between maximum and mean bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(0, (bins.max() - bins.mean()) - (bins - item))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate each bin's score by subtracting the bin's current load from the maximum capacity of the bin and then multiplying by the reciprocal of its load plus one.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, fill_value=0)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n scores[i] = (max_capacity - bin_capacity) / (bin_capacity + 1)\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item + np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.arange(len(bins))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The algorithm should strive for diversity by assigning higher scores to bins that are closer to or further from the average bin capacity, effectively balancing utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n mean_capacity = np.mean(bins)\n scores = np.zeros_like(bins)\n scores[bins < mean_capacity] = np.exp((bins[bins < mean_capacity] - item) / mean_capacity)\n scores[bins >= mean_capacity] = np.exp((item - bins[bins >= mean_capacity]) / mean_capacity)\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / bins.min() + np.arange(len(bins))\n return scores",
"objective": 0.04367,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_20.json
================================================
[
{
"algorithm": "Assign an item to a feasible bin with a high score calculated by the weighted sum of bin's height, remaining capacity, inverse index, and the ratio of current height to its maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 0.75 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) + 0.25 * (bins.size - np.arange(len(bins))) + np.log(normalized_remaining_capacities / (bins / bins.max()))\n return scores",
"objective": 0.00614,
"other_inf": null
},
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins)) / normalized_remaining_capacities.mean()\n return scores",
"objective": 0.00634,
"other_inf": null
},
{
"algorithm": "Algorithm: The algorithm calculates the score of each bin as a combination of the remaining capacity, the negative of the bin's usage factor (i.e., the proportion of the bin that is already full), and the negative index of the bin in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() - 0.5 * bins / bins.max() - 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "The method assigns an item to the bin with maximum score the calculated by the weighted sum of bin's current height and its index in the list, divided by bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00664,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * remaining_capacities / remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00674,
"other_inf": null
},
{
"algorithm": "Utilize a weighted sum of bins' remaining capacity, but penalize bins with a large number of items and promote bins with a small number of items.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() - bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "{Promote bins with a large number of items and penalize bins with a small number of items while considering the remaining capacity.}",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_item_ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + bin_item_ratio / bin_item_ratio.max() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the power of 0.75 of the ratio of its current height to the maximum height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 0.75 - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm gives priority to bins with smaller indices and a larger gap between their current height and maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 0.5 * remaining_capacities / remaining_capacities.min() + 0.3 * ((bins - item) / (bins - item).max()) ** 2 + 0.2 * np.arange(len(bins))\n return scores",
"objective": 0.00714,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, capacity, and its index in the list .",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00724,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as a combination of its remaining capacity, the power of 0.6 of the ratio of its current height to the maximum height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (bins / bins.max()) ** 0.6 - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00734,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign an item to the feasible bin with the highest score calculated by the weighted sum of bin\u2019s current height, remaining capacity, and its inverse index in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 2 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.5 * (bins / bins.max()) ** 2 + 0.5 * (bins.size - np.arange(len(bins)))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin as a combination of the bin's normalized remaining capacity, the square root of the bin's current height, and the negative index of the bin in the list, where a higher index indicates a later position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * np.sqrt(bins / bins.max()) - 0.25 * np.arange(len(bins))\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "The score of each bin is a weighted sum of a high power of its remaining capacity to promote empty bins, a low power of its current height to penalize full bins, and its index in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 5) / remaining_capacities.min() - (bins / bins.max()) ** 0.2 + 0.5 * np.arange(len(bins))\n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "The new algorithm scores bins based on their capacity, considering the item's size, bin's original capacity, and the bin's position, with a logarithmic component and a weighted sum of these factors.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * normalized_remaining_capacities / normalized_remaining_capacities.min() + 0.25 * (normalized_remaining_capacities / (bins / bins.max())) - 0.25 * np.arange(len(bins)) + np.log(bins / bins.max()) + np.array([(item / bins[i])**3 for i in range(0, len(bins))])\n return scores",
"objective": 0.00775,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 / bins ** 2 + remaining_capacities / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The new algorithm determines the score of a bin based on the following criteria: the bin's remaining capacity, the bin's position, the bin's capacity, and the number of times the bin has been used. The score is calculated as the sum of these factors, each weighted by a different power.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 3) / remaining_capacities.min() + (bins / bins.max()) ** 3 + np.arange(len(bins)) + np.sqrt(bins)\n return scores",
"objective": 0.00795,
"other_inf": null
},
{
"algorithm": "Calculate score as a weighted sum of the bin's current capacity to the power of 2, the difference between the bin's capacity and the item size, the number of items that fit into the bin, and the reciprocal of the standard deviation of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) + 1 / np.std(bins)\n return scores",
"objective": 0.00805,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a weighted sum of the bin's current size, its remaining capacity to the power of 3, the bin's capacity to the power of 2.5, the natural logarithm of the bin's remaining capacity, and the bin's position in the list.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = 1.5 * bins / bins.max() ** 2.5 + remaining_capacities ** 3 / remaining_capacities.min() + np.log(remaining_capacities) + np.arange(len(bins))\n return scores",
"objective": 0.00815,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the bin's remaining capacity to the power of 2, the bin's position in the list, the bin's capacity to the power of 3, and the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + (bins ** 3) / bins.max() ** 3 + remaining_capacities\n return scores",
"objective": 0.00825,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_3.json
================================================
[
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = bins - item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Calculate scores using a combination of normalized capacity, item size, bin index, and a penalty for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n normalized_capacity = bins / max_capacity\n normalized_item = item / max_capacity\n bin_index = np.arange(len(bins))\n penalty = 1 - (bins - item) / (bins - item + 1)\n scores = normalized_capacity + normalized_item + np.sqrt(bin_index) + penalty\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = (normalized_remaining_capacities**2) / normalized_remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.02183,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score by penalizing bins with low remaining capacity and rewarding smaller bin indexes, while considering the ratio of the item size to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_capacity = bins / np.max(bins)\n normalized_item = item / np.max(bins)\n bin_index = np.arange(len(bins))\n penalty = 1 - (bins - item) ** 2 / (bins - item + 1) ** 2\n scores = normalized_capacity - normalized_item + 1 / np.sqrt(bin_index + 1) + penalty\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "The new score function assigns a higher score to bins with relatively larger rest capacity while considering the item size, encouraging diversity and avoiding early saturation of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = normalized_remaining_capacities / np.power(normalized_remaining_capacities, 1 + item / bins) + np.arange(len(bins))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "Calculate each bin's score by multiplying the bin's current load by the reciprocal of the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Utilizes a weighted sum of the normalized bin capacities, the number of items in each bin, and a penalty term for bins with less remaining capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_capacities = bins - item\n num_items_in_bin = np.arange(len(bins)) + 1\n penalty = 1 / (normalized_capacities + 1)\n scores = 0.5 * normalized_capacities / max(bins) + 0.3 * penalty + 0.2 * num_items_in_bin\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of a bin by multiplying the bin's current load by the reciprocal of the difference between the bin's capacity and the item size, plus a random number that is drawn from a uniform distribution.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item + 1)) + np.random.uniform(0, 1, len(bins))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate each bin's score by multiplying the bin's current load by the reciprocal of the difference between the bin's capacity and the item size, plus the reciprocal of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + 1 / (np.arange(len(bins))+1)\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a bin's score as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size and the bin's previous total fill percentage, multiplied by the number of items assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins / bins.max()\n scores = scores * (np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's previous total fill percentage.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins / bins.max()\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Assign items to bins with scores based on the remaining capacity but also incorporate the item size, giving preference to bins that can accommodate the item without leaving too much empty space.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n max_bin = np.max(bins)\n available_space = bins - item\n scores[available_space >= 0] = max_bin - (available_space[available_space >= 0] * item / max_bin)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Assign bins inversely proportional to the sum of bin's current capacity and the item size to give precedence to bins with lower current capacities and minimize the usage of additional bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins + item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "`The new algorithm calculates each bin's score by taking the difference between the bin's current capacity and the maximum capacity of the bin, multiplying it by the square root of the bin's load plus one, and dividing by the bin's capacity.`",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, fill_value=0)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n scores[i] = (max_capacity - bin_capacity) * np.sqrt(bin_capacity + 1) / bin_capacity\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate each bin's score by multiplying the bin's current load by the reciprocal of the bin's remaining capacity, exponentially penalized by a factor that discourages repeated use of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = bins / (bins - item + 1) * np.power(0.5, np.arange(len(bins)))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with smaller remaining capacities and larger capacities and uses a polynomial function to calculate scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n scores[remaining_capacity < 0] = -1 # Mark bins with not enough capacity as -1\n scores[remaining_capacity >= 0] = 2 * (np.cos(np.pi * (remaining_capacity[remaining_capacity >= 0] / bins[remaining_capacity >= 0])) + 1)**2 + item / bins[remaining_capacity >= 0]\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates each bin's score by taking the difference between the bin's current capacity and the maximum capacity of the bin, multiplying it by the cubic root of the bin's load plus one, and dividing by the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = np.full_like(bins, fill_value=0)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity != max_capacity:\n scores[i] = (max_capacity - bin_capacity) * np.cbrt(bin_capacity + 1) / bin_capacity\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_4.json
================================================
[
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = bins - item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Calculate scores using a combination of normalized capacity, item size, bin index, and a penalty for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n normalized_capacity = bins / max_capacity\n normalized_item = item / max_capacity\n bin_index = np.arange(len(bins))\n penalty = 1 - (bins - item) / (bins - item + 1)\n scores = normalized_capacity + normalized_item + np.sqrt(bin_index) + penalty\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "The new algorithm is inspired by the idea of combining multiplication and addition operations to calculate the scores, but it introduces a unique formulation involving the reciprocal of a complex term and a weighted sum of bin properties.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = bins - item / bins\n normalized_item_size = item / bins.max()\n scores = bins / (bins - item) + (normalized_remaining_capacities * (1 - normalized_item_size)) + np.arange(len(bins))\n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the score of each bin utilizing the sum of the normalized remaining capacity, the reciprocal of the remaining capacity, the current capacity, and the number of utilized bins, all divided by their respective maximum values.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n scores = normalized_remaining_capacities + reciprocal_remaining_capacities + bins / bins.max() + np.arange(len(bins))\n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score calculated as the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n distances_to_the_center = np.abs(bins - np.mean(bins)) / np.std(bins)\n scores = (normalized_remaining_capacities**2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + (distances_to_the_center**2)\n return scores",
"objective": 0.01972,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = (normalized_remaining_capacities**2) / normalized_remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.02183,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign an item to the bin with the maximum score by penalizing bins with small ratio of rest capacity to maximum capacity, rewarding smaller bin indexes, and considering the quadratic ratio of the item size to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_capacity = bins / np.max(bins)\n normalized_item = item / np.max(bins)\n bin_index = np.arange(len(bins))\n penalty = 1 - (bins - item) / (bins - item + 1)\n scores = normalized_capacity - normalized_item**2 + 1 / np.sqrt(bin_index + 1) + penalty\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score by penalizing bins with low remaining capacity and rewarding smaller bin indexes, while considering the ratio of the item size to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_capacity = bins / np.max(bins)\n normalized_item = item / np.max(bins)\n bin_index = np.arange(len(bins))\n penalty = 1 - (bins - item) ** 2 / (bins - item + 1) ** 2\n scores = normalized_capacity - normalized_item + 1 / np.sqrt(bin_index + 1) + penalty\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "The new score function assigns a higher score to bins with relatively larger rest capacity while considering the item size, encouraging diversity and avoiding early saturation of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = normalized_remaining_capacities / np.power(normalized_remaining_capacities, 1 + item / bins) + np.arange(len(bins))\n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "Calculate each bin's score by multiplying the bin's current load by the reciprocal of the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + np.arange(len(bins))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Utilizes a weighted sum of the normalized bin capacities, the number of items in each bin, and a penalty term for bins with less remaining capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_capacities = bins - item\n num_items_in_bin = np.arange(len(bins)) + 1\n penalty = 1 / (normalized_capacities + 1)\n scores = 0.5 * normalized_capacities / max(bins) + 0.3 * penalty + 0.2 * num_items_in_bin\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "A modified algorithm using a weighted sum of normalized bin capacities, the reciprocal of remaining capacity, and a preference for bins with fewer items assigned",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_capacities = bins - item\n reciprocal_remaining_capacity = bins / (bins - item)\n num_items_in_bin = np.arange(len(bins)) + 1\n scores = 0.5 * normalized_capacities / max(bins) + 0.3 * reciprocal_remaining_capacity + 0.2 * num_items_in_bin\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of a bin by multiplying the bin's current load by the reciprocal of the difference between the bin's capacity and the item size, plus a random number that is drawn from a uniform distribution.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / (bins - item + 1)) + np.random.uniform(0, 1, len(bins))\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate each bin's score by multiplying the bin's current load by the reciprocal of the difference between the bin's capacity and the item size, plus the reciprocal of the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item + 1) + 1 / (np.arange(len(bins))+1)\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score, considering the rest capacity of each bin, in order to minimize the number of used bins. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n scores[bins != bins.max()] = item / (bins[bins != bins.max()] - item + 1)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Adjust weights of the existing score function to prioritize bins with fewer items and larger remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_capacities = bins - item\n reciprocal_remaining_capacity = bins / (bins - item)\n num_items_in_bin = np.arange(len(bins)) + 1\n scores = 0.6 * normalized_capacities / max(bins) + 0.3 * reciprocal_remaining_capacity - 0.1 * num_items_in_bin\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates a bin's score as the sum of the bin's current capacity divided by the difference between the bin's capacity and the item size and the bin's previous total fill percentage, multiplied by the number of items assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins / bins.max()\n scores = scores * (np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the bin's previous total fill percentage.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (bins - item) + bins / bins.max()\n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_5.json
================================================
[
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = bins - item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The algorithm computes the score by multiplying a weight vector with the sum of the normalized remaining capacity, the reciprocal of the remaining capacity, the square root of the remaining capacity, and the number of utilized bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([2, 1, 1, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n sqrt_remaining_capacities = np.sqrt((bins - item) / (bins - item).max())\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * sqrt_remaining_capacities + weight_vector[3] * np.arange(len(bins))\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "Calculate scores using a combination of normalized capacity, item size, bin index, and a penalty for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n normalized_capacity = bins / max_capacity\n normalized_item = item / max_capacity\n bin_index = np.arange(len(bins))\n penalty = 1 - (bins - item) / (bins - item + 1)\n scores = normalized_capacity + normalized_item + np.sqrt(bin_index) + penalty\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "The new algorithm is inspired by the idea of combining multiplication and addition operations to calculate the scores, but it introduces a unique formulation involving the reciprocal of a complex term and a weighted sum of bin properties.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = bins - item / bins\n normalized_item_size = item / bins.max()\n scores = bins / (bins - item) + (normalized_remaining_capacities * (1 - normalized_item_size)) + np.arange(len(bins))\n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score by multiplying a weight vector with the sum of the normalized remaining capacity, the reciprocal of the remaining capacity, and the number of utilized bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([2, 1, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * np.arange(len(bins))\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the score of each bin utilizing the sum of the normalized remaining capacity, the reciprocal of the remaining capacity, the current capacity, and the number of utilized bins, all divided by their respective maximum values.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n scores = normalized_remaining_capacities + reciprocal_remaining_capacities + bins / bins.max() + np.arange(len(bins))\n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score by multiplying the exponential of the normalized remaining capacity with the reciprocal of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n distances_to_the_center = np.abs(bins - np.mean(bins)) / np.std(bins)\n scores = np.exp(normalized_remaining_capacities) / (bins - item) + np.arange(len(bins)) + (distances_to_the_center**2)\n return scores",
"objective": 0.01972,
"other_inf": null
},
{
"algorithm": "The algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = (normalized_remaining_capacities**2) / normalized_remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.02183,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score calculated as the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n distances_to_the_center = np.abs(bins - np.mean(bins)) / np.std(bins)\n scores = (normalized_remaining_capacities) / normalized_remaining_capacities.min() + np.arange(len(bins)) + (distances_to_the_center)\n return scores",
"objective": 0.02395,
"other_inf": null
},
{
"algorithm": "Algorithm using the cube of the normalized remaining capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = (normalized_remaining_capacities**3) / normalized_remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.02435,
"other_inf": null
},
{
"algorithm": "Weighted sum of the normalized remaining capacity, the reciprocal of the remaining capacity, and the bin's position, modulated by the bin's usage count.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([2, 0.5, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n bin_usage_count = (bins == 0).astype(int)\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * np.arange(len(bins)) * (1 - bin_usage_count)\n return scores",
"objective": 0.02566,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns an item to the bin with the maximum score, with priority and penalty for used bins, and updates the bin's capacity and usage count accordingly.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / bins\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins)) * (bins != item) - (bins == item) * 100\n return scores",
"objective": 0.02606,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n distances_to_the_center = np.abs(bins - np.mean(bins)) / np.std(bins)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.02626,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score calculated by adding the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, the square root of the bin's distance to the center of bins, and the bin's number of assignments.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n distances_to_the_center = np.abs(bins - np.mean(bins)) / np.std(bins)\n scores = (normalized_remaining_capacities**2) / normalized_remaining_capacities.min() + np.sqrt(distances_to_the_center) + np.arange(len(bins))\n return scores",
"objective": 0.02676,
"other_inf": null
},
{
"algorithm": "The algorithm finds the score by calculating the product of the remaining capacity and the reciprocal of the difference between the bin's capacity and the item size, added with a weight vector multiplied by the square root of the difference and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n weight_vector = np.array([1, 2, 3])\n scores = remaining_capacities * (1 / (bins - item)) + weight_vector[0] * np.sqrt(bins - item) + weight_vector[1] * np.sqrt(bins - item) + weight_vector[2] * np.arange(len(bins))\n return scores",
"objective": 0.02948,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign an item to the bin with the maximum score by penalizing bins with small ratio of rest capacity to maximum capacity, rewarding smaller bin indexes, and considering the quadratic ratio of the item size to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_capacity = bins / np.max(bins)\n normalized_item = item / np.max(bins)\n bin_index = np.arange(len(bins))\n penalty = 1 - (bins - item) / (bins - item + 1)\n scores = normalized_capacity - normalized_item**2 + 1 / np.sqrt(bin_index + 1) + penalty\n return scores",
"objective": 0.03079,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score by penalizing bins with low remaining capacity and rewarding smaller bin indexes, while considering the ratio of the item size to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_capacity = bins / np.max(bins)\n normalized_item = item / np.max(bins)\n bin_index = np.arange(len(bins))\n penalty = 1 - (bins - item) ** 2 / (bins - item + 1) ** 2\n scores = normalized_capacity - normalized_item + 1 / np.sqrt(bin_index + 1) + penalty\n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "The bin's score is a combination of the bin's capacity, the bin's current load, and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_bin_load = bins / bins.max()\n normalized_remaining_capacities = (bins - item) / item\n scores = bins * normalized_bin_load / (bins - item) + (1 - normalized_bin_load) * normalized_remaining_capacities\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "The new score function assigns a higher score to bins with relatively larger rest capacity while considering the item size, encouraging diversity and avoiding early saturation of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n scores = normalized_remaining_capacities / np.power(normalized_remaining_capacities, 1 + item / bins) + np.arange(len(bins))\n return scores",
"objective": 0.03783,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_6.json
================================================
[
{
"algorithm": "Calculate the score for each bin as a weighted sum of the reciprocal of the remaining capacity, the bin's position, and the bin's usage count, modulated by the sum of the capacities of the bins",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([1, 0.2, 0.3])\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n bin_usage_count = (bins == 0).astype(int)\n normalized_capacities = (bins + 0.001) / (bins + 0.001).max()\n scores = weight_vector[0] * reciprocal_remaining_capacities + weight_vector[1] * np.arange(len(bins)) * (1 - bin_usage_count) + weight_vector[2] * np.sum(normalized_capacities)\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + 1\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "Weighted sum of the weighted score of normalized remaining capacity, the reciprocal of the remaining capacity, and the square root of the remaining capacity, and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([4, 2, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log(bins - item)\n sqrt_remaining_capacities = np.sqrt((bins - item) / (bins - item).max())\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * sqrt_remaining_capacities + np.arange(len(bins))\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score calculated as the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = remaining_capacities / remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the product of the normalized remaining capacity and the reciprocal of the remaining capacity with the sum of weight vector and the indices of bins to calculate scores. The product puts more emphasis on bins with smaller remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([1, 2])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n scores = np.multiply(normalized_remaining_capacities, reciprocal_remaining_capacities) * np.sum(weight_vector) + np.arange(len(bins))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin based on item size, bin capacity, the ratio of bin capacity to item size, and the remaining capacity of bins, whereas the new algorithm takes the logarithm of bin capacity and the remaining capacity of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n ratio = bins / item\n scores = normalized_remaining_capacities + reciprocal_remaining_capacities + ratio + bins / bins.max() + np.arange(len(bins))\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Multiplies a weight vector with the product of the normalized product of the rest capacity divided by the average capacity and the reciprocal of the rest capacity to calculate scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([2, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).mean()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).mean() * np.log2(bins - item)\n scores = weight_vector[0] * normalized_remaining_capacities * reciprocal_remaining_capacities + weight_vector[1] * np.arange(len(bins))\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies a weight vector with the product of the normalized remaining capacity and the reciprocal of the remaining capacity to calculate scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([2, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n scores = weight_vector[0] * normalized_remaining_capacities * reciprocal_remaining_capacities + weight_vector[1] * np.arange(len(bins))\n return scores",
"objective": 0.0172,
"other_inf": null
},
{
"algorithm": "The algorithm computes the score by multiplying a weight vector with the sum of the normalized remaining capacity, the reciprocal of the remaining capacity, the square root of the remaining capacity, and the number of utilized bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([2, 1, 1, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n sqrt_remaining_capacities = np.sqrt((bins - item) / (bins - item).max())\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * sqrt_remaining_capacities + weight_vector[3] * np.arange(len(bins))\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "Calculate scores using a combination of normalized capacity, item size, bin index, and a penalty for bins with low remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n normalized_capacity = bins / max_capacity\n normalized_item = item / max_capacity\n bin_index = np.arange(len(bins))\n penalty = 1 - (bins - item) / (bins - item + 1)\n scores = normalized_capacity + normalized_item + np.sqrt(bin_index) + penalty\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "The new algorithm is inspired by the idea of combining multiplication and addition operations to calculate the scores, but it introduces a unique formulation involving the reciprocal of a complex term and a weighted sum of bin properties.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = bins - item / bins\n normalized_item_size = item / bins.max()\n scores = bins / (bins - item) + (normalized_remaining_capacities * (1 - normalized_item_size)) + np.arange(len(bins))\n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score by multiplying a weight vector with the sum of the normalized remaining capacity, the reciprocal of the remaining capacity, and the number of utilized bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([2, 1, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * np.arange(len(bins))\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "Calculate scores using a combination of normalized capacity, item size, bin index, exponential of rest capacity, and inverse of bin order. The exponent is greater than one to intensify the impact of small rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n normalized_capacity = bins / max_capacity\n normalized_item = item / max_capacity\n bin_index = np.arange(len(bins))\n penalty = np.exp(1 - (bins - item) / (bins - item + 1))\n order = 1 / (bin_index + 1)\n scores = normalized_capacity + normalized_item + np.sqrt(bin_index) + penalty + order\n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "New normalized algorithm: Weighted sum of the normalized remaining capacity, the reciprocal of the remaining capacity, the bin's position, and the bin's usage count, modulated by the sum of the normalized capacities of the bins",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([1, 0.1, 0.2, 0.3])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n bin_usage_count = (bins == 0).astype(int)\n normalized_capacities = (bins) / (bins).max()\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * np.arange(len(bins)) * (1 - bin_usage_count) + weight_vector[3] * np.sum(1 - normalized_capacities)\n return scores",
"objective": 0.01952,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the score of each bin utilizing the sum of the normalized remaining capacity, the reciprocal of the remaining capacity, the current capacity, and the number of utilized bins, all divided by their respective maximum values.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n scores = normalized_remaining_capacities + reciprocal_remaining_capacities + bins / bins.max() + np.arange(len(bins))\n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score by multiplying the exponential of the normalized remaining capacity with the reciprocal of the difference between the bin's capacity and the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n distances_to_the_center = np.abs(bins - np.mean(bins)) / np.std(bins)\n scores = np.exp(normalized_remaining_capacities) / (bins - item) + np.arange(len(bins)) + (distances_to_the_center**2)\n return scores",
"objective": 0.01972,
"other_inf": null
},
{
"algorithm": "A novel score function that calculates scores based on the ratio of bin capacity to item size, considering the number of times a bin has been used and the ratio of the remaining capacity to the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n scores = (normalized_remaining_capacities**2) / normalized_remaining_capacities.min() + (normalized_capacities**2) + np.arange(len(bins))\n return scores",
"objective": 0.02002,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_7.json
================================================
[
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as a weighted sum of the reciprocal of the remaining capacity, the bin's position, and the bin's usage count, modulated by the sum of the capacities of the bins",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([1, 0.2, 0.3])\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n bin_usage_count = (bins == 0).astype(int)\n normalized_capacities = (bins + 0.001) / (bins + 0.001).max()\n scores = weight_vector[0] * reciprocal_remaining_capacities + weight_vector[1] * np.arange(len(bins)) * (1 - bin_usage_count) + weight_vector[2] * np.sum(normalized_capacities)\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + 1\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "{New algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, the number of items that fit into the bin, and the score from the previous step.}",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) + np.arange(len(bins)) // 2 + np.arange(len(bins)) + 1\n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "Weighted sum of the weighted score of normalized remaining capacity, the reciprocal of the remaining capacity, and the square root of the remaining capacity, and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([4, 2, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log(bins - item)\n sqrt_remaining_capacities = np.sqrt((bins - item) / (bins - item).max())\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * sqrt_remaining_capacities + np.arange(len(bins))\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, the number of items that fit into the bin, the square root of the bin's capacity, and the reciprocal of the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) // 2 + np.arange(len(bins)) + np.sqrt(bins) + 1 / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns a current item to the bin with the maximum score and updates the rest capacity of the bins, until all items are assigned. The score is calculated based on the bin's rest capacity, the difference between the bin's rest capacity and the item size, the number of times the bin has been used, and the square of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n used_bins_scores = np.arange(len(bins))\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + used_bins_scores + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01077,
"other_inf": null
},
{
"algorithm": "Assigning the item to the bin with the maximum score defined as a weighted sum of the bin's rest capacity, the ratio of the bin's rest capacity to the item size, the bin's index, the bin's capacity divided by the item size, the ratio of the number of items that can fit into the bin to the number of items that can fit in the best bin, and the square of the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n num_fits = bins / item / np.max(bins / item)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins)) + normalized_capacities / normalized_capacities.min() + num_fits + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01137,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score calculated as the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = remaining_capacities / remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as the square root of the sum of the weighted square of the bin's current capacity and the exponential of the ratio of the bin's capacity to the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weighted_capacities = np.sqrt(((bins - item) ** 2) / (bins - item).min())\n ratios = bins / item\n scores = weighted_capacities + np.exp(ratios) + np.arange(len(bins)) + np.sqrt(np.abs(bins - np.mean(bins)) / np.std(bins))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the product of the normalized remaining capacity and the reciprocal of the remaining capacity with the sum of weight vector and the indices of bins to calculate scores. The product puts more emphasis on bins with smaller remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([1, 2])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n scores = np.multiply(normalized_remaining_capacities, reciprocal_remaining_capacities) * np.sum(weight_vector) + np.arange(len(bins))\n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Scores are computed by combining a bin's normalized remaining capacity, reciprocal of remaining capacity, square of normalized remaining capacity, ratio of bin capacity to item size, and the number of bins utilized.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n sqr_normalized_remaining_capacities = np.square(normalized_remaining_capacities)\n ratio = bins / item\n scores = normalized_remaining_capacities + reciprocal_remaining_capacities + sqr_normalized_remaining_capacities + ratio + bins / bins.max() + np.arange(len(bins))\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Weighted score of the product of volume reduction and reciprocal remaining capacity, and the product of volume reduction and square root of remaining capacity, and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([3, 2, 1])\n volume_reductions = bins - item\n normalized_volume_reductions = volume_reductions / volume_reductions.max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log(bins - item)\n sqrt_remaining_capacities = np.sqrt((bins - item) / (bins - item).max())\n scores = weight_vector[0] * normalized_volume_reductions * reciprocal_remaining_capacities + weight_vector[1] * normalized_volume_reductions * sqrt_remaining_capacities + weight_vector[2] * np.arange(len(bins))\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Amodified algorithmis to compute the score by multiplying a weight vector with the sum of the normalized remaining capacity, the reciprocal of the remaining capacity, the square root of the remaining capacity, the square of the remaining capacity, and the number of utilized bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([2, 1, 1, 1, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n sqrt_remaining_capacities = np.sqrt((bins - item) / (bins - item).max())\n sqr_remaining_capacities = np.square((bins - item) / (bins - item).max())\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * sqrt_remaining_capacities + weight_vector[3] * sqr_remaining_capacities + weight_vector[4] * np.arange(len(bins))\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity plus score of the previous step, and the ratio of bin capacity to item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n ratio = bins / item\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + ratio\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin based on item size, bin capacity, the ratio of bin capacity to item size, and the remaining capacity of bins, whereas the new algorithm takes the logarithm of bin capacity and the remaining capacity of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n ratio = bins / item\n scores = normalized_remaining_capacities + reciprocal_remaining_capacities + ratio + bins / bins.max() + np.arange(len(bins))\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Multiplies a weight vector with the product of the normalized product of the rest capacity divided by the average capacity and the reciprocal of the rest capacity to calculate scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([2, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).mean()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).mean() * np.log2(bins - item)\n scores = weight_vector[0] * normalized_remaining_capacities * reciprocal_remaining_capacities + weight_vector[1] * np.arange(len(bins))\n return scores",
"objective": 0.0166,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_8.json
================================================
[
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the difference between the bin's capacity and item size in a quadratic form, the reciprocal of the bin's current capacity, the reciprocal of bin's volume, and the difference between bin's capacity and the item size to the power of 1.25 multiplied by the square root of the distance to the center.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_volumes = bins * normalized_remaining_capacities\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (normalized_remaining_capacities ** 2) + (1 / bin_volumes) + (1 / np.sqrt(bin_volumes)) + ((bins - item) ** 1.25) * np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as a product of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the sum of the squared differences between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n normalized_capacities = bins / item\n used_bins_scores = np.arange(len(bins))\n difference = np.abs(bins - item)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + used_bins_scores + np.sum(difference**2) / np.sum(difference**2).max()\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the highest score, calculated as a cubed sum of a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the distance to the center of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) + np.arange(len(bins)) + np.abs(bins - np.mean(bins))\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the cube of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the square root of the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = np.sqrt(bins / item / np.max(bins / item))\n scores = (normalized_remaining_capacities ** 3) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + 1\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "{New algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, the number of items that fit into the bin, and the score from the previous step.}",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) + np.arange(len(bins)) // 2 + np.arange(len(bins)) + 1\n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "Weighted sum of the weighted score of normalized remaining capacity, the reciprocal of the remaining capacity, and the square root of the remaining capacity, and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([4, 2, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log(bins - item)\n sqrt_remaining_capacities = np.sqrt((bins - item) / (bins - item).max())\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * sqrt_remaining_capacities + np.arange(len(bins))\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, the number of items that fit into the bin, the square root of the bin's capacity, and the reciprocal of the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) // 2 + np.arange(len(bins)) + np.sqrt(bins) + 1 / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score defined as a weighted sum of the bin's rest capacity to the power of 3, the ratio of the bin's rest capacity to the item size, the bin's index, the bin's capacity divided by the item size, the ratio of the number of items that can fit into the bin to the number of items that can fit in the best bin, and the ratio of the square of the bin's current capacity to the square of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n num_fits = bins / item / np.max(bins / item)\n scores = (bins**3) / (bins**3).max() + normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins)) + normalized_capacities / normalized_capacities.min() + num_fits + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns a current item to the bin with the maximum score and updates the rest capacity of the bins, until all items are assigned. The score is calculated based on the bin's rest capacity, the difference between the bin's rest capacity and the item size, the number of times the bin has been used, and the square of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n used_bins_scores = np.arange(len(bins))\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + used_bins_scores + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01077,
"other_inf": null
},
{
"algorithm": "Assigning the item to the bin with the maximum score defined as a weighted sum of the bin's rest capacity, the ratio of the bin's rest capacity to the item size, the bin's index, the bin's capacity divided by the item size, the ratio of the number of items that can fit into the bin to the number of items that can fit in the best bin, and the square of the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n num_fits = bins / item / np.max(bins / item)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins)) + normalized_capacities / normalized_capacities.min() + num_fits + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01137,
"other_inf": null
},
{
"algorithm": "Weighted score of the product of volume reduction and reciprocal remaining capacity, and the product of volume reduction and square root of remaining capacity, and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([3, 2, 1])\n volume_reductions = bins - item\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log(bins - item)\n scores = weight_vector[0] * volume_reductions / volume_reductions.max() * reciprocal_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * np.arange(len(bins))\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score calculated as the square of the bin's current capacity divided by the difference between the bin's capacity and the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = bins - item\n scores = remaining_capacities / remaining_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as the square root of the sum of the weighted square of the bin's current capacity and the exponential of the ratio of the bin's capacity to the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weighted_capacities = np.sqrt(((bins - item) ** 2) / (bins - item).min())\n ratios = bins / item\n scores = weighted_capacities + np.exp(ratios) + np.arange(len(bins)) + np.sqrt(np.abs(bins - np.mean(bins)) / np.std(bins))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: prioritize distance to the center by increasing the weight and applying a square operation and using the fourth power of the size difference",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_volumes = bins * normalized_remaining_capacities\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (normalized_remaining_capacities ** 2) + (1 / bin_volumes) + (1 / np.sqrt(bin_volumes)) + ((bins - item) ** 4) * (distances_to_the_center ** 2)\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiplies the product of the normalized remaining capacity and the reciprocal of the remaining capacity with the sum of weight vector and the indices of bins to calculate scores. The product puts more emphasis on bins with smaller remaining capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([1, 2])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log2(bins - item)\n scores = np.multiply(normalized_remaining_capacities, reciprocal_remaining_capacities) * np.sum(weight_vector) + np.arange(len(bins))\n return scores",
"objective": 0.01469,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/Gemini/Run3/population_generation_9.json
================================================
[
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the difference between the bin's capacity and item size in a quadratic form, the reciprocal of the bin's current capacity, the reciprocal of bin's volume, and the difference between bin's capacity and the item size to the power of 1.25 multiplied by the square root of the distance to the center.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n bin_volumes = bins * normalized_remaining_capacities\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (normalized_remaining_capacities ** 2) + (1 / bin_volumes) + (1 / np.sqrt(bin_volumes)) + ((bins - item) ** 1.25) * np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center)\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Calculate a weighted sum of the square of bin capacity, bin index, a random number, distance to the center, and number of items fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.random.uniform(0, 1, len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as the square root of the sum of the weighted square of the bin's current capacity and the arctangent of the ratio of the bin's capacity to the item size, plus the number of times the bin has been used, plus the square of the bin's distance to the center of bins.",
"code": "import numpy as np\nfrom math import atan, sqrt\n\ndef score(item, bins):\n weighted_capacities = np.sqrt(((bins - item) ** 2) / (bins - item).min())\n ratios = bins / item\n scores = weighted_capacities + np.arctan(ratios) + np.arange(len(bins)) + np.sqrt(np.abs(bins - np.mean(bins)) / np.std(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n distances_to_the_center = np.minimum(np.abs(bins - np.mean(bins)) / np.std(bins), 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + np.sqrt(distances_to_the_center) + num_fits\n return scores",
"objective": 0.00926,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities ** 2) / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the highest score, calculated as a cubed sum of a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the distance to the center of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) + np.arange(len(bins)) + np.abs(bins - np.mean(bins))\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted combination of the bin's remaining capacity that is penalized by the number of item that can be fit into the bin and the number of times the bin has been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n num_fits = bins / item / np.max(bins / item)\n scores = (normalized_remaining_capacities - (normalized_remaining_capacities / np.sum(normalized_remaining_capacities)) * num_fits)**2 / normalized_remaining_capacities.min() + np.arange(len(bins)) + num_fits\n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, and the number of items that fit into the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + np.arange(len(bins)) + 1\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "{New algorithm: Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, the number of items that fit into the bin, and the score from the previous step.}",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) + np.arange(len(bins)) // 2 + np.arange(len(bins)) + 1\n return scores",
"objective": 0.01036,
"other_inf": null
},
{
"algorithm": "Weighted sum of the weighted score of normalized remaining capacity, the reciprocal of the remaining capacity, and the square root of the remaining capacity, and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([4, 2, 1])\n normalized_remaining_capacities = (bins - item) / (bins - item).max()\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log(bins - item)\n sqrt_remaining_capacities = np.sqrt((bins - item) / (bins - item).max())\n scores = weight_vector[0] * normalized_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * sqrt_remaining_capacities + np.arange(len(bins))\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted sum of the square of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, the distance to the center of bins, the number of items that fit into the bin, the square root of the bin's capacity, and the reciprocal of the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacities = np.minimum((bins - item) / item, 1)\n scores = (remaining_capacities ** 2) / remaining_capacities.min() + (bins - item) / item + np.arange(len(bins)) // 2 + np.arange(len(bins)) + np.sqrt(bins) + 1 / (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score defined as a weighted sum of the bin's rest capacity to the power of 3, the ratio of the bin's rest capacity to the item size, the bin's index, the bin's capacity divided by the item size, the ratio of the number of items that can fit into the bin to the number of items that can fit in the best bin, and the ratio of the square of the bin's current capacity to the square of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n num_fits = bins / item / np.max(bins / item)\n scores = (bins**3) / (bins**3).max() + normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins)) + normalized_capacities / normalized_capacities.min() + num_fits + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns a current item to the bin with the maximum score and updates the rest capacity of the bins, until all items are assigned. The score is calculated based on the bin's rest capacity, the difference between the bin's rest capacity and the item size, the number of times the bin has been used, and the square of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n used_bins_scores = np.arange(len(bins))\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + used_bins_scores + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01077,
"other_inf": null
},
{
"algorithm": "Modified weighted score of the product of inverse volume reduction and remaining capacity, and the product of volume reduction and square root of remaining capacity, and the number of used bins",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([3, 2, 1])\n volume_reductions = bins - item\n remaining_capacities = bins - item\n scores = weight_vector[0] * 1.0 / volume_reductions * remaining_capacities + weight_vector[1] * remaining_capacities / remaining_capacities.max() * np.sqrt(remaining_capacities) + weight_vector[2] * np.arange(len(bins))\n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": "Assigning the item to the bin with the maximum score defined as a weighted sum of the bin's rest capacity, the ratio of the bin's rest capacity to the item size, the bin's index, the bin's capacity divided by the item size, the ratio of the number of items that can fit into the bin to the number of items that can fit in the best bin, and the square of the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n num_fits = bins / item / np.max(bins / item)\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + np.arange(len(bins)) + normalized_capacities / normalized_capacities.min() + num_fits + (bins**2) / (bins**2).max()\n return scores",
"objective": 0.01137,
"other_inf": null
},
{
"algorithm": "Weighted score of the product of volume reduction and reciprocal remaining capacity, and the product of volume reduction and square root of remaining capacity, and the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n weight_vector = np.array([3, 2, 1])\n volume_reductions = bins - item\n reciprocal_remaining_capacities = (bins - item) / (bins - item).max() * np.log(bins - item)\n scores = weight_vector[0] * volume_reductions / volume_reductions.max() * reciprocal_remaining_capacities + weight_vector[1] * reciprocal_remaining_capacities + weight_vector[2] * np.arange(len(bins))\n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score calculated as a weighted combination of the bin's remaining capacity that is penalized by the average load factor of all feasible bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = np.minimum((bins - item) / item, 1)\n avg_load = bins.mean() / bins\n scores = (normalized_remaining_capacities - (normalized_remaining_capacities / np.sum(normalized_remaining_capacities)) * avg_load)**2 / normalized_remaining_capacities.min() + avg_load + np.arange(len(bins))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns an item to the bin with the maximum score and updates the rest capacity of the bin accordingly, until all items are assigned. The score for each bin is calculated as a weighted sum of the bin's current capacity, the difference between the bin's capacity and the item size, the number of times the bin has been used, and the bin's current capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + np.arange(len(bins))\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns an item to the bin with the maximum score calculated based on the weighted sum of the bin's rest capacity, the difference between the bin's rest capacity and the item size, the number of times the bin has been used, the bin's capacity, and the reciprocal of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n normalized_remaining_capacities = (bins - item) / item\n normalized_capacities = bins / item\n used_bins_scores = np.arange(len(bins))\n reciprocal_capacities = 1 / bins\n scores = normalized_remaining_capacities / normalized_remaining_capacities.min() + normalized_capacities / normalized_capacities.min() + used_bins_scores + bins / bins.max() + reciprocal_capacities / reciprocal_capacities.max()\n return scores",
"objective": 0.01248,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_1.json
================================================
[
{
"algorithm": "The score of each bin is calculated as the product of the inverse of its rest capacity and a weight that is inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the weight for each bin based on its index\n weight = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * weight\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the ratio of the item size to the bin's rest capacity, considering the condition of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the ratio of the item size to the bin's rest capacity\n scores = np.divide(item, bins)\n \n # Consider the condition of the rest capacity\n scores[np.where(bins == 0)] = 0\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new scoring function will calculate the score for each bin by multiplying the rest capacity with the inverse of the bin's index to prioritize bins with more rest capacity and smaller indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.multiply(bins, 1 / (np.arange(len(bins)) + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New Algorithm: Modify the score by adding the inverse of the bin's index to the product of the rest capacity and the inverse of its index to promote bins with higher rest capacities and smaller indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's index\n inv_index = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the product of the rest capacity and the inverse of its index\n prod = bins * inv_index\n \n # Add the inverse of the bin's index to the product\n scores = prod + inv_index\n \n # Return the scores\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "The score function will be calculated based on the rest capacity of bins by penalizing bins with less remaining capacity and prioritizing bins closer to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacity\n diff = np.abs(item - bins)\n \n # Penalize bins with less remaining capacity\n penalty = np.maximum(0, (diff / bins))\n \n # Prioritize bins closer to the item size\n priority = np.exp(-np.square(diff))\n \n # Combine the penalty and priority scores\n scores = penalty * priority\n \n return scores",
"objective": 0.04749,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the rest capacity, using a weighted average of the inverse of the bin number and the square of the rest capacity, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the rest capacity\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (1 / (bin - item + 1)) * (bin ** 2)\n return scores",
"objective": 0.05353,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm prioritizes bins with less remaining capacity and penalizes bins closer to the item size, using an exponential decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the penalty for each bin based on its distance from the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Calculate the priority of each bin based on its remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Combine the penalty and priority to get the final score for each bin\n scores = penalty * priority\n \n return scores",
"objective": 0.05514,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the total score for each bin by considering the relative remaining capacity and subtracting a penalty proportional to the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the relative remaining capacity for each bin\n rel_remaining = (bins - item) / bins\n \n # Subtract a penalty proportional to the bin's index\n penalty = np.arange(len(bins)) * 0.1\n \n # Calculate the total score for each bin\n scores = rel_remaining - penalty\n \n return scores",
"objective": 0.06198,
"other_inf": null
},
{
"algorithm": "The algorithm multiplies the rest capacity of each bin to a power representing the bin's index, then divides the result by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.power(bins, item) / item\n \n # Return the scores\n return scores",
"objective": 0.06942,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "The new algorithm will score each bin based on its normalized remaining capacity and a weighted inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized remaining capacity for each bin\n norm_remaining = (bins - item) / bins\n \n # Calculate the weighted inverse of the index for each bin\n weighted_inverse = 1 / (np.arange(len(bins)) + 1)\n \n # Combine the two scores using element-wise multiplication\n scores = norm_remaining * weighted_inverse\n \n return scores",
"objective": 0.07989,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_10.json
================================================
[
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score as the product of the inverse of the rest capacity and a term that is exponentially proportional to the bin's index and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * item)\n \n # Calculate the score\n scores = inv_rest_capacity * exp_term\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the bin's index and the inverse of the item's size\n prod_index_inv_size = np.arange(len(bins)) * (1 / item)\n \n # Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size\n scores = inv_rest_capacity + prod_index_inv_size\n \n # Return the scores\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin proportional to the reciprocal of its rest capacity, multiplied by a term that decays rapidly with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity for each bin\n reciprocal_rest_capacity = 1 / (bins - item)\n \n # Calculate the decay term for each bin\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The score for each bin is computed as the product of a bin preference factor, inversely proportional to the bin's index, and a bin capacity factor, inversely proportional to the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the bin preference factor\n pref_factor = 1 / (np.arange(len(bins)) + 1)\n \n # Compute the bin capacity factor\n cap_factor = 1 / (bins - item)\n \n # Compute the score for each bin\n scores = pref_factor * cap_factor\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The novel algorithm combines the inverse of the rest capacity with a logarithmic transformation of the bin's index and then scales it by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a logarithmic transformation to the bin's index\n log_index = np.log(np.arange(len(bins)))\n \n # Scale the logarithmic transformation by the item size\n scaled_log_index = log_index * item\n \n # Combine the inverse of the rest capacity and the scaled logarithmic transformation\n scores = inv_rest_capacity + scaled_log_index\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the inverse of its rest capacity and the inverse of the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the inverse of the sum of the index and the item size\n inv_sum = 1 / (np.arange(len(bins)) + item)\n \n # Multiply the two inverse quantities to get the score for each bin\n scores = inv_rest_capacity * inv_sum\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the square of the inverse of its rest capacity divided by the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.square(np.divide(1, bins)) / (np.sum(bins) + item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The score is calculated as the product of the bin's index weighted by the inverse of its rest capacity and an exponentially increasing term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponentially increasing term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term\n \n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_11.json
================================================
[
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score as the product of the inverse of the rest capacity and a term that is exponentially proportional to the bin's index and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * item)\n \n # Calculate the score\n scores = inv_rest_capacity * exp_term\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the bin's index and the inverse of the item's size\n prod_index_inv_size = np.arange(len(bins)) * (1 / item)\n \n # Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size\n scores = inv_rest_capacity + prod_index_inv_size\n \n # Return the scores\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin proportional to the reciprocal of its rest capacity, multiplied by a term that decays rapidly with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity for each bin\n reciprocal_rest_capacity = 1 / (bins - item)\n \n # Calculate the decay term for each bin\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The score for each bin is computed as the product of a bin preference factor, inversely proportional to the bin's index, and a bin capacity factor, inversely proportional to the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the bin preference factor\n pref_factor = 1 / (np.arange(len(bins)) + 1)\n \n # Compute the bin capacity factor\n cap_factor = 1 / (bins - item)\n \n # Compute the score for each bin\n scores = pref_factor * cap_factor\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The novel algorithm combines the inverse of the rest capacity with a logarithmic transformation of the bin's index and then scales it by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a logarithmic transformation to the bin's index\n log_index = np.log(np.arange(len(bins)))\n \n # Scale the logarithmic transformation by the item size\n scaled_log_index = log_index * item\n \n # Combine the inverse of the rest capacity and the scaled logarithmic transformation\n scores = inv_rest_capacity + scaled_log_index\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score for each bin based on the exponential decay function of its index and a weight inversely proportional to its rest capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its index and a weight inversely proportional to its rest capacity\n scores = np.exp(-np.arange(len(bins)) / (item + 1)) * (1 - bins / (item + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_12.json
================================================
[
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score as the product of the inverse of the rest capacity and a term that is exponentially proportional to the bin's index and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * item)\n \n # Calculate the score\n scores = inv_rest_capacity * exp_term\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the bin's index and the inverse of the item's size\n prod_index_inv_size = np.arange(len(bins)) * (1 / item)\n \n # Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size\n scores = inv_rest_capacity + prod_index_inv_size\n \n # Return the scores\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score of each bin is calculated by multiplying the inverse of the bin's rest capacity by an exponentially decaying function of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponentially decaying function of the bin's index\n exp_decay = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the two arrays element-wise\n scores = inv_rest_capacity * exp_decay\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The score for each bin is computed as the product of a bin preference factor, inversely proportional to the bin's index, and a bin capacity factor, inversely proportional to the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the bin preference factor\n pref_factor = 1 / (np.arange(len(bins)) + 1)\n \n # Compute the bin capacity factor\n cap_factor = 1 / (bins - item)\n \n # Compute the score for each bin\n scores = pref_factor * cap_factor\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The novel algorithm combines the inverse of the rest capacity with a logarithmic transformation of the bin's index and then scales it by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a logarithmic transformation to the bin's index\n log_index = np.log(np.arange(len(bins)))\n \n # Scale the logarithmic transformation by the item size\n scaled_log_index = log_index * item\n \n # Combine the inverse of the rest capacity and the scaled logarithmic transformation\n scores = inv_rest_capacity + scaled_log_index\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score for each bin based on the exponential decay function of its index and a weight inversely proportional to its rest capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its index and a weight inversely proportional to its rest capacity\n scores = np.exp(-np.arange(len(bins)) / (item + 1)) * (1 - bins / (item + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_13.json
================================================
[
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score as the product of the inverse of the rest capacity and a term that is exponentially proportional to the bin's index and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * item)\n \n # Calculate the score\n scores = inv_rest_capacity * exp_term\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the bin's index and the inverse of the item's size\n prod_index_inv_size = np.arange(len(bins)) * (1 / item)\n \n # Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size\n scores = inv_rest_capacity + prod_index_inv_size\n \n # Return the scores\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score of each bin is calculated by multiplying the inverse of the bin's rest capacity by an exponentially decaying function of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponentially decaying function of the bin's index\n exp_decay = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the two arrays element-wise\n scores = inv_rest_capacity * exp_decay\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The score for each bin is computed as the product of a bin preference factor, inversely proportional to the bin's index, and a bin capacity factor, inversely proportional to the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the bin preference factor\n pref_factor = 1 / (np.arange(len(bins)) + 1)\n \n # Compute the bin capacity factor\n cap_factor = 1 / (bins - item)\n \n # Compute the score for each bin\n scores = pref_factor * cap_factor\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index cubed.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index cubed\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 3)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score for each bin based on the exponential decay function of its index and a weight inversely proportional to its rest capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its index and a weight inversely proportional to its rest capacity\n scores = np.exp(-np.arange(len(bins)) / (item + 1)) * (1 - bins / (item + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03974,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_14.json
================================================
[
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score as the product of the inverse of the rest capacity and a term that is exponentially proportional to the bin's index and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * item)\n \n # Calculate the score\n scores = inv_rest_capacity * exp_term\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the bin's index and the inverse of the item's size\n prod_index_inv_size = np.arange(len(bins)) * (1 / item)\n \n # Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size\n scores = inv_rest_capacity + prod_index_inv_size\n \n # Return the scores\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score of each bin is calculated by multiplying the inverse of the bin's rest capacity by an exponentially decaying function of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponentially decaying function of the bin's index\n exp_decay = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the two arrays element-wise\n scores = inv_rest_capacity * exp_decay\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The score for each bin is computed as the product of a bin preference factor, inversely proportional to the bin's index, and a bin capacity factor, inversely proportional to the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the bin preference factor\n pref_factor = 1 / (np.arange(len(bins)) + 1)\n \n # Compute the bin capacity factor\n cap_factor = 1 / (bins - item)\n \n # Compute the score for each bin\n scores = pref_factor * cap_factor\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Prioritize bins with more remaining capacity and penalize bins closer to the item size using a Gaussian distribution function for the priority and a linear decay function for the penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the prioritization factor based on the remaining capacity\n prioritization_factor = np.exp(-(bins - item)**2 / (2 * (item + 1)**2))\n \n # Calculate the penalty factor based on the distance from the item size\n penalty_factor = np.abs(bins - item) / (item + 1)\n \n # Combine the prioritization and penalty factors to get the final score\n scores = prioritization_factor * (1 - penalty_factor)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index cubed.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index cubed\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 3)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_15.json
================================================
[
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: The score for each bin is directly proportional to the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, with an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_remaining_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover_space = bins - item\n \n # Calculate the final score for each bin\n scores = log_remaining_capacity * linear_term + potential_leftover_space\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score as the product of the inverse of the rest capacity and a term that is exponentially proportional to the bin's index and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * item)\n \n # Calculate the score\n scores = inv_rest_capacity * exp_term\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The score for each bin is directly proportional to the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_remaining_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential term based on the bin index\n exp_term = np.exp(np.arange(len(bins)))\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover_space = bins - item\n \n # Calculate the final score for each bin\n scores = log_remaining_capacity * exp_term + potential_leftover_space\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the bin's index and the inverse of the item's size\n prod_index_inv_size = np.arange(len(bins)) * (1 / item)\n \n # Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size\n scores = inv_rest_capacity + prod_index_inv_size\n \n # Return the scores\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score of each bin is calculated by multiplying the inverse of the bin's rest capacity by an exponentially decaying function of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponentially decaying function of the bin's index\n exp_decay = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the two arrays element-wise\n scores = inv_rest_capacity * exp_decay\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The score for each bin is computed as the product of a bin preference factor, inversely proportional to the bin's index, and a bin capacity factor, inversely proportional to the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the bin preference factor\n pref_factor = 1 / (np.arange(len(bins)) + 1)\n \n # Compute the bin capacity factor\n cap_factor = 1 / (bins - item)\n \n # Compute the score for each bin\n scores = pref_factor * cap_factor\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Compute the score of each bin as a combination of a bin preference factor, which is inversely proportional to the square root of the bin's index, and a bin capacity factor, which is computed as the square root of the inverse of the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the preference factor for each bin\n pref_factor = 1 / np.sqrt(np.arange(len(bins)) + 1)\n \n # Calculate the capacity factor for each bin\n cap_factor = np.sqrt(1 / (bins - item))\n \n # Combine the preference and capacity factors to get the overall score\n scores = pref_factor * cap_factor\n \n # Return the scores for the bins\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Prioritize bins with more remaining capacity and penalize bins closer to the item size using a Gaussian distribution function for the priority and a linear decay function for the penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the prioritization factor based on the remaining capacity\n prioritization_factor = np.exp(-(bins - item)**2 / (2 * (item + 1)**2))\n \n # Calculate the penalty factor based on the distance from the item size\n penalty_factor = np.abs(bins - item) / (item + 1)\n \n # Combine the prioritization and penalty factors to get the final score\n scores = prioritization_factor * (1 - penalty_factor)\n \n return scores",
"objective": 0.03914,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_16.json
================================================
[
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score as the product of the inverse of the rest capacity and a term that is exponentially proportional to the bin's index and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * item)\n \n # Calculate the score\n scores = inv_rest_capacity * exp_term\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases exponentially with increasing bin index, and an additional term that is proportional to the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_remaining_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential term based on the bin index\n exp_term = np.exp(np.arange(len(bins)))\n \n # Calculate the potential leftover space\n potential_leftover_space = bins - item\n \n # Calculate the score for each bin\n scores = log_remaining_capacity * exp_term + potential_leftover_space\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the bin's index and the inverse of the item's size\n prod_index_inv_size = np.arange(len(bins)) * (1 / item)\n \n # Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size\n scores = inv_rest_capacity + prod_index_inv_size\n \n # Return the scores\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score of each bin is calculated by multiplying the inverse of the bin's rest capacity by an exponentially decaying function of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponentially decaying function of the bin's index\n exp_decay = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the two arrays element-wise\n scores = inv_rest_capacity * exp_decay\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The score for each bin is computed as the product of a bin preference factor, inversely proportional to the bin's index, and a bin capacity factor, inversely proportional to the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the bin preference factor\n pref_factor = 1 / (np.arange(len(bins)) + 1)\n \n # Compute the bin capacity factor\n cap_factor = 1 / (bins - item)\n \n # Compute the score for each bin\n scores = pref_factor * cap_factor\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Compute the score of each bin as a combination of a bin preference factor, which is inversely proportional to the square root of the bin's index, and a bin capacity factor, which is computed as the square root of the inverse of the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the preference factor for each bin\n pref_factor = 1 / np.sqrt(np.arange(len(bins)) + 1)\n \n # Calculate the capacity factor for each bin\n cap_factor = np.sqrt(1 / (bins - item))\n \n # Combine the preference and capacity factors to get the overall score\n scores = pref_factor * cap_factor\n \n # Return the scores for the bins\n return scores",
"objective": 0.03904,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_17.json
================================================
[
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "A modified version of the provided algorithm that incorporates the item size as a factor to prioritize bins with sufficient remaining capacity and assigns a constant penalty to bins that are full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are full\n penalties = np.where(remaining_capacity == 0, 1, 0)\n \n # Prioritize bins with sufficient remaining capacity\n priorities = np.where(remaining_capacity >= item, 1, 0)\n \n # Combine the penalties and priorities into a single score\n scores = penalties + priorities\n \n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is inversely proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * inv_potential_leftover\n \n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins))) * 3\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases exponentially with increasing bin index, and an additional term that is proportional to the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_remaining_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential term based on the bin index\n exp_term = np.exp(np.arange(len(bins)))\n \n # Calculate the potential leftover space\n potential_leftover_space = bins - item\n \n # Calculate the score for each bin\n scores = log_remaining_capacity * exp_term + potential_leftover_space\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the bin's index and the inverse of the item's size\n prod_index_inv_size = np.arange(len(bins)) * (1 / item)\n \n # Sum the inverse of the bin's rest capacity and the product of the bin's index and the inverse of the item's size\n scores = inv_rest_capacity + prod_index_inv_size\n \n # Return the scores\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: The score of each bin is calculated by multiplying the inverse of the bin's rest capacity by an exponentially decaying function of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponentially decaying function of the bin's index\n exp_decay = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the two arrays element-wise\n scores = inv_rest_capacity * exp_decay\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_18.json
================================================
[
{
"algorithm": "Modified Algorithm: Assign a score to each bin based on the inverse of its rest capacity multiplied by a term that increases exponentially with increasing bin index; however, the inverse of the rest capacity is raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity ** exp_term\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin having the highest score calculated by dividing the square root of the inverse of the remaining capacity by the exponential of the bin's capacity multiplied by the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(bins * np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "A modified version of the provided algorithm that incorporates the item size as a factor to prioritize bins with sufficient remaining capacity and assigns a constant penalty to bins that are full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are full\n penalties = np.where(remaining_capacity == 0, 1, 0)\n \n # Prioritize bins with sufficient remaining capacity\n priorities = np.where(remaining_capacity >= item, 1, 0)\n \n # Combine the penalties and priorities into a single score\n scores = penalties + priorities\n \n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is inversely proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * inv_potential_leftover\n \n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Algorithm: A modified score function that penalizes bins that are nearly full and prioritizes bins with sufficient remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are nearly full (i.e., have less than 10% remaining capacity)\n penalty = np.where(remaining_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins with sufficient remaining capacity (i.e., have at least 50% remaining capacity)\n priority = np.where(remaining_capacity >= 0.5 * bins, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins))) * 3\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases exponentially with increasing bin index, and an additional term that is proportional to the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_remaining_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential term based on the bin index\n exp_term = np.exp(np.arange(len(bins)))\n \n # Calculate the potential leftover space\n potential_leftover_space = bins - item\n \n # Calculate the score for each bin\n scores = log_remaining_capacity * exp_term + potential_leftover_space\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_19.json
================================================
[
{
"algorithm": "Modified Algorithm: Assign a score to each bin based on the inverse of its rest capacity multiplied by a term that increases exponentially with increasing bin index; however, the inverse of the rest capacity is raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity ** exp_term\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin having the highest score calculated by dividing the square root of the inverse of the remaining capacity by the exponential of the bin's capacity multiplied by the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(bins * np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "A modified version of the provided algorithm that incorporates the item size as a factor to prioritize bins with sufficient remaining capacity and assigns a constant penalty to bins that are full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are full\n penalties = np.where(remaining_capacity == 0, 1, 0)\n \n # Prioritize bins with sufficient remaining capacity\n priorities = np.where(remaining_capacity >= item, 1, 0)\n \n # Combine the penalties and priorities into a single score\n scores = penalties + priorities\n \n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is inversely proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * inv_potential_leftover\n \n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Algorithm: A modified score function that penalizes bins that are nearly full and prioritizes bins with sufficient remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are nearly full (i.e., have less than 10% remaining capacity)\n penalty = np.where(remaining_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins with sufficient remaining capacity (i.e., have at least 50% remaining capacity)\n priority = np.where(remaining_capacity >= 0.5 * bins, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins))) * 3\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases exponentially with increasing bin index, and an additional term that is proportional to the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_remaining_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential term based on the bin index\n exp_term = np.exp(np.arange(len(bins)))\n \n # Calculate the potential leftover space\n potential_leftover_space = bins - item\n \n # Calculate the score for each bin\n scores = log_remaining_capacity * exp_term + potential_leftover_space\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_2.json
================================================
[
{
"algorithm": "The novel score function is a product of the inverse of the ratio between the rest capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the rest capacity of a bin and the item size\n inv_ratios = 1 / (bins - item)\n \n # Calculate the exponential weight based on the bin index\n weights = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the inverse ratios and weights to get the final scores\n scores = inv_ratios * weights\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The score of each bin is calculated as the product of the inverse of its rest capacity and a weight that is inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the weight for each bin based on its index\n weight = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * weight\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score based on the exponential of the difference between the item size and bin capacity, multiplied by the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = 1 / (bin - item) + 1 / (i + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The score is calculated as the product of the bin\u2019s rest capacity and exponential decay function of the bin\u2019s index, divided by the distance between the item size and the bin\u2019s size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Calculate the exponential decay function of the bin's index\n decay_function = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Calculate the score for each bin\n scores = rest_capacity * decay_function / (item - bins)\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate the bin scores by multiplying the rest capacity by the squared inverse of the bin's index, and then dividing by the sum of the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = np.multiply(bins, 1 / (np.square(np.arange(len(bins)) + 1)))\n \n # Normalize the scores\n scores = scores / np.sum(scores)\n \n # Return the scores\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new scoring function will calculate the score for each bin by multiplying the rest capacity with the inverse of the bin's index to prioritize bins with more rest capacity and smaller indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.multiply(bins, 1 / (np.arange(len(bins)) + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New Algorithm: Modify the score by adding the inverse of the bin's index to the product of the rest capacity and the inverse of its index to promote bins with higher rest capacities and smaller indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's index\n inv_index = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the product of the rest capacity and the inverse of its index\n prod = bins * inv_index\n \n # Add the inverse of the bin's index to the product\n scores = prod + inv_index\n \n # Return the scores\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins farther from the item size using a Gaussian distribution function for the priority and a linear decay function for the penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the prioritization factor based on the remaining capacity of the bins\n prioritization_factor = np.exp(-np.square(bins - item) / (2 * np.square(item)))\n \n # Calculate the penalty factor based on the distance between the item size and the bin sizes\n penalty_factor = np.abs(bins - item)\n \n # Combine the prioritization and penalty factors to get the final score\n scores = prioritization_factor * (1 - penalty_factor)\n \n return scores",
"objective": 0.04719,
"other_inf": null
},
{
"algorithm": "The score function will be calculated based on the rest capacity of bins by penalizing bins with less remaining capacity and prioritizing bins closer to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacity\n diff = np.abs(item - bins)\n \n # Penalize bins with less remaining capacity\n penalty = np.maximum(0, (diff / bins))\n \n # Prioritize bins closer to the item size\n priority = np.exp(-np.square(diff))\n \n # Combine the penalty and priority scores\n scores = penalty * priority\n \n return scores",
"objective": 0.04749,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the rest capacity, using a weighted average of the inverse of the bin number and the square of the rest capacity, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the rest capacity\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (1 / (bin - item + 1)) * (bin ** 2)\n return scores",
"objective": 0.05353,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm prioritizes bins with less remaining capacity and penalizes bins closer to the item size, using an exponential decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the penalty for each bin based on its distance from the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Calculate the priority of each bin based on its remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Combine the penalty and priority to get the final score for each bin\n scores = penalty * priority\n \n return scores",
"objective": 0.05514,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_20.json
================================================
[
{
"algorithm": "Modified Algorithm: Assign a score to each bin based on the inverse of its rest capacity multiplied by a term that increases exponentially with increasing bin index; however, the inverse of the rest capacity is raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity ** exp_term\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin having the highest score calculated by dividing the square root of the inverse of the remaining capacity by the exponential of the bin's capacity multiplied by the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(bins * np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "A modified version of the provided algorithm that incorporates the item size as a factor to prioritize bins with sufficient remaining capacity and assigns a constant penalty to bins that are full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are full\n penalties = np.where(remaining_capacity == 0, 1, 0)\n \n # Prioritize bins with sufficient remaining capacity\n priorities = np.where(remaining_capacity >= item, 1, 0)\n \n # Combine the penalties and priorities into a single score\n scores = penalties + priorities\n \n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is inversely proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * inv_potential_leftover\n \n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Algorithm: A modified score function that penalizes bins that are nearly full and prioritizes bins with sufficient remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are nearly full (i.e., have less than 10% remaining capacity)\n penalty = np.where(remaining_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins with sufficient remaining capacity (i.e., have at least 50% remaining capacity)\n priority = np.where(remaining_capacity >= 0.5 * bins, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": " New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is inversely proportional to the potential leftover space. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (bins - item)\n \n # Combine the terms to get the final score\n scores = log_recip_capacity * linear_term * inv_potential_leftover\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins))) * 3\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases exponentially with increasing bin index, and an additional term that is proportional to the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_remaining_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential term based on the bin index\n exp_term = np.exp(np.arange(len(bins)))\n \n # Calculate the potential leftover space\n potential_leftover_space = bins - item\n \n # Calculate the score for each bin\n scores = log_remaining_capacity * exp_term + potential_leftover_space\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_21.json
================================================
[
{
"algorithm": "Modified Algorithm: Assign a score to each bin based on the inverse of its rest capacity multiplied by a term that increases exponentially with increasing bin index; however, the inverse of the rest capacity is raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity ** exp_term\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin having the highest score calculated by dividing the square root of the inverse of the remaining capacity by the exponential of the bin's capacity multiplied by the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(bins * np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "A modified version of the provided algorithm that incorporates the item size as a factor to prioritize bins with sufficient remaining capacity and assigns a constant penalty to bins that are full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are full\n penalties = np.where(remaining_capacity == 0, 1, 0)\n \n # Prioritize bins with sufficient remaining capacity\n priorities = np.where(remaining_capacity >= item, 1, 0)\n \n # Combine the penalties and priorities into a single score\n scores = penalties + priorities\n \n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is inversely proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * inv_potential_leftover\n \n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Algorithm: A modified score function that penalizes bins that are nearly full and prioritizes bins with sufficient remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are nearly full (i.e., have less than 10% remaining capacity)\n penalty = np.where(remaining_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins with sufficient remaining capacity (i.e., have at least 50% remaining capacity)\n priority = np.where(remaining_capacity >= 0.5 * bins, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": " New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is inversely proportional to the potential leftover space. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (bins - item)\n \n # Combine the terms to get the final score\n scores = log_recip_capacity * linear_term * inv_potential_leftover\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins))) * 3\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases exponentially with increasing bin index, and an additional term that is proportional to the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_remaining_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential term based on the bin index\n exp_term = np.exp(np.arange(len(bins)))\n \n # Calculate the potential leftover space\n potential_leftover_space = bins - item\n \n # Calculate the score for each bin\n scores = log_remaining_capacity * exp_term + potential_leftover_space\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, raised to the power of a parameter exponent, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_capacity = 1 / bins\n \n # Calculate the decay factor for each bin based on its index\n decay_factor = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space for each bin\n leftover_space = item - bins\n \n # Calculate the score for each bin\n scores = reciprocal_capacity * decay_factor * leftover_space\n \n return scores",
"objective": 0.03773,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_22.json
================================================
[
{
"algorithm": "Modified Algorithm: Assign a score to each bin based on the inverse of its rest capacity multiplied by a term that increases exponentially with increasing bin index; however, the inverse of the rest capacity is raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity ** exp_term\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin having the highest score calculated by dividing the square root of the inverse of the remaining capacity by the exponential of the bin's capacity multiplied by the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(bins * np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "A modified version of the provided algorithm that incorporates the item size as a factor to prioritize bins with sufficient remaining capacity and assigns a constant penalty to bins that are full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are full\n penalties = np.where(remaining_capacity == 0, 1, 0)\n \n # Prioritize bins with sufficient remaining capacity\n priorities = np.where(remaining_capacity >= item, 1, 0)\n \n # Combine the penalties and priorities into a single score\n scores = penalties + priorities\n \n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is inversely proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * inv_potential_leftover\n \n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Algorithm: A modified score function that penalizes bins that are nearly full and prioritizes bins with sufficient remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are nearly full (i.e., have less than 10% remaining capacity)\n penalty = np.where(remaining_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins with sufficient remaining capacity (i.e., have at least 50% remaining capacity)\n priority = np.where(remaining_capacity >= 0.5 * bins, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that is proportional to the reciprocal of the potential leftover space (item - bin), multiplied by the rest capacity with an additional term that increases exponentially with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * reciprocal_leftover * exp_term\n \n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": " New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is inversely proportional to the potential leftover space. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (bins - item)\n \n # Combine the terms to get the final score\n scores = log_recip_capacity * linear_term * inv_potential_leftover\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity, multiplied by a term that increases exponentially with increasing bin index, and an additional term that is inversely proportional to the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential term based on the bin index\n exp_term = np.exp(np.arange(len(bins)))\n \n # Calculate the inverse term based on the potential leftover space\n inv_term = 1 / (bins - item)\n \n # Combine the terms to get the final score\n scores = log_recip_capacity * exp_term * inv_term\n \n return scores",
"objective": 0.03552,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins))) * 3\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03602,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_23.json
================================================
[
{
"algorithm": "Modified Algorithm: Assign a score to each bin based on the inverse of its rest capacity multiplied by a term that increases exponentially with increasing bin index; however, the inverse of the rest capacity is raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity ** exp_term\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin as the product of the exponential of its rest capacity and the inverse of the item - bin, scaled by a term that increases exponentially with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score of each bin\n scores = np.exp(-bins) * (1 / (item - bins)) * np.exp(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin having the highest score calculated by dividing the square root of the inverse of the remaining capacity by the exponential of the bin's capacity multiplied by the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(bins * np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "A modified version of the provided algorithm that incorporates the item size as a factor to prioritize bins with sufficient remaining capacity and assigns a constant penalty to bins that are full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are full\n penalties = np.where(remaining_capacity == 0, 1, 0)\n \n # Prioritize bins with sufficient remaining capacity\n priorities = np.where(remaining_capacity >= item, 1, 0)\n \n # Combine the penalties and priorities into a single score\n scores = penalties + priorities\n \n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is inversely proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * inv_potential_leftover\n \n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Algorithm: A modified score function that penalizes bins that are nearly full and prioritizes bins with sufficient remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are nearly full (i.e., have less than 10% remaining capacity)\n penalty = np.where(remaining_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins with sufficient remaining capacity (i.e., have at least 50% remaining capacity)\n priority = np.where(remaining_capacity >= 0.5 * bins, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that decreases exponentially with the increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.02395,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that is proportional to the reciprocal of the potential leftover space (item - bin), multiplied by the rest capacity with an additional term that increases exponentially with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * reciprocal_leftover * exp_term\n \n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": " New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is inversely proportional to the potential leftover space. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (bins - item)\n \n # Combine the terms to get the final score\n scores = log_recip_capacity * linear_term * inv_potential_leftover\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that decreases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum score for each bin\n max_score = np.max(np.log(1 / (bins - item)))\n \n # Calculate the linear term that decreases with increasing bin index\n linear_term = np.arange(len(bins)) * (max_score - 1)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n leftover_space = bins - item\n \n # Calculate the final score for each bin\n scores = max_score + linear_term + leftover_space\n \n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity, multiplied by a term that increases exponentially with increasing bin index, and an additional term that is inversely proportional to the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential term based on the bin index\n exp_term = np.exp(np.arange(len(bins)))\n \n # Calculate the inverse term based on the potential leftover space\n inv_term = 1 / (bins - item)\n \n # Combine the terms to get the final score\n scores = log_recip_capacity * exp_term * inv_term\n \n return scores",
"objective": 0.03552,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_24.json
================================================
[
{
"algorithm": "Modified Algorithm: Assign a score to each bin based on the inverse of its rest capacity multiplied by a term that increases exponentially with increasing bin index; however, the inverse of the rest capacity is raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity ** exp_term\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Assign item to the bin with maximum score calculated by dividing the logarithmic inverse of the remaining bin capacity by the exponential of the bin capacity multiplied by bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic inverse of the remaining bin capacity\n log_inv_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential of the bin capacity multiplied by the bin index\n exp_bin_index = np.exp(bins * np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = log_inv_capacity / exp_bin_index\n \n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin as the product of the exponential of its rest capacity and the inverse of the item - bin, scaled by a term that increases exponentially with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score of each bin\n scores = np.exp(-bins) * (1 / (item - bins)) * np.exp(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the sum of the reciprocal root of the remaining capacity and a term proportional to the maximum potential leftover space, multiplied by a decreasing linear term with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the reciprocal root of the remaining capacity and a term proportional to the maximum potential leftover space\n scores = np.sum(np.reciprocal(np.sqrt(bins - item))) + np.max(bins) * (1 - np.reciprocal(np.sqrt(bins - item)))\n \n # Multiply by a decreasing linear term with increasing bin index\n scores *= np.linspace(1, 0, len(bins))\n \n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin having the highest score calculated by dividing the square root of the inverse of the remaining capacity by the exponential of the bin's capacity multiplied by the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(bins * np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "A modified version of the provided algorithm that incorporates the item size as a factor to prioritize bins with sufficient remaining capacity and assigns a constant penalty to bins that are full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are full\n penalties = np.where(remaining_capacity == 0, 1, 0)\n \n # Prioritize bins with sufficient remaining capacity\n priorities = np.where(remaining_capacity >= item, 1, 0)\n \n # Combine the penalties and priorities into a single score\n scores = penalties + priorities\n \n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is inversely proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * inv_potential_leftover\n \n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Algorithm: A modified score function that penalizes bins that are nearly full and prioritizes bins with sufficient remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are nearly full (i.e., have less than 10% remaining capacity)\n penalty = np.where(remaining_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins with sufficient remaining capacity (i.e., have at least 50% remaining capacity)\n priority = np.where(remaining_capacity >= 0.5 * bins, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that decreases exponentially with the increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.02395,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that is proportional to the reciprocal of the potential leftover space (item - bin), multiplied by the rest capacity with an additional term that increases exponentially with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * reciprocal_leftover * exp_term\n \n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": " New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is inversely proportional to the potential leftover space. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (bins - item)\n \n # Combine the terms to get the final score\n scores = log_recip_capacity * linear_term * inv_potential_leftover\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by multiplying the reciprocal of the difference between the item size and the bin size with a term that decays as a power function of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the item size and the bin size\n diff = 1 / (item - bins)\n \n # Calculate the decay term based on the bin index\n decay = np.power(0.5, np.arange(len(bins)))\n \n # Multiply the two terms together to get the final score\n scores = diff * decay\n \n return scores",
"objective": 0.03411,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_25.json
================================================
[
{
"algorithm": "Modified Algorithm: Assign a score to each bin based on the inverse of its rest capacity multiplied by a term that increases exponentially with increasing bin index; however, the inverse of the rest capacity is raised to the power of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity ** exp_term\n \n return scores",
"objective": 0.00654,
"other_inf": null
},
{
"algorithm": "Assign item to the bin with maximum score calculated by dividing the logarithmic inverse of the remaining bin capacity by the exponential of the bin capacity multiplied by bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic inverse of the remaining bin capacity\n log_inv_capacity = np.log(1 / (bins - item))\n \n # Calculate the exponential of the bin capacity multiplied by the bin index\n exp_bin_index = np.exp(bins * np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = log_inv_capacity / exp_bin_index\n \n return scores",
"objective": 0.00684,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is proportional to the potential leftover space if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the potential leftover space if the item is assigned to the bin\n potential_leftover = bins - item\n \n # Calculate the final score for each bin\n scores = log_recip_capacity * linear_term + potential_leftover\n \n return scores",
"objective": 0.00875,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the potential leftover space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * (bins - item))\n \n # Return the scores\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.00996,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin as the product of the exponential of its rest capacity and the inverse of the item - bin, scaled by a term that increases exponentially with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score of each bin\n scores = np.exp(-bins) * (1 / (item - bins)) * np.exp(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the sum of the reciprocal root of the remaining capacity and a term proportional to the maximum potential leftover space, multiplied by a decreasing linear term with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the reciprocal root of the remaining capacity and a term proportional to the maximum potential leftover space\n scores = np.sum(np.reciprocal(np.sqrt(bins - item))) + np.max(bins) * (1 - np.reciprocal(np.sqrt(bins - item)))\n \n # Multiply by a decreasing linear term with increasing bin index\n scores *= np.linspace(1, 0, len(bins))\n \n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin having the highest score calculated by dividing the square root of the inverse of the remaining capacity by the exponential of the bin's capacity multiplied by the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(bins * np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "A modified version of the provided algorithm that incorporates the item size as a factor to prioritize bins with sufficient remaining capacity and assigns a constant penalty to bins that are full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are full\n penalties = np.where(remaining_capacity == 0, 1, 0)\n \n # Prioritize bins with sufficient remaining capacity\n priorities = np.where(remaining_capacity >= item, 1, 0)\n \n # Combine the penalties and priorities into a single score\n scores = penalties + priorities\n \n return scores",
"objective": 0.0171,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin; however, the exponential term is multiplied by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the square root of the inverse of the remaining capacity and the exponential of the product of the bin index and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins - item)) * np.exp(np.arange(len(bins)) * item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is inversely proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (item - bins + 1)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * exp_term * inv_potential_leftover\n \n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Algorithm: A modified score function that penalizes bins that are nearly full and prioritizes bins with sufficient remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Penalize bins that are nearly full (i.e., have less than 10% remaining capacity)\n penalty = np.where(remaining_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins with sufficient remaining capacity (i.e., have at least 50% remaining capacity)\n priority = np.where(remaining_capacity >= 0.5 * bins, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.02143,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin based on the product of the sum of the inverse of its rest capacity and a term that decreases exponentially with increasing bin index, with an additional term that is proportional to the reciprocal of the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * reciprocal_leftover\n \n return scores",
"objective": 0.02395,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign a score to each bin based on the sum of the inverse of its rest capacity and a term that is proportional to the reciprocal of the potential leftover space (item - bin), multiplied by the rest capacity with an additional term that increases exponentially with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the reciprocal of the potential leftover space\n reciprocal_leftover = 1 / (item - bins)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * 0.5)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * reciprocal_leftover * exp_term\n \n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm adds a random noise ranging from 0 to 0.5 to the inverse ratio between the remaining capacity of a bin and the item size, then multiplied by the same weight function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse ratio between the remaining capacity of a bin and the item size\n inv_ratios = 1 / (bins - item)\n \n # Add a random noise ranging from 0 to 0.5 to the inverse ratio\n noisy_inv_ratios = inv_ratios + np.random.uniform(0, 0.5, size=bins.shape)\n \n # Multiply the noisy inverse ratios by the same weight function\n weights = np.ones(bins.shape) * 0.5\n scores = noisy_inv_ratios * weights\n \n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": " New algorithm: Assign an item to the bin with the maximum score of the logarithm of the reciprocal of the remaining capacity multiplied by a term that increases linearly with increasing bin index, and an additional term that is inversely proportional to the potential leftover space. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithm of the reciprocal of the remaining capacity\n log_recip_capacity = np.log(1 / (bins - item))\n \n # Calculate the linear term that increases with increasing bin index\n linear_term = np.arange(len(bins)) + 1\n \n # Calculate the inverse of the potential leftover space\n inv_potential_leftover = 1 / (bins - item)\n \n # Combine the terms to get the final score\n scores = log_recip_capacity * linear_term * inv_potential_leftover\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_3.json
================================================
[
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The novel score function is a product of the inverse of the ratio between the rest capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the rest capacity of a bin and the item size\n inv_ratios = 1 / (bins - item)\n \n # Calculate the exponential weight based on the bin index\n weights = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the inverse ratios and weights to get the final scores\n scores = inv_ratios * weights\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The score of each bin is calculated as the product of the inverse of its rest capacity and a weight that is inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the weight for each bin based on its index\n weight = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * weight\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: The score for each bin is calculated as the square root of the inverse of its rest capacity multiplied by the square of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins + 1)) * np.square(1 / (item + 1))\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = 1 / (bin - item) + 1 / (i + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "{ The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.2 times the weight of the previous bin. }",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the remaining capacity of a bin and the item size\n inv_ratios = np.divide(np.ones(len(bins)), np.subtract(bins, item))\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.2, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(inv_ratios, weights)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The score is calculated as the product of the bin\u2019s rest capacity and exponential decay function of the bin\u2019s index, divided by the distance between the item size and the bin\u2019s size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Calculate the exponential decay function of the bin's index\n decay_function = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Calculate the score for each bin\n scores = rest_capacity * decay_function / (item - bins)\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate the bin scores by multiplying the rest capacity by the squared inverse of the bin's index, and then dividing by the sum of the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = np.multiply(bins, 1 / (np.square(np.arange(len(bins)) + 1)))\n \n # Normalize the scores\n scores = scores / np.sum(scores)\n \n # Return the scores\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new scoring function will calculate the score for each bin by multiplying the rest capacity with the inverse of the bin's index to prioritize bins with more rest capacity and smaller indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.multiply(bins, 1 / (np.arange(len(bins)) + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New Algorithm: Modify the score by adding the inverse of the bin's index to the product of the rest capacity and the inverse of its index to promote bins with higher rest capacities and smaller indices.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's index\n inv_index = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the product of the rest capacity and the inverse of its index\n prod = bins * inv_index\n \n # Add the inverse of the bin's index to the product\n scores = prod + inv_index\n \n # Return the scores\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins farther from the item size using a Gaussian distribution function for the priority and a linear decay function for the penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the prioritization factor based on the remaining capacity of the bins\n prioritization_factor = np.exp(-np.square(bins - item) / (2 * np.square(item)))\n \n # Calculate the penalty factor based on the distance between the item size and the bin sizes\n penalty_factor = np.abs(bins - item)\n \n # Combine the prioritization and penalty factors to get the final score\n scores = prioritization_factor * (1 - penalty_factor)\n \n return scores",
"objective": 0.04719,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_4.json
================================================
[
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The novel score function is a product of the inverse of the ratio between the rest capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the rest capacity of a bin and the item size\n inv_ratios = 1 / (bins - item)\n \n # Calculate the exponential weight based on the bin index\n weights = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the inverse ratios and weights to get the final scores\n scores = inv_ratios * weights\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Modified Algorithm: The score for each bin is calculated as the product of the inverse of its index multiplied by the inverse of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the index and rest capacity for each bin\n inv_index = 1 / (np.arange(len(bins)) + 1)\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the score for each bin\n scores = inv_index * inv_rest_capacity\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the inverse of its rest capacity and the inverse of the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the inverse of the sum of the index and the item size\n inv_sum = 1 / (np.arange(len(bins)) + item)\n \n # Multiply the two inverse quantities to get the score for each bin\n scores = inv_rest_capacity * inv_sum\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: The score for each bin is calculated as the square root of the inverse of the sum of the square of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins + item))\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = 1 / (bin - item) + 1 / (i + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "{ The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.2 times the weight of the previous bin. }",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the remaining capacity of a bin and the item size\n inv_ratios = np.divide(np.ones(len(bins)), np.subtract(bins, item))\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.2, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(inv_ratios, weights)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The score is calculated as the product of the bin\u2019s rest capacity and exponential decay function of the bin\u2019s index, divided by the distance between the item size and the bin\u2019s size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Calculate the exponential decay function of the bin's index\n decay_function = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Calculate the score for each bin\n scores = rest_capacity * decay_function / (item - bins)\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by multiplying the remaining capacity by the inverse of the item size and adding the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.multiply(bins - item, 1 / (item + 1)) + np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate the bin scores by multiplying the rest capacity by the squared inverse of the bin's index, and then dividing by the sum of the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = np.multiply(bins, 1 / (np.square(np.arange(len(bins)) + 1)))\n \n # Normalize the scores\n scores = scores / np.sum(scores)\n \n # Return the scores\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin by multiplying the remaining capacity by the inverse of the item size and subtracting the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.multiply(bins - item, 1 / (item + 1)) - np.arange(len(bins))\n return scores",
"objective": 0.04296,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_5.json
================================================
[
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The novel score function is a product of the inverse of the ratio between the rest capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the rest capacity of a bin and the item size\n inv_ratios = 1 / (bins - item)\n \n # Calculate the exponential weight based on the bin index\n weights = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the inverse ratios and weights to get the final scores\n scores = inv_ratios * weights\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Modified Algorithm: The score for each bin is calculated as the product of the inverse of its index multiplied by the inverse of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the index and rest capacity for each bin\n inv_index = 1 / (np.arange(len(bins)) + 1)\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the score for each bin\n scores = inv_index * inv_rest_capacity\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The novel algorithm combines the inverse of the rest capacity with a logarithmic transformation of the bin's index and then scales it by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a logarithmic transformation to the bin's index\n log_index = np.log(np.arange(len(bins)))\n \n # Scale the logarithmic transformation by the item size\n scaled_log_index = log_index * item\n \n # Combine the inverse of the rest capacity and the scaled logarithmic transformation\n scores = inv_rest_capacity + scaled_log_index\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the inverse of its rest capacity and the inverse of the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the inverse of the sum of the index and the item size\n inv_sum = 1 / (np.arange(len(bins)) + item)\n \n # Multiply the two inverse quantities to get the score for each bin\n scores = inv_rest_capacity * inv_sum\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: The score for each bin is calculated as the square root of the inverse of the sum of the square of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(1 / (bins + item))\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = 1 / (bin - item) + 1 / (i + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "{ The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.2 times the weight of the previous bin. }",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the remaining capacity of a bin and the item size\n inv_ratios = np.divide(np.ones(len(bins)), np.subtract(bins, item))\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.2, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(inv_ratios, weights)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The score is calculated as the product of the bin\u2019s rest capacity and exponential decay function of the bin\u2019s index, divided by the distance between the item size and the bin\u2019s size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Calculate the exponential decay function of the bin's index\n decay_function = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Calculate the score for each bin\n scores = rest_capacity * decay_function / (item - bins)\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the sum of a linear function of the bin's size and a logarithmic function of the rest capacity, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the linear function of the bin's size\n linear_function = np.sum(bins) / (np.max(bins) - np.min(bins))\n \n # Calculate the logarithmic function of the rest capacity\n logarithmic_function = np.log(bins / np.max(bins))\n \n # Calculate the score for each bin\n scores = (linear_function + logarithmic_function) / (item - np.min(bins))\n \n # Return the scores for the bins\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by multiplying the remaining capacity by the inverse of the item size and adding the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.multiply(bins - item, 1 / (item + 1)) + np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin as the ratio of its residual capacity to its distance from the item size, and apply random sampling to break ties.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.divide(bins - item, bins)\n \n # Apply random sampling to break ties\n scores = np.random.permutation(scores)\n \n # Return the scores\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_6.json
================================================
[
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The novel score function is a product of the inverse of the ratio between the rest capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the rest capacity of a bin and the item size\n inv_ratios = 1 / (bins - item)\n \n # Calculate the exponential weight based on the bin index\n weights = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the inverse ratios and weights to get the final scores\n scores = inv_ratios * weights\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Modified Algorithm: The score for each bin is calculated as the product of the inverse of its index multiplied by the inverse of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the index and rest capacity for each bin\n inv_index = 1 / (np.arange(len(bins)) + 1)\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the score for each bin\n scores = inv_index * inv_rest_capacity\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The novel algorithm combines the inverse of the rest capacity with a logarithmic transformation of the bin's index and then scales it by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a logarithmic transformation to the bin's index\n log_index = np.log(np.arange(len(bins)))\n \n # Scale the logarithmic transformation by the item size\n scaled_log_index = log_index * item\n \n # Combine the inverse of the rest capacity and the scaled logarithmic transformation\n scores = inv_rest_capacity + scaled_log_index\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the inverse of its rest capacity and the inverse of the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the inverse of the sum of the index and the item size\n inv_sum = 1 / (np.arange(len(bins)) + item)\n \n # Multiply the two inverse quantities to get the score for each bin\n scores = inv_rest_capacity * inv_sum\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the square of the inverse of its rest capacity divided by the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.square(np.divide(1, bins)) / (np.sum(bins) + item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = 1 / (bin - item) + 1 / (i + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "{ The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.2 times the weight of the previous bin. }",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the remaining capacity of a bin and the item size\n inv_ratios = np.divide(np.ones(len(bins)), np.subtract(bins, item))\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.2, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(inv_ratios, weights)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score for each bin as the inverse of the product of its rest capacity and the sum of its index and the item size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.divide(1, np.multiply(bins, np.add(np.arange(len(bins)), item)))\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": " Algorithm description: { The new algorithm uses a score function that is the sum of the inverse of the ratio between the remaining capacity of a bin and the item size, multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.1 times the weight of the previous bin. } ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the ratio between the remaining capacity of a bin and the item size\n ratios = np.divide(bins, item)\n inv_ratios = np.reciprocal(ratios)\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.1, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(inv_ratios, weights)\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the sum of a linear function of the bin's size and a logarithmic function of the rest capacity, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the linear function of the bin's size\n linear_function = np.sum(bins) / (np.max(bins) - np.min(bins))\n \n # Calculate the logarithmic function of the rest capacity\n logarithmic_function = np.log(bins / np.max(bins))\n \n # Calculate the score for each bin\n scores = (linear_function + logarithmic_function) / (item - np.min(bins))\n \n # Return the scores for the bins\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by multiplying the remaining capacity by the inverse of the item size and adding the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.multiply(bins - item, 1 / (item + 1)) + np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_7.json
================================================
[
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin proportional to the reciprocal of its rest capacity, multiplied by a term that decays rapidly with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity for each bin\n reciprocal_rest_capacity = 1 / (bins - item)\n \n # Calculate the decay term for each bin\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Modified Algorithm: The score for each bin is calculated as the product of the inverse of its index multiplied by the inverse of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the index and rest capacity for each bin\n inv_index = 1 / (np.arange(len(bins)) + 1)\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the score for each bin\n scores = inv_index * inv_rest_capacity\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The novel algorithm combines the inverse of the rest capacity with a logarithmic transformation of the bin's index and then scales it by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a logarithmic transformation to the bin's index\n log_index = np.log(np.arange(len(bins)))\n \n # Scale the logarithmic transformation by the item size\n scaled_log_index = log_index * item\n \n # Combine the inverse of the rest capacity and the scaled logarithmic transformation\n scores = inv_rest_capacity + scaled_log_index\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the inverse of its rest capacity and the inverse of the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the inverse of the sum of the index and the item size\n inv_sum = 1 / (np.arange(len(bins)) + item)\n \n # Multiply the two inverse quantities to get the score for each bin\n scores = inv_rest_capacity * inv_sum\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the square of the inverse of its rest capacity divided by the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.square(np.divide(1, bins)) / (np.sum(bins) + item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = 1 / (bin - item) + 1 / (i + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " The new algorithm calculates score as the sum of the reciprocals of the differences between the bin's remaining and maximum capacities and the item size, multiplied by a weight that is exponentially proportional to the bin index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin's remaining and maximum capacities\n diff = bins - item\n \n # Calculate the reciprocal of the difference\n recip = 1 / (diff + 1)\n \n # Calculate the exponential weight based on the bin index\n weight = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the reciprocal and weight arrays element-wise\n scores = recip * weight\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The score function is calculated by subtracting the bin index from the difference between the maximum capacity and the rest capacity of the bin, multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the maximum capacity and the rest capacity of each bin\n diff = np.maximum(0, bins - item)\n \n # Calculate the score for each bin\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if diff[i] > 0:\n scores[i] = (diff[i] - bins[i]) * item\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score for each bin as the inverse of the product of its rest capacity and the sum of its index and the item size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.divide(1, np.multiply(bins, np.add(np.arange(len(bins)), item)))\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_8.json
================================================
[
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin proportional to the reciprocal of its rest capacity, multiplied by a term that decays rapidly with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity for each bin\n reciprocal_rest_capacity = 1 / (bins - item)\n \n # Calculate the decay term for each bin\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Modified Algorithm: The score for each bin is calculated as the product of the inverse of its index multiplied by the inverse of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the index and rest capacity for each bin\n inv_index = 1 / (np.arange(len(bins)) + 1)\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the score for each bin\n scores = inv_index * inv_rest_capacity\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The novel algorithm combines the inverse of the rest capacity with a logarithmic transformation of the bin's index and then scales it by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a logarithmic transformation to the bin's index\n log_index = np.log(np.arange(len(bins)))\n \n # Scale the logarithmic transformation by the item size\n scaled_log_index = log_index * item\n \n # Combine the inverse of the rest capacity and the scaled logarithmic transformation\n scores = inv_rest_capacity + scaled_log_index\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the inverse of its rest capacity and the inverse of the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the inverse of the sum of the index and the item size\n inv_sum = 1 / (np.arange(len(bins)) + item)\n \n # Multiply the two inverse quantities to get the score for each bin\n scores = inv_rest_capacity * inv_sum\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the square of the inverse of its rest capacity divided by the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.square(np.divide(1, bins)) / (np.sum(bins) + item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = 1 / (bin - item) + 1 / (i + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " The new algorithm calculates score as the sum of the reciprocals of the differences between the bin's remaining and maximum capacities and the item size, multiplied by a weight that is exponentially proportional to the bin index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin's remaining and maximum capacities\n diff = bins - item\n \n # Calculate the reciprocal of the difference\n recip = 1 / (diff + 1)\n \n # Calculate the exponential weight based on the bin index\n weight = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the reciprocal and weight arrays element-wise\n scores = recip * weight\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The score function is calculated by subtracting the bin index from the difference between the maximum capacity and the rest capacity of the bin, multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the maximum capacity and the rest capacity of each bin\n diff = np.maximum(0, bins - item)\n \n # Calculate the score for each bin\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if diff[i] > 0:\n scores[i] = (diff[i] - bins[i]) * item\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score for each bin as the inverse of the product of its rest capacity and the sum of its index and the item size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.divide(1, np.multiply(bins, np.add(np.arange(len(bins)), item)))\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run1/population_generation_9.json
================================================
[
{
"algorithm": "Assign a score to each bin based on the product of the inverse of its rest capacity and a term that increases exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential term\n exp_term = np.exp(np.arange(len(bins)) * np.log(inv_rest_capacity))\n \n # Calculate the potential leftover space for each bin\n potential_leftover = item - bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * exp_term * potential_leftover\n \n return scores",
"objective": 0.00694,
"other_inf": null
},
{
"algorithm": "Prioritize bins by remaining space and penalized by distance from the item size using a Guassian distribution function.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining space in each bin\n remaining_space = bins - item\n \n # Penalize bins that are already full\n penalties = np.where(remaining_space <= 0, 1e9, 0)\n \n # Calculate the Gaussian distribution function for each bin\n gaussian_dist = np.exp(-((remaining_space - item) ** 2) / (2 * (item ** 2)))\n \n # Combine the penalties and Gaussian distribution functions\n scores = penalties + gaussian_dist\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": " New algorithm: The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 2 and the weight of each subsequent bin is 1.3 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.3, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": " The new algorithm uses a score function that is the product of the inverse of the ratio between the remaining capacity of a bin and the item size multiplied by a weight that is exponentially proportional to the bin index, where the weight for the first bin is 3 and the weight of each subsequent bin is 1.5 times the weight of the previous bin. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the ratio between the remaining capacity and the item size\n ratio = remaining_capacity / item\n \n # Calculate the weight for each bin based on its index\n weights = np.power(1.5, np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = np.multiply(ratio, weights)\n \n # Return the scores\n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "The novel algorithm multiplies the inverse of the bin's rest capacity by the power function of the bin's size weighted by its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin's rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the power function of the bin's size weighted by its index\n power_function = np.power(bins, np.arange(len(bins)))\n \n # Multiply the inverse of the bin's rest capacity by the power function\n scores = inv_rest_capacity * power_function\n \n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score based on the product of the exponential of the difference between the item size and bin capacity and the penalty for distance from the optimal item size\n scores = np.exp(-np.abs(item - bins)) * (1 - np.abs(item - bins) / item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to each bin based on the reciprocal of its rest capacity, multiplied by a term that decays exponentially with increasing bin index, with an additional term that is proportional to the potential leftover space (item - bin) if the item is assigned to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity of each bin\n reciprocal_rest_capacity = 1 / (bins + 1)\n \n # Calculate the exponential decay term\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the potential leftover space if the item is assigned to each bin\n potential_leftover_space = item - bins\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term * potential_leftover_space\n \n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Assign a score to each bin proportional to the reciprocal of its rest capacity, multiplied by a term that decays rapidly with increasing bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the rest capacity for each bin\n reciprocal_rest_capacity = 1 / (bins - item)\n \n # Calculate the decay term for each bin\n decay_term = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Calculate the final score for each bin\n scores = reciprocal_rest_capacity * decay_term\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index squared\n scores = np.exp(-bins / (item + 1)) * (1 - (bins / (item + 1)) ** 2)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The score for each bin is computed as the product of a bin preference factor, inversely proportional to the bin's index, and a bin capacity factor, inversely proportional to the difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the bin preference factor\n pref_factor = 1 / (np.arange(len(bins)) + 1)\n \n # Compute the bin capacity factor\n cap_factor = 1 / (bins - item)\n \n # Compute the score for each bin\n scores = pref_factor * cap_factor\n \n # Return the scores\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the exponential decay function of its rest capacity and a weight inversely proportional to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the exponential decay function\n # of its rest capacity and a weight inversely proportional to its index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = np.exp(-weights * (bins - item))\n \n # Remove bins that are at full capacity\n scores[bins == bins.max()] = 0\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the combination of the inverse of its rest capacity and the square root of the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the square root of the inverse of the index for each bin\n sqrt_inv_index = np.sqrt(1 / (np.arange(len(bins)) + 1))\n \n # Combine the two scores using element-wise multiplication\n scores = inv_rest_capacity * sqrt_inv_index\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the bin's size, divided by the difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Calculate the exponential decay function of the bin's size\n decay_function = np.exp(-np.log(rest_capacity))\n \n # Calculate the score for each bin\n scores = decay_function * rest_capacity / (item - rest_capacity + 1)\n \n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less remaining capacity and penalize bins closer to the item size using a linear decay function for the penalty and a Gaussian distribution function for the priority.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with less remaining capacity\n priority = np.exp(-remaining_capacity)\n \n # Penalize bins closer to the item size\n penalty = np.exp(-np.abs(remaining_capacity - item))\n \n # Combine the priority and penalty to get the final score\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "The novel algorithm combines the inverse of the rest capacity with a logarithmic transformation of the bin's index and then scales it by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a logarithmic transformation to the bin's index\n log_index = np.log(np.arange(len(bins)))\n \n # Scale the logarithmic transformation by the item size\n scaled_log_index = log_index * item\n \n # Combine the inverse of the rest capacity and the scaled logarithmic transformation\n scores = inv_rest_capacity + scaled_log_index\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the inverse of its rest capacity and the inverse of the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the inverse of the sum of the index and the item size\n inv_sum = 1 / (np.arange(len(bins)) + item)\n \n # Multiply the two inverse quantities to get the score for each bin\n scores = inv_rest_capacity * inv_sum\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the square of the inverse of its rest capacity divided by the sum of its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.square(np.divide(1, bins)) / (np.sum(bins) + item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Score is calculated as the product of the bin's rest capacity and exponential decay function of the item size, divided by the difference between the bin's size and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Calculate the exponential decay function of the item size\n decay_function = np.exp(-item / (np.max(bins) + 1))\n \n # Calculate the score for each bin\n scores = rest_capacity * decay_function / (bins - item)\n \n # Return the scores\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the sum of the inverse of its rest capacity and the inverse of its index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = 1 / (bin - item) + 1 / (i + 1)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " The new algorithm calculates score as the sum of the reciprocals of the differences between the bin's remaining and maximum capacities and the item size, multiplied by a weight that is exponentially proportional to the bin index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin's remaining and maximum capacities\n diff = bins - item\n \n # Calculate the reciprocal of the difference\n recip = 1 / (diff + 1)\n \n # Calculate the exponential weight based on the bin index\n weight = np.exp(-np.arange(len(bins)) * 0.5)\n \n # Multiply the reciprocal and weight arrays element-wise\n scores = recip * weight\n \n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_1.json
================================================
[
{
"algorithm": "Calculate the score for each bin based on the ratio of the item size to the bin's rest capacity, and the more full a bin is, the higher the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the ratio of the item size to the bin's rest capacity\n scores = np.divide(item, bins)\n \n # The more full a bin is, the higher the score\n scores[np.where(bins == bins.max())] = 0\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the ratio of item size to each bin's rest capacity, then if the ratio is larger than or equal to 0.5, square the ratio; otherwise, set the score to -1 if the bin is full or 0 if the bin is not full to maximize the score of the bins that can take the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of item size to each bin's rest capacity\n ratios = item / bins\n \n # Set the score to -1 if the bin is full or 0 if the bin is not full\n scores = np.where(ratios >= 0.5, np.square(ratios), -1)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores for each bin based on the ratio of the remaining capacity to the total usable capacity, prioritizing bins with higher remaining capacities to maximize space utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of remaining capacity to total usable capacity for each bin\n ratios = (bins - item) / bins\n \n # Prioritize bins with higher remaining capacities\n scores = np.argsort(-ratios)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins based on the ratio of the available capacity to the item size, favoring bins with capacities closely matching the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of available capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Favor bins with capacities closely matching the item size\n scores = np.where(ratios < 0.5, 1, 0)\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04427,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the bin scores as the weighted sum of the normalized remaining capacity, and the difference between the rest capacity of the bin and the item size, with a penalty added for using a new bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the remaining capacity of each bin\n norm_remaining = (bins - item) / bins\n \n # Calculate the difference between the rest capacity and the item size\n diff = bins - item\n \n # Add a penalty for using a new bin\n penalty = np.where(diff > 0, 1, 0)\n \n # Weighted sum of the normalized remaining capacity and the difference\n scores = np.dot(norm_remaining, diff) + penalty\n \n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "My new algorithm is to calculate a score for each bin based on its rest capacity and its index, with higher rest capacity and a lower index receiving a higher score as follows: score = (rest capacity - 2 * index), returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on its rest capacity and index\n scores = np.zeros(len(bins))\n for i, bin_capacity in enumerate(bins):\n if bin_capacity >= item:\n scores[i] = (bin_capacity - 2 * i)\n \n # Return the scores for assignment\n return scores",
"objective": 0.07878,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio of the remaining capacity to the maximum capacity, weighted by the inverse of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of remaining capacity to maximum capacity for each bin\n ratios = (bins - item) / bins\n \n # Weight the ratios by the inverse of the bin number\n weights = 1 / np.arange(1, len(bins) + 1)\n \n # Calculate the score for each bin\n scores = ratios * weights\n \n return scores",
"objective": 0.07989,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "Relate the item size to the bin's capacity and promote bins with larger capacity and sufficient available capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the bin capacity\n ratios = np.divide(item, bins)\n \n # Promote bins with larger capacity and sufficient available capacity\n scores = np.where(ratios > 0.5, 1 - ratios, 0)\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.10635,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the ratio of item size to bin rest capacity, with an exponential decay factor added in.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the ratio of item size to bin rest capacity\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / bin\n else:\n scores[i] = 0\n \n # Add an exponential decay factor to the scores\n decay_factor = 0.95\n scores *= decay_factor ** (np.arange(len(bins)) + 1)\n \n return scores",
"objective": 0.13321,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_10.json
================================================
[
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Algorithm prioritizing bins with less than 10% free capacity and penalizing bins that have more than 60% of the item's capacity while decreasing the penalty term to zero for bins with less than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Decrease the penalty term to zero for bins with less than 30% free capacity\n penalty = np.where(free_capacity < 0.3 * bins, 0, penalty)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have more than 50% of their capacity and giving a larger penalty to bins that have less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Prioritize bins with more than 50% capacity\n priority_mask = (available_capacity > bins * 0.5)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 10% free capacity\n penalization_mask = (available_capacity < bins * 0.1)\n penalization_score = np.where(penalization_mask, 1, 0)\n \n # Combine the priority and penalization scores\n scores = priority_score + penalization_score\n \n return scores",
"objective": 0.02193,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum free capacity, penalized if the free capacity is at least 50% of the bin, and increase the score if the free capacity is at most 10%.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with free capacity at least 50% of the bin\n penalty = np.where(free_capacity >= 0.5 * bins, 1, 0)\n \n # Increase the score for bins with free capacity at most 10%\n bonus = np.where(free_capacity <= 0.1 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.02203,
"other_inf": null
},
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity, but only if the bin's capacity exceeds twice the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n # Normalize the scores to ensure they are between 0 and 1\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.03441,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizing bins with less than 20% free capacity and penalizing bins that have more than 30% of the item's capacity while decreasing the penalty term to zero for bins with less than 40% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins that have more than 30% of the item's capacity\n penalty = np.where(free_capacity > 0.3 * item, 1, 0)\n \n # Decrease the penalty term to zero for bins with less than 40% free capacity\n penalty = np.where(free_capacity < 0.4 * bins, 0, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Algorithm for minimizing the number of used bins: Prioritize bins that can fit the item leaving less than 20% free capacity, and penalize bins that leave more than 40% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 20% free capacity\n priority_bins = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins that leave more than 40% free capacity\n penalty_bins = np.where(free_capacity > 0.4 * bins, 1, 0)\n \n # Combine the prioritization and penalization scores\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.03582,
"other_inf": null
},
{
"algorithm": "Prioritize bins that can fit the item leaving less than 20% free capacity, and penalizing bins that leave more than 40% free capacity based on the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 20% free capacity\n priority_mask = (free_capacity < 0.2 * bins) & (free_capacity >= 0)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins that leave more than 40% free capacity based on the item size\n penalty_mask = (free_capacity > 0.4 * bins) & (free_capacity <= 0.6 * bins)\n penalty_scores = np.where(penalty_mask, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with minimum free capacity, penalized if the free capacity is at least 25% of the bin, and increase the score if the free capacity is at most 5%",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with free capacity at least 25% of the bin\n penalty = np.where(free_capacity >= 0.25 * bins, 1, 0)\n \n # Increase the score for bins with free capacity at most 5%\n bonus = np.where(free_capacity <= 0.05 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.03622,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 25% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.25 * bins, 1 + (0.25 - free_capacity / bins), 0)\n scores = np.where(free_capacity > 0.75 * bins, 1 - (free_capacity - 0.75 * bins) / bins, scores)\n \n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": " Penalize bins with more than 20% excessive capacity and reward bins with more than 65% of their capacity, considering the item's size and the average capacity utilization of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Penalize bins with more than 20% excess capacity\n penalized_bins = np.where(percent_excess > 20, 0, 1)\n \n # Reward bins with more than 65% of their capacity\n rewarded_bins = np.where(percent_excess > 65, 1, 0)\n \n # Combine the penalties and rewards\n scores = penalized_bins + rewarded_bins\n \n return scores",
"objective": 0.03652,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalizing bins with more than 15% excessive capacity and rewarding bins with more than 75% of their capacity, considering the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Reward bins with more than 75% of their capacity\n rewards = np.where(percent_excess > 75, 1, 0)\n \n # Penalize bins with more than 15% excess capacity\n penalties = np.where(percent_excess > 15, -1, 0)\n \n # Combine rewards and penalties to get the final score\n scores = rewards + penalties\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": " Prioritize bins that can fit the item leaving less than 30% free capacity, penalized bins that have more than 30% free capacity, and assign a small bonus to bins that leave less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 30% free capacity\n penalty = np.where(free_capacity > (bins * 0.3), 0, (bins * 0.3) - free_capacity)\n \n # Bonus for bins with less than 10% free capacity\n bonus = np.where(free_capacity < (bins * 0.1), (bins * 0.1) - free_capacity, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Algorithm with a score function that penalizes bins with less than 25% capacity, gives priority to bins with less than 15% capacity, and doubles the penalty for bins with less than 5% capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of capacity remaining in each bin\n percent_remaining = (bins - item) / bins\n \n # Penalize bins with less than 25% capacity\n penalties = np.where(percent_remaining < 0.25, 1, 0)\n \n # Give priority to bins with less than 15% capacity\n priorities = np.where(percent_remaining < 0.15, 2, 1)\n \n # Double the penalty for bins with less than 5% capacity\n double_penalty = np.where(percent_remaining < 0.05, 4, 1)\n \n # Calculate the total score for each bin\n scores = penalties * priorities * double_penalty\n \n return scores",
"objective": 0.03833,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_11.json
================================================
[
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Algorithm prioritizing bins with less than 10% free capacity and penalizing bins that have more than 60% of the item's capacity while decreasing the penalty term to zero for bins with less than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Decrease the penalty term to zero for bins with less than 30% free capacity\n penalty = np.where(free_capacity < 0.3 * bins, 0, penalty)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have more than 50% of their capacity and giving a larger penalty to bins that have less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Prioritize bins with more than 50% capacity\n priority_mask = (available_capacity > bins * 0.5)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 10% free capacity\n penalization_mask = (available_capacity < bins * 0.1)\n penalization_score = np.where(penalization_mask, 1, 0)\n \n # Combine the priority and penalization scores\n scores = priority_score + penalization_score\n \n return scores",
"objective": 0.02193,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum free capacity, penalized if the free capacity is at least 50% of the bin, and increase the score if the free capacity is at most 10%.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with free capacity at least 50% of the bin\n penalty = np.where(free_capacity >= 0.5 * bins, 1, 0)\n \n # Increase the score for bins with free capacity at most 10%\n bonus = np.where(free_capacity <= 0.1 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.02203,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have a certain amount of free space, and penalize bins that have either a very small or a very large amount of free space",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with a certain amount of free space\n priority = np.where(free_space >= 0.5 * bins, 1, 0)\n \n # Penalize bins with a very small or very large amount of free space\n penalty = np.where((free_space < 0.1 * bins) | (free_space > 0.9 * bins), 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with minimum free capacity, penalized if the free capacity is higher than 15%, and increase the score if the free capacity is at most 2%.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Penalize bins with high free capacity\n penalty = np.where(free_capacity > 15, 1, 0)\n \n # Increase the score for bins with low free capacity\n bonus = np.where(free_capacity <= 2, 1, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": "The modified algorithm calculates a score for each bin based on the ratio of its free capacity to the item size, penalizing bins with less than 25% capacity and prioritizing bins with more than 50% capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of free capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Penalize bins with less than 25% capacity\n penalties = np.where(ratios < 0.25, 100, 0)\n \n # Prioritize bins with more than 50% capacity\n bonuses = np.where(ratios > 0.5, 100, 0)\n \n # Combine penalties and bonuses into a single score\n scores = penalties + bonuses\n \n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity, but only if the bin's capacity exceeds twice the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n # Normalize the scores to ensure they are between 0 and 1\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.03441,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizing bins with less than 20% free capacity and penalizing bins that have more than 30% of the item's capacity while decreasing the penalty term to zero for bins with less than 40% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins that have more than 30% of the item's capacity\n penalty = np.where(free_capacity > 0.3 * item, 1, 0)\n \n # Decrease the penalty term to zero for bins with less than 40% free capacity\n penalty = np.where(free_capacity < 0.4 * bins, 0, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Algorithm for minimizing the number of used bins: Prioritize bins that can fit the item leaving less than 20% free capacity, and penalize bins that leave more than 40% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 20% free capacity\n priority_bins = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins that leave more than 40% free capacity\n penalty_bins = np.where(free_capacity > 0.4 * bins, 1, 0)\n \n # Combine the prioritization and penalization scores\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.03582,
"other_inf": null
},
{
"algorithm": "Prioritize bins that can fit the item leaving less than 20% free capacity, and penalizing bins that leave more than 40% free capacity based on the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 20% free capacity\n priority_mask = (free_capacity < 0.2 * bins) & (free_capacity >= 0)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins that leave more than 40% free capacity based on the item size\n penalty_mask = (free_capacity > 0.4 * bins) & (free_capacity <= 0.6 * bins)\n penalty_scores = np.where(penalty_mask, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with minimum free capacity, penalized if the free capacity is at least 25% of the bin, and increase the score if the free capacity is at most 5%",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with free capacity at least 25% of the bin\n penalty = np.where(free_capacity >= 0.25 * bins, 1, 0)\n \n # Increase the score for bins with free capacity at most 5%\n bonus = np.where(free_capacity <= 0.05 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.03622,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 25% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.25 * bins, 1 + (0.25 - free_capacity / bins), 0)\n scores = np.where(free_capacity > 0.75 * bins, 1 - (free_capacity - 0.75 * bins) / bins, scores)\n \n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": " Penalize bins with more than 20% excessive capacity and reward bins with more than 65% of their capacity, considering the item's size and the average capacity utilization of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Penalize bins with more than 20% excess capacity\n penalized_bins = np.where(percent_excess > 20, 0, 1)\n \n # Reward bins with more than 65% of their capacity\n rewarded_bins = np.where(percent_excess > 65, 1, 0)\n \n # Combine the penalties and rewards\n scores = penalized_bins + rewarded_bins\n \n return scores",
"objective": 0.03652,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_12.json
================================================
[
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Algorithm prioritizing bins with less than 10% free capacity and penalizing bins that have more than 60% of the item's capacity while decreasing the penalty term to zero for bins with less than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Decrease the penalty term to zero for bins with less than 30% free capacity\n penalty = np.where(free_capacity < 0.3 * bins, 0, penalty)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 10% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 90% of the item's capacity\n penalty = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01952,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have more than 50% of their capacity and giving a larger penalty to bins that have less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Prioritize bins with more than 50% capacity\n priority_mask = (available_capacity > bins * 0.5)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 10% free capacity\n penalization_mask = (available_capacity < bins * 0.1)\n penalization_score = np.where(penalization_mask, 1, 0)\n \n # Combine the priority and penalization scores\n scores = priority_score + penalization_score\n \n return scores",
"objective": 0.02193,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum free capacity, penalized if the free capacity is at least 50% of the bin, and increase the score if the free capacity is at most 10%.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with free capacity at least 50% of the bin\n penalty = np.where(free_capacity >= 0.5 * bins, 1, 0)\n \n # Increase the score for bins with free capacity at most 10%\n bonus = np.where(free_capacity <= 0.1 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.02203,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have a certain amount of free space, and penalize bins that have either a very small or a very large amount of free space",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with a certain amount of free space\n priority = np.where(free_space >= 0.5 * bins, 1, 0)\n \n # Penalize bins with a very small or very large amount of free space\n penalty = np.where((free_space < 0.1 * bins) | (free_space > 0.9 * bins), 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "The algorithm prioritizes bins that have less than 15% free capacity but have a greater capacity than the given item and penalizes bins that have less than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 15% free capacity\n priority_mask = (free_capacity < 0.15 * bins) & (bins > item)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 30% free capacity\n penalty_mask = (free_capacity < 0.3 * bins) & (bins > item)\n penalty_scores = np.where(penalty_mask, -1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.02525,
"other_inf": null
},
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with minimum free capacity, penalized if the free capacity is higher than 15%, and increase the score if the free capacity is at most 2%.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Penalize bins with high free capacity\n penalty = np.where(free_capacity > 15, 1, 0)\n \n # Increase the score for bins with low free capacity\n bonus = np.where(free_capacity <= 2, 1, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.0324,
"other_inf": null
},
{
"algorithm": "The modified algorithm calculates a score for each bin based on the ratio of its free capacity to the item size, penalizing bins with less than 25% capacity and prioritizing bins with more than 50% capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of free capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Penalize bins with less than 25% capacity\n penalties = np.where(ratios < 0.25, 100, 0)\n \n # Prioritize bins with more than 50% capacity\n bonuses = np.where(ratios > 0.5, 100, 0)\n \n # Combine penalties and bonuses into a single score\n scores = penalties + bonuses\n \n return scores",
"objective": 0.0334,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity, but only if the bin's capacity exceeds twice the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n # Normalize the scores to ensure they are between 0 and 1\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.03441,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "Prioritize bins that can fit the item leaving less than 5% free capacity, and penalize bins that leave more than 25% free capacity by adding the product of the capacities fulfilling the above conditions.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 5% free capacity\n priority_bins = np.where(free_capacity < (0.05 * bins), 1, 0)\n \n # Penalize bins that leave more than 25% free capacity\n penalty_bins = np.where(free_capacity > (0.25 * bins), 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.03572,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_13.json
================================================
[
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and exponentially increase the priority term; penalize bins that are over 50% full and quadratically increase the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that are over 50% full\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0) ** 2\n \n # Combine the priority and penalty terms\n scores = priority_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with a free capacity of less than 10% and penalizing those with over 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with a free capacity of less than 10%\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 10% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 90% of the item's capacity\n penalty = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01952,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have more than 50% of their capacity and giving a larger penalty to bins that have less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Prioritize bins with more than 50% capacity\n priority_mask = (available_capacity > bins * 0.5)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 10% free capacity\n penalization_mask = (available_capacity < bins * 0.1)\n penalization_score = np.where(penalization_mask, 1, 0)\n \n # Combine the priority and penalization scores\n scores = priority_score + penalization_score\n \n return scores",
"objective": 0.02193,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum free capacity, penalized if the free capacity is at least 50% of the bin, and increase the score if the free capacity is at most 10%.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with free capacity at least 50% of the bin\n penalty = np.where(free_capacity >= 0.5 * bins, 1, 0)\n \n # Increase the score for bins with free capacity at most 10%\n bonus = np.where(free_capacity <= 0.1 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.02203,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have a certain amount of free space, and penalize bins that have either a very small or a very large amount of free space",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with a certain amount of free space\n priority = np.where(free_space >= 0.5 * bins, 1, 0)\n \n # Penalize bins with a very small or very large amount of free space\n penalty = np.where((free_space < 0.1 * bins) | (free_space > 0.9 * bins), 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "The algorithm prioritizes bins that have less than 15% free capacity but have a greater capacity than the given item and penalizes bins that have less than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 15% free capacity\n priority_mask = (free_capacity < 0.15 * bins) & (bins > item)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 30% free capacity\n penalty_mask = (free_capacity < 0.3 * bins) & (bins > item)\n penalty_scores = np.where(penalty_mask, -1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.02525,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins that have less than 10% free capacity, penalizes those with more than 80% of the item's capacity, and increases the score by 0.5 if the bin's capacity is greater than the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 80% of the item's capacity\n penalty = np.where(free_capacity > 0.8 * item, 1, 0)\n \n # Increase the score by 0.5 if the bin's capacity is greater than the item's capacity\n bonus = np.where(bins > item, 0.5, 0)\n \n # Calculate the final score for each bin\n scores = priority + penalty + bonus\n \n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "Algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 15% free capacity\n priority = np.where(free_capacity < 0.15 * bins, 1, 0)\n \n # Penalize bins that have more than 70% of the item's capacity\n penalty = np.where(free_capacity > 0.7 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.02757,
"other_inf": null
},
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_14.json
================================================
[
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and exponentially increase the priority term; penalize bins that are over 50% full and quadratically increase the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that are over 50% full\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0) ** 2\n \n # Combine the priority and penalty terms\n scores = priority_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with less than 10% free capacity and prioritizes bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins that have more than 50% of the item's capacity\n bonus = np.where(free_capacity > 0.5 * item, 2, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with a free capacity of less than 10% and penalizing those with over 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with a free capacity of less than 10%\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 10% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 90% of the item's capacity\n penalty = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01952,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have more than 50% of their capacity and giving a larger penalty to bins that have less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Prioritize bins with more than 50% capacity\n priority_mask = (available_capacity > bins * 0.5)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 10% free capacity\n penalization_mask = (available_capacity < bins * 0.1)\n penalization_score = np.where(penalization_mask, 1, 0)\n \n # Combine the priority and penalization scores\n scores = priority_score + penalization_score\n \n return scores",
"objective": 0.02193,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum free capacity, penalized if the free capacity is at least 50% of the bin, and increase the score if the free capacity is at most 10%.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with free capacity at least 50% of the bin\n penalty = np.where(free_capacity >= 0.5 * bins, 1, 0)\n \n # Increase the score for bins with free capacity at most 10%\n bonus = np.where(free_capacity <= 0.1 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.02203,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have a certain amount of free space, and penalize bins that have either a very small or a very large amount of free space",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with a certain amount of free space\n priority = np.where(free_space >= 0.5 * bins, 1, 0)\n \n # Penalize bins with a very small or very large amount of free space\n penalty = np.where((free_space < 0.1 * bins) | (free_space > 0.9 * bins), 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02274,
"other_inf": null
},
{
"algorithm": "The algorithm prioritizes bins that have less than 15% free capacity but have a greater capacity than the given item and penalizes bins that have less than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 15% free capacity\n priority_mask = (free_capacity < 0.15 * bins) & (bins > item)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 30% free capacity\n penalty_mask = (free_capacity < 0.3 * bins) & (bins > item)\n penalty_scores = np.where(penalty_mask, -1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.02525,
"other_inf": null
},
{
"algorithm": " Prioritize bins that can fit the item with less than 20% free capacity and penalize bins with less than 10% free capacity, while penalizing bins with more than 50% of the item's capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * item, 10, 0)\n \n # Prioritize bins with less than 20% free capacity\n bonus = np.where(free_capacity < 0.2 * item, 10, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty += np.where(free_capacity > 0.5 * item, 10, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.02596,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_15.json
================================================
[
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and exponentially increase the priority term; penalize bins that are over 50% full and quadratically increase the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that are over 50% full\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0) ** 2\n \n # Combine the priority and penalty terms\n scores = priority_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with less than 10% free capacity and prioritizes bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins that have more than 50% of the item's capacity\n bonus = np.where(free_capacity > 0.5 * item, 2, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 70% of the item's capacity by applying a non-linear penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 70% of the item's capacity\n penalty = np.where(free_capacity > 0.7 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with a free capacity of less than 10% and penalizing those with over 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with a free capacity of less than 10%\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have a free capacity of less than 10% while decreasing the penalty term, and penalizing bins that have more than 75% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority_mask = (free_capacity < 0.1 * bins)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with more than 75% of the item's capacity\n excess_capacity = np.maximum(0, free_capacity - 0.75 * item)\n excess_penalty = np.where(excess_capacity > 0, 1, 0)\n \n # Combine the priority and excess penalty scores\n scores = priority_score + excess_penalty\n \n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 10% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 90% of the item's capacity\n penalty = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01952,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with less than 2% free space and penalize bins that have more than 60% of the item's free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 2% free space\n priority = np.where(free_space < 0.02 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's free space\n penalty = np.where(free_space > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have more than 50% of their capacity and giving a larger penalty to bins that have less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Prioritize bins with more than 50% capacity\n priority_mask = (available_capacity > bins * 0.5)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 10% free capacity\n penalization_mask = (available_capacity < bins * 0.1)\n penalization_score = np.where(penalization_mask, 1, 0)\n \n # Combine the priority and penalization scores\n scores = priority_score + penalization_score\n \n return scores",
"objective": 0.02193,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_16.json
================================================
[
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while reducing the priority term, and penalizing bins that have more than 60% of the item's capacity with the square of the free capacity value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n prioritized_bins = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalized_bins = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (prioritized_bins + penalized_bins) / 2\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and exponentially increase the priority term; penalize bins that are over 50% full and quadratically increase the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that are over 50% full\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0) ** 2\n \n # Combine the priority and penalty terms\n scores = priority_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with less than 10% free capacity and prioritizes bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins that have more than 50% of the item's capacity\n bonus = np.where(free_capacity > 0.5 * item, 2, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 70% of the item's capacity by applying a non-linear penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 70% of the item's capacity\n penalty = np.where(free_capacity > 0.7 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with a free capacity of less than 10% and penalizing those with over 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with a free capacity of less than 10%\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have a free capacity of less than 10% while decreasing the penalty term, and penalizing bins that have more than 75% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority_mask = (free_capacity < 0.1 * bins)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with more than 75% of the item's capacity\n excess_capacity = np.maximum(0, free_capacity - 0.75 * item)\n excess_penalty = np.where(excess_capacity > 0, 1, 0)\n \n # Combine the priority and excess penalty scores\n scores = priority_score + excess_penalty\n \n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 10% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 90% of the item's capacity\n penalty = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01952,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with less than 2% free space and penalize bins that have more than 60% of the item's free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 2% free space\n priority = np.where(free_space < 0.02 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's free space\n penalty = np.where(free_space > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_17.json
================================================
[
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while reducing the priority term, and penalizing bins that have more than 60% of the item's capacity with the square of the free capacity value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n prioritized_bins = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalized_bins = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (prioritized_bins + penalized_bins) / 2\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm that penalizes bins with less than 5% free capacity and prioritizes bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 5% free capacity\n penalty = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Prioritize bins with more than 90% of the item's capacity\n priority = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01399,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and exponentially increase the priority term; penalize bins that are over 50% full and quadratically increase the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that are over 50% full\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0) ** 2\n \n # Combine the priority and penalty terms\n scores = priority_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity with different priority and penalty terms based on the bin's free capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with less than 10% free capacity and prioritizes bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins that have more than 50% of the item's capacity\n bonus = np.where(free_capacity > 0.5 * item, 2, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 70% of the item's capacity by applying a non-linear penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 70% of the item's capacity\n penalty = np.where(free_capacity > 0.7 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, penalize bins that can fit the item without leaving any free capacity, and exponentially increase the priority as the remaining capacity increases.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n prioritized_bins = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalized_bins = np.where(free_capacity == 0, -1, 0)\n \n # Exponentially increase the priority as the remaining capacity increases\n exponential_priority = np.exp(-np.log(free_capacity))\n \n # Combine the prioritization, penalization, and exponential priority\n scores = prioritized_bins + penalized_bins + exponential_priority\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with a free capacity of less than 10% and penalizing those with over 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with a free capacity of less than 10%\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have a free capacity of less than 10% while decreasing the penalty term, and penalizing bins that have more than 75% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority_mask = (free_capacity < 0.1 * bins)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with more than 75% of the item's capacity\n excess_capacity = np.maximum(0, free_capacity - 0.75 * item)\n excess_penalty = np.where(excess_capacity > 0, 1, 0)\n \n # Combine the priority and excess penalty scores\n scores = priority_score + excess_penalty\n \n return scores",
"objective": 0.01922,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_18.json
================================================
[
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while reducing the priority term, and penalizing bins that have more than 60% of the item's capacity with the square of the free capacity value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n prioritized_bins = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalized_bins = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (prioritized_bins + penalized_bins) / 2\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm that penalizes bins with less than 5% free capacity and prioritizes bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 5% free capacity\n penalty = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Prioritize bins with more than 90% of the item's capacity\n priority = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01399,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and exponentially increase the priority term; penalize bins that are over 50% full and quadratically increase the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that are over 50% full\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0) ** 2\n \n # Combine the priority and penalty terms\n scores = priority_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity with different priority and penalty terms based on the bin's free capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with less than 10% free capacity and prioritizes bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins that have more than 50% of the item's capacity\n bonus = np.where(free_capacity > 0.5 * item, 2, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 70% of the item's capacity by applying a non-linear penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 70% of the item's capacity\n penalty = np.where(free_capacity > 0.7 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 10% free capacity and penalize bins that have more than 70% of the item's capacity with different constants based on the bin's free capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority_mask = (free_capacity < 0.1 * bins)\n priority_score = np.where(priority_mask, 10, 0)\n \n # Penalize bins with more than 70% of the item's capacity\n penalty_mask = (free_capacity > 0.7 * item)\n penalty_score = np.where(penalty_mask, 5, 0)\n \n # Combine the priority and penalty scores\n scores = priority_score + penalty_score\n \n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, penalize bins that can fit the item without leaving any free capacity, and exponentially increase the priority as the remaining capacity increases.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n prioritized_bins = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalized_bins = np.where(free_capacity == 0, -1, 0)\n \n # Exponentially increase the priority as the remaining capacity increases\n exponential_priority = np.exp(-np.log(free_capacity))\n \n # Combine the prioritization, penalization, and exponential priority\n scores = prioritized_bins + penalized_bins + exponential_priority\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with a free capacity of less than 10% and penalizing those with over 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with a free capacity of less than 10%\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01881,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_19.json
================================================
[
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 85% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 85% of the item's capacity\n penalty = np.where(free_capacity > (0.85 * item), 1, 0)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < (0.03 * item), 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while reducing the priority term, and penalizing bins that have more than 60% of the item's capacity with the square of the free capacity value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n prioritized_bins = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalized_bins = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (prioritized_bins + penalized_bins) / 2\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm that penalizes bins with less than 5% free capacity and prioritizes bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 5% free capacity\n penalty = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Prioritize bins with more than 90% of the item's capacity\n priority = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01399,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: prioritization term (1), penalty term (1), free capacity thresholds (0.05, 0.5). New algorithm: Prioritizes bins with less than 2.5% free capacity, penalizes bins with more than 25% of the item's capacity, and uses different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the prioritization term\n prioritization_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Calculate the penalty term\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = prioritization_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize bins that have more than 80% of the item's capacity with the square of the free capacity value while increasing the priority term of bins that have less than 2% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the penalty for bins with more than 80% of the item's capacity\n penalty = np.square(np.clip(free_capacity / (0.8 * item), 0, 1))\n \n # Calculate the priority term for bins with less than 2% free capacity\n priority = np.clip(1 - (free_capacity / (0.02 * item)), 0, 1)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty + priority\n \n return scores",
"objective": 0.0168,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity with different priority and penalty terms based on the bin's free capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with less than 10% free capacity and prioritizes bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins that have more than 50% of the item's capacity\n bonus = np.where(free_capacity > 0.5 * item, 2, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 70% of the item's capacity by applying a non-linear penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 70% of the item's capacity\n penalty = np.where(free_capacity > 0.7 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 10% free capacity and penalize bins that have more than 70% of the item's capacity with different constants based on the bin's free capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority_mask = (free_capacity < 0.1 * bins)\n priority_score = np.where(priority_mask, 10, 0)\n \n # Penalize bins with more than 70% of the item's capacity\n penalty_mask = (free_capacity > 0.7 * item)\n penalty_score = np.where(penalty_mask, 5, 0)\n \n # Combine the priority and penalty scores\n scores = priority_score + penalty_score\n \n return scores",
"objective": 0.01851,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, penalize bins that can fit the item without leaving any free capacity, and exponentially increase the priority as the remaining capacity increases.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n prioritized_bins = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalized_bins = np.where(free_capacity == 0, -1, 0)\n \n # Exponentially increase the priority as the remaining capacity increases\n exponential_priority = np.exp(-np.log(free_capacity))\n \n # Combine the prioritization, penalization, and exponential priority\n scores = prioritized_bins + penalized_bins + exponential_priority\n \n return scores",
"objective": 0.01861,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_2.json
================================================
[
{
"algorithm": "Assign the score of each bin using a sigmoid function involving the ratio of the item size to the bin's rest capacity, with a higher score for bins closer to being full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the bin's rest capacity\n ratios = item / (bins - item)\n \n # Apply the sigmoid function to the ratios\n scores = 1 / (1 + np.exp(-ratios))\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "For each bin, calculate its ratio of rest capacity to item size; if greater than 1, the score is 0, otherwise, the score is the inverse of the ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Set the score for each bin based on the ratio\n scores = np.where(ratios > 1, 0, 1 / ratios)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores for each bin based on the ratio of the remaining capacity to the total usable capacity, prioritizing bins with higher remaining capacities to maximize space utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of remaining capacity to total usable capacity for each bin\n ratios = (bins - item) / bins\n \n # Prioritize bins with higher remaining capacities\n scores = np.argsort(-ratios)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size, down from 0.5 to 0.25.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold for each bin\n thresholds = np.maximum(diff / (item + 1), 0.25)\n \n # Calculate the scores for each bin\n scores = np.exp(-thresholds)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Prioritize bins with sufficient capacity and penalize bins with excessive capacity, while considering the item's size to favor bins with capacities closest to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Prioritize bins with sufficient capacity\n priority_mask = (diff <= 0.5 * item)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with excessive capacity\n penalty_mask = (diff > 0.5 * item) & (diff < 1.5 * item)\n penalty_scores = np.where(penalty_mask, 0.5, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n # Normalize the scores to ensure they sum to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins based on the ratio of the available capacity to the item size, favoring bins with capacities closely matching the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of available capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Favor bins with capacities closely matching the item size\n scores = np.where(ratios < 0.5, 1, 0)\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04427,
"other_inf": null
},
{
"algorithm": "New Algorithm: Adjust the priority and penalty thresholds to prioritize bins with smaller capacity differences, especially when the item size is small.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Prioritize bins with smaller capacity differences\n priority = np.argsort(diff)\n \n # Penalize bins with large capacity differences\n penalty = np.exp(-np.square(diff))\n \n # Combine the priority and penalty scores\n scores = priority * penalty\n \n return scores",
"objective": 0.04618,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate scores by dividing each bin's rest capacity by the maximum between the difference between its capacity and the item size and 1, excluding bins at max capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.divide(bins - item, np.maximum(bins - item, 1))\n \n # Exclude bins at maximum capacity\n scores[np.where(bins == bins.max())] = 0\n \n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the ratio of each bin's rest capacity to the item size, then if the ratio is less than or equal to 0.5, square the ratio; otherwise, set the score to -1 if the bin is full or 0 if the bin is not full to maximize the score of the bins that can take the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of each bin's rest capacity to the item size\n ratios = (bins / item)\n \n # Square the ratio if it is less than or equal to 0.5\n ratios[ratios <= 0.5] **= 2\n \n # Set the score to -1 if the bin is full or 0 if the bin is not full\n scores = np.where(bins == item, -1, 0)\n \n # Return the scores\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity and a bonus for bins with minimum capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the remaining capacity\n scores = np.zeros(len(bins))\n for i, bin_capacity in enumerate(bins):\n if bin_capacity >= item:\n scores[i] = (bin_capacity - item) / (bin_capacity + 1)\n else:\n scores[i] = 0\n \n # Penalize bins with maximum capacity\n max_capacity = np.max(bins)\n scores -= (max_capacity - bins) / (max_capacity + 1)\n \n # Bonus for bins with minimum capacity\n min_capacity = np.min(bins)\n scores += (min_capacity - bins) / (min_capacity + 1)\n \n return scores",
"objective": 0.06771,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "Prioritize bins with available capacity exceeding a threshold, while considering the item's size to favor bins with capacities closest to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Prioritize bins with available capacity exceeding a threshold\n threshold = 0.5 * item\n mask = (diff <= threshold).astype(int)\n \n # Favor bins with capacities closest to the item size\n scores = np.where(mask, diff, 0)\n \n return scores",
"objective": 0.07184,
"other_inf": null
},
{
"algorithm": "My new algorithm is to calculate a score for each bin based on its rest capacity and its index, with higher rest capacity and a lower index receiving a higher score as follows: score = (rest capacity - 2 * index), returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on its rest capacity and index\n scores = np.zeros(len(bins))\n for i, bin_capacity in enumerate(bins):\n if bin_capacity >= item:\n scores[i] = (bin_capacity - 2 * i)\n \n # Return the scores for assignment\n return scores",
"objective": 0.07878,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_20.json
================================================
[
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 85% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 85% of the item's capacity\n penalty = np.where(free_capacity > (0.85 * item), 1, 0)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < (0.03 * item), 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalized bins that have more than 60% of the item's capacity by applying a non-linear penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins that have more than 80% of the item's capacity, but only if their free capacity is greater than 5%, while penalizing bins with less than 6% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with more than 80% of the item's capacity\n priority = np.where(free_capacity >= 0.8 * item, 1, 0)\n \n # Penalize bins with less than 6% free capacity\n penalty = np.where(free_capacity < 0.06 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm that penalizes bins with less than 5% free capacity and prioritizes bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 5% free capacity\n penalty = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Prioritize bins with more than 90% of the item's capacity\n priority = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01399,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: prioritization term (1), penalty term (1), free capacity thresholds (0.05, 0.5). New algorithm: Prioritizes bins with less than 2.5% free capacity, penalizes bins with more than 25% of the item's capacity, and uses different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the prioritization term\n prioritization_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Calculate the penalty term\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = prioritization_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize bins that have more than 80% of the item's capacity with the square of the free capacity value while increasing the priority term of bins that have less than 2% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the penalty for bins with more than 80% of the item's capacity\n penalty = np.square(np.clip(free_capacity / (0.8 * item), 0, 1))\n \n # Calculate the priority term for bins with less than 2% free capacity\n priority = np.clip(1 - (free_capacity / (0.02 * item)), 0, 1)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty + priority\n \n return scores",
"objective": 0.0168,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity with different priority and penalty terms based on the bin's free capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with less than 10% free capacity and prioritizes bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins that have more than 50% of the item's capacity\n bonus = np.where(free_capacity > 0.5 * item, 2, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "New algorithm reducing penalty for bins with less than 30% capacity and increasing priority for bins with less than 20% capacity while adding a double penalty for bins with less than 10% capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on its remaining capacity\n scores = np.zeros(len(bins))\n scores[remaining_capacity >= 0.3 * bins] = 1\n scores[remaining_capacity < 0.3 * bins] = 0.5\n scores[remaining_capacity < 0.2 * bins] = 0.75\n scores[remaining_capacity < 0.1 * bins] = 1.5\n \n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 70% of the item's capacity by applying a non-linear penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 70% of the item's capacity\n penalty = np.where(free_capacity > 0.7 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01831,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 10% free capacity and penalize bins that have more than 70% of the item's capacity with different constants based on the bin's free capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 10% free capacity\n priority_mask = (free_capacity < 0.1 * bins)\n priority_score = np.where(priority_mask, 10, 0)\n \n # Penalize bins with more than 70% of the item's capacity\n penalty_mask = (free_capacity > 0.7 * item)\n penalty_score = np.where(penalty_mask, 5, 0)\n \n # Combine the priority and penalty scores\n scores = priority_score + penalty_score\n \n return scores",
"objective": 0.01851,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_21.json
================================================
[
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 85% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 85% of the item's capacity\n penalty = np.where(free_capacity > (0.85 * item), 1, 0)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < (0.03 * item), 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalized bins that have more than 70% of the item's capacity, where bins with less than 2% free capacity are penalized and those with more than 90% are prioritized.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_mask = (free_capacity < 0.05 * bins)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with more than 70% of the item's capacity\n penalty_mask = (free_capacity > 0.7 * item)\n penalty_scores = np.where(penalty_mask, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and penalize bins with more than 80% of the item's capacity, while considering the difference between the bin's free capacity and the threshold",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 80% of the item's capacity\n penalty = np.where(free_capacity > 0.8 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalized bins that have more than 60% of the item's capacity by applying a non-linear penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins that have more than 80% of the item's capacity, but only if their free capacity is greater than 5%, while penalizing bins with less than 6% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with more than 80% of the item's capacity\n priority = np.where(free_capacity >= 0.8 * item, 1, 0)\n \n # Penalize bins with less than 6% free capacity\n penalty = np.where(free_capacity < 0.06 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm that penalizes bins with less than 5% free capacity and prioritizes bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 5% free capacity\n penalty = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Prioritize bins with more than 90% of the item's capacity\n priority = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01399,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: prioritization term (1), penalty term (1), free capacity thresholds (0.05, 0.5). New algorithm: Prioritizes bins with less than 2.5% free capacity, penalizes bins with more than 25% of the item's capacity, and uses different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the prioritization term\n prioritization_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Calculate the penalty term\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = prioritization_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Newly proposed algorithm: Prioritizes bins with a free capacity close to the item's capacity while penalizing bins with little space remaining.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacity\n diff = np.abs(item - bins)\n \n # Penalize bins with little space remaining\n penalty = np.where(diff < 0.5 * item, 0, 1)\n \n # Prioritize bins with a free capacity close to the item size\n priority = np.where(diff < 0.1 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize bins that have more than 80% of the item's capacity with the square of the free capacity value while increasing the priority term of bins that have less than 2% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the penalty for bins with more than 80% of the item's capacity\n penalty = np.square(np.clip(free_capacity / (0.8 * item), 0, 1))\n \n # Calculate the priority term for bins with less than 2% free capacity\n priority = np.clip(1 - (free_capacity / (0.02 * item)), 0, 1)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty + priority\n \n return scores",
"objective": 0.0168,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 1% free capacity while penalizing bins that have more than 80% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 1% free capacity\n priority = np.where(free_capacity < 0.01 * bins, 1, 0)\n \n # Penalize bins that have more than 80% of the item's capacity\n penalty = np.where(free_capacity > 0.8 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity with different priority and penalty terms based on the bin's free capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with less than 10% free capacity and prioritizes bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins that have more than 50% of the item's capacity\n bonus = np.where(free_capacity > 0.5 * item, 2, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.01781,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_22.json
================================================
[
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 85% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 85% of the item's capacity\n penalty = np.where(free_capacity > (0.85 * item), 1, 0)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < (0.03 * item), 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalized bins that have more than 70% of the item's capacity, where bins with less than 2% free capacity are penalized and those with more than 90% are prioritized.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_mask = (free_capacity < 0.05 * bins)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with more than 70% of the item's capacity\n penalty_mask = (free_capacity > 0.7 * item)\n penalty_scores = np.where(penalty_mask, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and penalize bins with more than 80% of the item's capacity, while considering the difference between the bin's free capacity and the threshold",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 80% of the item's capacity\n penalty = np.where(free_capacity > 0.8 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalized bins that have more than 60% of the item's capacity by applying a non-linear penalty.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins that have more than 80% of the item's capacity, but only if their free capacity is greater than 5%, while penalizing bins with less than 6% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with more than 80% of the item's capacity\n priority = np.where(free_capacity >= 0.8 * item, 1, 0)\n \n # Penalize bins with less than 6% free capacity\n penalty = np.where(free_capacity < 0.06 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm that penalizes bins with less than 5% free capacity and prioritizes bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 5% free capacity\n penalty = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Prioritize bins with more than 90% of the item's capacity\n priority = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01399,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: prioritization term (1), penalty term (1), free capacity thresholds (0.05, 0.5). New algorithm: Prioritizes bins with less than 2.5% free capacity, penalizes bins with more than 25% of the item's capacity, and uses different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the prioritization term\n prioritization_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Calculate the penalty term\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = prioritization_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Newly proposed algorithm: Prioritizes bins with a free capacity close to the item's capacity while penalizing bins with little space remaining.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacity\n diff = np.abs(item - bins)\n \n # Penalize bins with little space remaining\n penalty = np.where(diff < 0.5 * item, 0, 1)\n \n # Prioritize bins with a free capacity close to the item size\n priority = np.where(diff < 0.1 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize bins that have more than 80% of the item's capacity with the square of the free capacity value while increasing the priority term of bins that have less than 2% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the penalty for bins with more than 80% of the item's capacity\n penalty = np.square(np.clip(free_capacity / (0.8 * item), 0, 1))\n \n # Calculate the priority term for bins with less than 2% free capacity\n priority = np.clip(1 - (free_capacity / (0.02 * item)), 0, 1)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty + priority\n \n return scores",
"objective": 0.0168,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 1% free capacity while penalizing bins that have more than 80% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 1% free capacity\n priority = np.where(free_capacity < 0.01 * bins, 1, 0)\n \n # Penalize bins that have more than 80% of the item's capacity\n penalty = np.where(free_capacity > 0.8 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity with different priority and penalty terms based on the bin's free capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with less than 10% free capacity and prioritizes bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 10% free capacity\n penalty = np.where(free_capacity < 0.1 * bins, 10, 0)\n \n # Prioritize bins that have more than 50% of the item's capacity\n bonus = np.where(free_capacity > 0.5 * item, 2, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.01781,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_23.json
================================================
[
{
"algorithm": "prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < 0.03 * bins, 1, 0)\n \n # Penalize bins with more than 75% of the item's capacity\n penalty = np.where(free_capacity > 0.75 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 85% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 85% of the item's capacity\n penalty = np.where(free_capacity > (0.85 * item), 1, 0)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < (0.03 * item), 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalized bins that have more than 70% of the item's capacity, where bins with less than 2% free capacity are penalized and those with more than 90% are prioritized.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_mask = (free_capacity < 0.05 * bins)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with more than 70% of the item's capacity\n penalty_mask = (free_capacity > 0.7 * item)\n penalty_scores = np.where(penalty_mask, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and penalize bins with more than 80% of the item's capacity, while considering the difference between the bin's free capacity and the threshold",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 80% of the item's capacity\n penalty = np.where(free_capacity > 0.8 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have less than 3% free capacity and penalize bins that have more than 95% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < 0.03 * bins, 1, 0)\n \n # Penalize bins with more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins that have more than 80% of the item's capacity, but only if their free capacity is greater than 5%, while penalizing bins with less than 6% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with more than 80% of the item's capacity\n priority = np.where(free_capacity >= 0.8 * item, 1, 0)\n \n # Penalize bins with less than 6% free capacity\n penalty = np.where(free_capacity < 0.06 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm that penalizes bins with less than 5% free capacity and prioritizes bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 5% free capacity\n penalty = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Prioritize bins with more than 90% of the item's capacity\n priority = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01399,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting less than 5% of the item's capacity from the free capacity and penalize bins that have more than 40% free capacity after adding 10% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Penalize bins with more than 40% free capacity after adding 10% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item + 0.1 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: prioritization term (1), penalty term (1), free capacity thresholds (0.05, 0.5). New algorithm: Prioritizes bins with less than 2.5% free capacity, penalizes bins with more than 25% of the item's capacity, and uses different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the prioritization term\n prioritization_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Calculate the penalty term\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = prioritization_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Newly proposed algorithm: Prioritizes bins with a free capacity close to the item's capacity while penalizing bins with little space remaining.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacity\n diff = np.abs(item - bins)\n \n # Penalize bins with little space remaining\n penalty = np.where(diff < 0.5 * item, 0, 1)\n \n # Prioritize bins with a free capacity close to the item size\n priority = np.where(diff < 0.1 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.0159,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 7% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 7% free capacity\n priority = np.where(free_capacity < 0.07 * bins, 1, 0)\n \n # Penalize bins with more than 90% of the item's capacity\n penalty = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize bins that have more than 80% of the item's capacity with the square of the free capacity value while increasing the priority term of bins that have less than 2% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the penalty for bins with more than 80% of the item's capacity\n penalty = np.square(np.clip(free_capacity / (0.8 * item), 0, 1))\n \n # Calculate the priority term for bins with less than 2% free capacity\n priority = np.clip(1 - (free_capacity / (0.02 * item)), 0, 1)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty + priority\n \n return scores",
"objective": 0.0168,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_24.json
================================================
[
{
"algorithm": "prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < 0.03 * bins, 1, 0)\n \n # Penalize bins with more than 75% of the item's capacity\n penalty = np.where(free_capacity > 0.75 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 85% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 85% of the item's capacity\n penalty = np.where(free_capacity > (0.85 * item), 1, 0)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < (0.03 * item), 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 40% free capacity and penalize bins with more than 5%",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with more than 40% free capacity\n priority = np.where(free_capacity > 0.4 * bins, 1, 0)\n \n # Penalize bins with more than 5% free capacity\n penalty = np.where(free_capacity > 0.05 * bins, -1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalized bins that have more than 70% of the item's capacity, where bins with less than 2% free capacity are penalized and those with more than 90% are prioritized.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_mask = (free_capacity < 0.05 * bins)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with more than 70% of the item's capacity\n penalty_mask = (free_capacity > 0.7 * item)\n penalty_scores = np.where(penalty_mask, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and penalize bins with more than 80% of the item's capacity, while considering the difference between the bin's free capacity and the threshold",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 80% of the item's capacity\n penalty = np.where(free_capacity > 0.8 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have less than 5% free capacity and penalize bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Penalize bins with more than 90% of the item's capacity\n penalty = np.where(free_capacity > 0.9 * item, 100, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 100, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have less than 3% free capacity and penalize bins that have more than 95% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < 0.03 * bins, 1, 0)\n \n # Penalize bins with more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins that have more than 80% of the item's capacity, but only if their free capacity is greater than 5%, while penalizing bins with less than 6% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with more than 80% of the item's capacity\n priority = np.where(free_capacity >= 0.8 * item, 1, 0)\n \n # Penalize bins with less than 6% free capacity\n penalty = np.where(free_capacity < 0.06 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm that penalizes bins with less than 5% free capacity and prioritizes bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 5% free capacity\n penalty = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Prioritize bins with more than 90% of the item's capacity\n priority = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01399,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting less than 5% of the item's capacity from the free capacity and penalize bins that have more than 40% free capacity after adding 10% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Penalize bins with more than 40% free capacity after adding 10% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item + 0.1 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: prioritization term (1), penalty term (1), free capacity thresholds (0.05, 0.5). New algorithm: Prioritizes bins with less than 2.5% free capacity, penalizes bins with more than 25% of the item's capacity, and uses different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the prioritization term\n prioritization_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Calculate the penalty term\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = prioritization_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Newly proposed algorithm: Prioritizes bins with a free capacity close to the item's capacity while penalizing bins with little space remaining.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacity\n diff = np.abs(item - bins)\n \n # Penalize bins with little space remaining\n penalty = np.where(diff < 0.5 * item, 0, 1)\n \n # Prioritize bins with a free capacity close to the item size\n priority = np.where(diff < 0.1 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.0159,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_25.json
================================================
[
{
"algorithm": "prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < 0.03 * bins, 1, 0)\n \n # Penalize bins with more than 75% of the item's capacity\n penalty = np.where(free_capacity > 0.75 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01147,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalizing bins that have more than 60% of the item's capacity while increasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that have more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 5% free capacity and penalizing bins that exceed 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins that exceed 75% of the item's capacity\n penalty = np.where(free_capacity > 0.75 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 3% free capacity and penalizing bins that have more than 85% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 85% of the item's capacity\n penalty = np.where(free_capacity > (0.85 * item), 1, 0)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < (0.03 * item), 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 40% free capacity and penalize bins with more than 5%",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with more than 40% free capacity\n priority = np.where(free_capacity > 0.4 * bins, 1, 0)\n \n # Penalize bins with more than 5% free capacity\n penalty = np.where(free_capacity > 0.05 * bins, -1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 5% free capacity and penalized bins that have more than 70% of the item's capacity, where bins with less than 2% free capacity are penalized and those with more than 90% are prioritized.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 5% free capacity\n priority_mask = (free_capacity < 0.05 * bins)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with more than 70% of the item's capacity\n penalty_mask = (free_capacity > 0.7 * item)\n penalty_scores = np.where(penalty_mask, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 5% free capacity and penalize bins with more than 80% of the item's capacity, while considering the difference between the bin's free capacity and the threshold",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 80% of the item's capacity\n penalty = np.where(free_capacity > 0.8 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have less than 5% free capacity and penalize bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Penalize bins with more than 90% of the item's capacity\n penalty = np.where(free_capacity > 0.9 * item, 100, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 100, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have less than 3% free capacity and penalize bins that have more than 95% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 3% free capacity\n priority = np.where(free_capacity < 0.03 * bins, 1, 0)\n \n # Penalize bins with more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins that have more than 80% of the item's capacity, but only if their free capacity is greater than 5%, while penalizing bins with less than 6% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with more than 80% of the item's capacity\n priority = np.where(free_capacity >= 0.8 * item, 1, 0)\n \n # Penalize bins with less than 6% free capacity\n penalty = np.where(free_capacity < 0.06 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "The new algorithm penalizes bins that have less than 2% free capacity and prioritizes bins that have more than 85% of the item's capacity; while the original algorithm prioritizes bins with less than 15% free capacity and penalizing bins that have more than 70% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 2% free capacity\n penalty = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Prioritize bins with more than 85% of the item's capacity\n bonus = np.where(free_capacity > 0.85 * item, 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "New algorithm that penalizes bins with less than 5% free capacity and prioritizes bins that have more than 90% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 5% free capacity\n penalty = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Prioritize bins with more than 90% of the item's capacity\n priority = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01399,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting less than 5% of the item's capacity from the free capacity and penalize bins that have more than 40% free capacity after adding 10% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Penalize bins with more than 40% free capacity after adding 10% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item + 0.1 * item, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01409,
"other_inf": null
},
{
"algorithm": "Prioritizes bins with less than 5% free capacity and penalizes bins with more than 50% of the item's capacity, with different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 5% free capacity and penalizing bins that have more than 95% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins that have more than 95% of the item's capacity\n penalty = np.where(free_capacity > 0.95 * item, 1, 0)\n \n # Prioritize bins that have less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 2% free capacity and penalizing bins that exceed 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 2% free capacity\n priority = np.where(free_capacity < 0.02 * bins, 1, 0)\n \n # Penalize bins that exceed 90% of the item's capacity\n penalty = np.where(free_capacity > 0.9 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / 2\n \n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have less than 5% free capacity while increasing the penalty term, and penalizing bins that have more than 50% of the item's capacity with a different penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 5% free capacity\n priority = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Penalize bins with more than 50% of the item's capacity\n penalty = np.where(free_capacity > 0.5 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01469,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: prioritization term (1), penalty term (1), free capacity thresholds (0.05, 0.5). New algorithm: Prioritizes bins with less than 2.5% free capacity, penalizes bins with more than 25% of the item's capacity, and uses different prioritization and penalty terms based on the bin's free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the prioritization term\n prioritization_term = np.where(free_capacity < 0.05 * bins, 1, 0)\n \n # Calculate the penalty term\n penalty_term = np.where(free_capacity > 0.5 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = prioritization_term + penalty_term\n \n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 8% free space and penalize bins that have more than 45% of the item's free space, while decreasing the penalty term for bins with less than 55% free space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free space in each bin\n free_space = bins - item\n \n # Prioritize bins with less than 8% free space\n priority = np.where(free_space < 0.08 * bins, 1, 0)\n \n # Penalize bins that have more than 45% of the item's free space\n penalty = np.where(free_space > 0.45 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 55% free space\n penalty = np.where(free_space < 0.55 * item, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have more than 50% free capacity, and penalize bins that can fit the item without leaving any free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with more than 50% free capacity\n priority = np.where(free_capacity > (bins / 2), 1, 0)\n \n # Penalize bins that can fit the item without leaving any free capacity\n penalty = np.where(free_capacity == 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.01549,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_3.json
================================================
[
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a variable amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold based on the difference\n fav_thresh = np.minimum(diff / (item + 1), 0.5)\n \n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 - fav_thresh[i]\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "{New Algorithm: Calculate the score for each bin as the exponential of the non-positive difference between bin's rest capacity and item size, and the rest capacity to the power of the square root of positive differences.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.exp(-np.maximum(0, bins - item)) * (bins ** 0.5)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "For each bin, calculate its ratio of rest capacity to item size; if greater than 1, the score is 0, otherwise, the score is the inverse of the ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Set the score for each bin based on the ratio\n scores = np.where(ratios > 1, 0, 1 / ratios)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Prioritize bins with smaller capacity differences and higher available capacities, penalizing bins with large capacity differences or insufficient available capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n capacity_diff = np.abs(bins - item)\n \n # Calculate the available capacity for each bin\n available_capacity = bins - capacity_diff\n \n # Prioritize bins with smaller capacity differences and higher available capacities\n scores = np.zeros(len(bins))\n scores[available_capacity > 0] = 1 / (1 + np.exp(-available_capacity[available_capacity > 0]))\n scores[available_capacity <= 0] = 0\n \n # Penalize bins with large capacity differences or insufficient available capacity\n scores[capacity_diff > 1] -= 1\n scores[available_capacity < 0] -= 1\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with exact capacity and penalize bins with smaller capacities, favoring larger bins with sufficient space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = bins - item\n \n # Penalize bins with smaller capacities by adding a large negative value\n penalty = np.where(diff < 0, -1e9, 0)\n \n # Favor bins with exact capacity by adding a positive value\n bonus = np.where(diff == 0, 1e9, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Assign a very high score to bins that exactly fit the item's size, while for all other less-fitting bins, calculate scores based on the difference in capacities and item size, with a penalty for bins exceeding the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin sizes\n diff = np.abs(item - bins)\n \n # Calculate the penalty for bins that exceed the item size\n penalty = np.maximum(0, diff - item)\n \n # Calculate the score for each bin\n scores = np.where(diff == 0, np.inf, 1 / (1 + penalty))\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores for each bin based on the ratio of the remaining capacity to the total usable capacity, prioritizing bins with higher remaining capacities to maximize space utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of remaining capacity to total usable capacity for each bin\n ratios = (bins - item) / bins\n \n # Prioritize bins with higher remaining capacities\n scores = np.argsort(-ratios)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of item size and the reciprocal of (the rest capacity plus one)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.multiply(item, np.reciprocal(bins + 1))\n \n # Return the scores\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size, down from 0.5 to 0.25.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold for each bin\n thresholds = np.maximum(diff / (item + 1), 0.25)\n \n # Calculate the scores for each bin\n scores = np.exp(-thresholds)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Prioritize bins with sufficient capacity and penalize bins with excessive capacity, while considering the item's size to favor bins with capacities closest to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Prioritize bins with sufficient capacity\n priority_mask = (diff <= 0.5 * item)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with excessive capacity\n penalty_mask = (diff > 0.5 * item) & (diff < 1.5 * item)\n penalty_scores = np.where(penalty_mask, 0.5, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n # Normalize the scores to ensure they sum to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins based on the ratio of the available capacity to the item size, favoring bins with capacities closely matching the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of available capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Favor bins with capacities closely matching the item size\n scores = np.where(ratios < 0.5, 1, 0)\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04427,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm scores each bin based on the product of the bin's index and the number of available bins with equal or larger capacity, prioritizing bins with lower indices and higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the bin's index and the number of available bins with equal or larger capacity\n scores = np.array([bin_index * (len(bins) - bin_index) for bin_index in range(len(bins))])\n \n # Prioritize bins with lower indices and higher capacities\n scores[np.where(bins < item)] = 0\n \n return scores",
"objective": 0.04477,
"other_inf": null
},
{
"algorithm": "New Algorithm: Adjust the priority and penalty thresholds to prioritize bins with smaller capacity differences, especially when the item size is small.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Prioritize bins with smaller capacity differences\n priority = np.argsort(diff)\n \n # Penalize bins with large capacity differences\n penalty = np.exp(-np.square(diff))\n \n # Combine the priority and penalty scores\n scores = priority * penalty\n \n return scores",
"objective": 0.04618,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate scores by dividing each bin's rest capacity by the maximum between the difference between its capacity and the item size and 1, excluding bins at max capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.divide(bins - item, np.maximum(bins - item, 1))\n \n # Exclude bins at maximum capacity\n scores[np.where(bins == bins.max())] = 0\n \n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": "Calculate scores based on the ratio of remaining capacity to the difference between bin capacity and item size, prioritizing bins with both higher remaining capacity and smaller difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of remaining capacity to the difference between bin capacity and item size\n ratios = (bins - item) / (bins - np.minimum(bins, item))\n \n # Prioritize bins with both higher remaining capacity and smaller difference\n scores = np.where(ratios > 0, ratios, 0)\n \n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_4.json
================================================
[
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a variable amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold based on the difference\n fav_thresh = np.minimum(diff / (item + 1), 0.5)\n \n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 - fav_thresh[i]\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin as the exponential of the non-positive difference between the bin's rest capacity and item size, and the rest capacity to the power of the positive difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.exp(-np.abs(bins - item)) * (bins / item) ** 2\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "For each bin, calculate its ratio of rest capacity to item size; if greater than 1, the score is 0, otherwise, the score is the inverse of the ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Set the score for each bin based on the ratio\n scores = np.where(ratios > 1, 0, 1 / ratios)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Prioritize bins with smaller capacity differences and higher available capacities, penalizing bins with large capacity differences or insufficient available capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n capacity_diff = np.abs(bins - item)\n \n # Calculate the available capacity for each bin\n available_capacity = bins - capacity_diff\n \n # Prioritize bins with smaller capacity differences and higher available capacities\n scores = np.zeros(len(bins))\n scores[available_capacity > 0] = 1 / (1 + np.exp(-available_capacity[available_capacity > 0]))\n scores[available_capacity <= 0] = 0\n \n # Penalize bins with large capacity differences or insufficient available capacity\n scores[capacity_diff > 1] -= 1\n scores[available_capacity < 0] -= 1\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: item size, bin capacity. New algorithm: For each bin, calculate its score as the difference between its rest capacity and the item size, if positive, the score is 0, otherwise, the score is the inverse of the difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the rest capacity and the item size\n diff = bins - item\n \n # Set the score to 0 if the difference is positive, otherwise set it to the inverse of the difference\n scores = np.where(diff > 0, 0, 1 / diff)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Assign a very high score to bins that exactly fit the item's size, while for all other less-fitting bins, calculate scores based on the difference in capacities and item size, with a penalty for bins exceeding the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin sizes\n diff = np.abs(item - bins)\n \n # Calculate the penalty for bins that exceed the item size\n penalty = np.maximum(0, diff - item)\n \n # Calculate the score for each bin\n scores = np.where(diff == 0, np.inf, 1 / (1 + penalty))\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores for each bin based on the ratio of the remaining capacity to the total usable capacity, prioritizing bins with higher remaining capacities to maximize space utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of remaining capacity to total usable capacity for each bin\n ratios = (bins - item) / bins\n \n # Prioritize bins with higher remaining capacities\n scores = np.argsort(-ratios)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of item size and the reciprocal of (the rest capacity plus one)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.multiply(item, np.reciprocal(bins + 1))\n \n # Return the scores\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size, down from 0.5 to 0.25.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold for each bin\n thresholds = np.maximum(diff / (item + 1), 0.25)\n \n # Calculate the scores for each bin\n scores = np.exp(-thresholds)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Prioritize bins with sufficient capacity and penalize bins with excessive capacity, while considering the item's size to favor bins with capacities closest to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Prioritize bins with sufficient capacity\n priority_mask = (diff <= 0.5 * item)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins with excessive capacity\n penalty_mask = (diff > 0.5 * item) & (diff < 1.5 * item)\n penalty_scores = np.where(penalty_mask, 0.5, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n # Normalize the scores to ensure they sum to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins based on the ratio of the available capacity to the item size, favoring bins with capacities closely matching the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of available capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Favor bins with capacities closely matching the item size\n scores = np.where(ratios < 0.5, 1, 0)\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04427,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm scores each bin based on the product of its index and the number of available bins with equal or larger capacity and lower indices",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the index and the number of available bins with equal or larger capacity and lower indices\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = (i + 1) * (len(bins) - i)\n \n # Return the scores\n return scores",
"objective": 0.04477,
"other_inf": null
},
{
"algorithm": "New Algorithm: Adjust the priority and penalty thresholds to prioritize bins with smaller capacity differences, especially when the item size is small.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Prioritize bins with smaller capacity differences\n priority = np.argsort(diff)\n \n # Penalize bins with large capacity differences\n penalty = np.exp(-np.square(diff))\n \n # Combine the priority and penalty scores\n scores = priority * penalty\n \n return scores",
"objective": 0.04618,
"other_inf": null
},
{
"algorithm": "New algorithm with adjusted parameter settings: Prioritizing bins that have more free capacity than the item and penalizing bins that have less than 25% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with less than 25% free capacity\n penalty = np.where(free_capacity < (0.25 * bins), 1, 0)\n \n # Prioritize bins with more free capacity than the item\n priority = np.where(free_capacity > item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.04628,
"other_inf": null
},
{
"algorithm": "New algorithm with adjusted parameter settings: Prioritizing bins with sufficient capacity and penalizing bins with more than 50% excessive capacity while considering the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Penalize bins with more than 50% excessive capacity\n penalty = np.where(available_capacity > (bins / 2), 0, 1)\n \n # Prioritize bins with sufficient capacity\n priority = np.where(available_capacity >= item, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty * priority\n \n return scores",
"objective": 0.0484,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate scores by dividing each bin's rest capacity by the maximum between the difference between its capacity and the item size and 1, excluding bins at max capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.divide(bins - item, np.maximum(bins - item, 1))\n \n # Exclude bins at maximum capacity\n scores[np.where(bins == bins.max())] = 0\n \n return scores",
"objective": 0.05091,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_5.json
================================================
[
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 25% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.25 * bins, 1 + (0.25 - free_capacity / bins), 0)\n scores = np.where(free_capacity > 0.75 * bins, 1 - (free_capacity - 0.75 * bins) / bins, scores)\n \n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalizing bins with more than 15% excessive capacity and rewarding bins with more than 75% of their capacity, considering the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Reward bins with more than 75% of their capacity\n rewards = np.where(percent_excess > 75, 1, 0)\n \n # Penalize bins with more than 15% excess capacity\n penalties = np.where(percent_excess > 15, -1, 0)\n \n # Combine rewards and penalties to get the final score\n scores = rewards + penalties\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a variable amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold based on the difference\n fav_thresh = np.minimum(diff / (item + 1), 0.5)\n \n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 - fav_thresh[i]\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin as the natural log of the non-positive difference between the bin's rest capacity and item size, and the rest capacity to the power of the positive difference",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.log(np.abs(bins - item)) + (bins / (bins - item)) ** 2\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin as the exponential of the non-positive difference between the bin's rest capacity and item size, and the rest capacity to the power of the positive difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.exp(-np.abs(bins - item)) * (bins / item) ** 2\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "For each bin, calculate its ratio of rest capacity to item size; if greater than 1, the score is 0, otherwise, the score is the inverse of the ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Set the score for each bin based on the ratio\n scores = np.where(ratios > 1, 0, 1 / ratios)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Prioritize bins with smaller capacity differences and higher available capacities, penalizing bins with large capacity differences or insufficient available capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n capacity_diff = np.abs(bins - item)\n \n # Calculate the available capacity for each bin\n available_capacity = bins - capacity_diff\n \n # Prioritize bins with smaller capacity differences and higher available capacities\n scores = np.zeros(len(bins))\n scores[available_capacity > 0] = 1 / (1 + np.exp(-available_capacity[available_capacity > 0]))\n scores[available_capacity <= 0] = 0\n \n # Penalize bins with large capacity differences or insufficient available capacity\n scores[capacity_diff > 1] -= 1\n scores[available_capacity < 0] -= 1\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: item size, bin capacity. New algorithm: For each bin, calculate its score as the difference between its rest capacity and the item size, if positive, the score is 0, otherwise, the score is the inverse of the difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the rest capacity and the item size\n diff = bins - item\n \n # Set the score to 0 if the difference is positive, otherwise set it to the inverse of the difference\n scores = np.where(diff > 0, 0, 1 / diff)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Assign a very high score to bins that exactly fit the item's size, while for all other less-fitting bins, calculate scores based on the difference in capacities and item size, with a penalty for bins exceeding the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin sizes\n diff = np.abs(item - bins)\n \n # Calculate the penalty for bins that exceed the item size\n penalty = np.maximum(0, diff - item)\n \n # Calculate the score for each bin\n scores = np.where(diff == 0, np.inf, 1 / (1 + penalty))\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores for each bin based on the ratio of the remaining capacity to the total usable capacity, prioritizing bins with higher remaining capacities to maximize space utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of remaining capacity to total usable capacity for each bin\n ratios = (bins - item) / bins\n \n # Prioritize bins with higher remaining capacities\n scores = np.argsort(-ratios)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of item size and the reciprocal of (the rest capacity plus one)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.multiply(item, np.reciprocal(bins + 1))\n \n # Return the scores\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size, down from 0.5 to 0.25.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold for each bin\n thresholds = np.maximum(diff / (item + 1), 0.25)\n \n # Calculate the scores for each bin\n scores = np.exp(-thresholds)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The idea is to find which bin has a best score. A bin with more remaining capacity will have a best score. If the remaining capacity is larger than item's size, the score is the inverse of the remaining capacity. If the remaining capacity is smaller than item's size, the score is the inverse of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Initialize the scores for each bin\n scores = np.zeros(len(bins))\n \n # Loop through each bin and calculate its score\n for i in range(len(bins)):\n if remaining_capacity[i] >= item:\n # If the remaining capacity is greater than or equal to the item size,\n # the score is the inverse of the remaining capacity\n scores[i] = 1 / remaining_capacity[i]\n else:\n # If the remaining capacity is less than the item size,\n # the score is the inverse of the item size\n scores[i] = 1 / item\n \n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins with capacities closer to the item size and penalize bins with excessive capacity, while minimizing the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with excessive capacity\n penalty = np.maximum(0, (bins - item)) ** 2\n \n # Prioritize bins with capacities closer to the item size\n priority = np.exp(-diff / (item * 0.5))\n \n # Combine the penalty and priority scores\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins based on the ratio of the available capacity to the item size, favoring bins with capacities closely matching the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of available capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Favor bins with capacities closely matching the item size\n scores = np.where(ratios < 0.5, 1, 0)\n \n # Normalize the scores to ensure they sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04427,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm scores each bin based on the product of its index and the number of available bins with equal or larger capacity and lower indices",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the index and the number of available bins with equal or larger capacity and lower indices\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = (i + 1) * (len(bins) - i)\n \n # Return the scores\n return scores",
"objective": 0.04477,
"other_inf": null
},
{
"algorithm": "Prioritize the bin with the closest lower capacity to the item size while penalizing bins exceeding or falling too far below that capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Penalize bins that are too small or too large\n penalty = np.where(diff > 0.5 * item, 10 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.04487,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_6.json
================================================
[
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 25% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.25 * bins, 1 + (0.25 - free_capacity / bins), 0)\n scores = np.where(free_capacity > 0.75 * bins, 1 - (free_capacity - 0.75 * bins) / bins, scores)\n \n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalizing bins with more than 15% excessive capacity and rewarding bins with more than 75% of their capacity, considering the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Reward bins with more than 75% of their capacity\n rewards = np.where(percent_excess > 75, 1, 0)\n \n # Penalize bins with more than 15% excess capacity\n penalties = np.where(percent_excess > 15, -1, 0)\n \n # Combine rewards and penalties to get the final score\n scores = rewards + penalties\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a variable amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold based on the difference\n fav_thresh = np.minimum(diff / (item + 1), 0.5)\n \n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 - fav_thresh[i]\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin as the natural log of the non-positive difference between the bin's rest capacity and item size, and the rest capacity to the power of the positive difference",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.log(np.abs(bins - item)) + (bins / (bins - item)) ** 2\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the exponential of the negative difference between the ratio of bin's rest capacity and item size, and the ratio to the power of the negative difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.exp(-(bins - item) / (bins + item)) ** 2\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "For each bin, calculate its ratio of rest capacity to item size; if greater than 1, the score is 0, otherwise, the score is the inverse of the ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Set the score for each bin based on the ratio\n scores = np.where(ratios > 1, 0, 1 / ratios)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a fixed amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold for each bin\n thresholds = np.maximum(0, diff - 1)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 / (thresholds[i] + 1)\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " Prioritizing bins that have more than 75% of their capacity and penalizing bins that have less than 25% free capacity ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Penalize bins with less than 25% free capacity\n penalty = np.where(available_capacity < (0.25 * bins), 1, 0)\n \n # Prioritize bins with more than 75% free capacity\n bonus = np.where(available_capacity > (0.75 * bins), 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: item size, bin capacity. New algorithm: For each bin, calculate its score as the difference between its rest capacity and the item size, if positive, the score is 0, otherwise, the score is the inverse of the difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the rest capacity and the item size\n diff = bins - item\n \n # Set the score to 0 if the difference is positive, otherwise set it to the inverse of the difference\n scores = np.where(diff > 0, 0, 1 / diff)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Assign a very high score to bins that exactly fit the item's size, while for all other less-fitting bins, calculate scores based on the difference in capacities and item size, with a penalty for bins exceeding the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin sizes\n diff = np.abs(item - bins)\n \n # Calculate the penalty for bins that exceed the item size\n penalty = np.maximum(0, diff - item)\n \n # Calculate the score for each bin\n scores = np.where(diff == 0, np.inf, 1 / (1 + penalty))\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "The algorithm calculates scores for each bin based on the ratio of the remaining capacity to the total usable capacity, prioritizing bins with higher remaining capacities to maximize space utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of remaining capacity to total usable capacity for each bin\n ratios = (bins - item) / bins\n \n # Prioritize bins with higher remaining capacities\n scores = np.argsort(-ratios)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": " Prioritize bins that have less than 30% free capacity, penalize bins that have more than 80% of the item's capacity, and reward empty bins. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on the free capacity\n scores = np.where(free_capacity < 0.3 * bins, 100, 0)\n scores += np.where(free_capacity > 0.8 * item, -100, 0)\n scores += np.where(free_capacity == 0, 50, 0)\n \n return scores",
"objective": 0.04186,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of item size and the reciprocal of (the rest capacity plus one)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.multiply(item, np.reciprocal(bins + 1))\n \n # Return the scores\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size, down from 0.5 to 0.25.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold for each bin\n thresholds = np.maximum(diff / (item + 1), 0.25)\n \n # Calculate the scores for each bin\n scores = np.exp(-thresholds)\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "Algorithm: This algorithm prioritizes bins with a great free capacity and the free capacity is greater than 50% of the bin capacity; penalizing the bins that have less than 50% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with a great free capacity (greater than 50% of the bin capacity)\n priority = np.where(free_capacity > 0.5 * bins, 1, 0)\n \n # Penalize bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 1, 0)\n \n # Calculate the score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have smaller differences between their current capacity and the target capacity, penalizing bins that have large differences or insufficient remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the current capacity and the target capacity for each bin\n diff = np.abs(bins - item)\n \n # Penalize bins with large differences or insufficient remaining capacity\n penalty = np.where(diff > 0.5 * bins, 10 * diff, 0)\n penalty += np.where(bins < item, 10 * (item - bins), 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / 10)\n \n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 50% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.5 * bins, 1, 0) + np.where(free_capacity > 0.9 * item, -1, 0)\n \n return scores",
"objective": 0.04336,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_7.json
================================================
[
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizing bins with less than 20% free capacity and penalizing bins that have more than 30% of the item's capacity while decreasing the penalty term to zero for bins with less than 40% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins that have more than 30% of the item's capacity\n penalty = np.where(free_capacity > 0.3 * item, 1, 0)\n \n # Decrease the penalty term to zero for bins with less than 40% free capacity\n penalty = np.where(free_capacity < 0.4 * bins, 0, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 25% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.25 * bins, 1 + (0.25 - free_capacity / bins), 0)\n scores = np.where(free_capacity > 0.75 * bins, 1 - (free_capacity - 0.75 * bins) / bins, scores)\n \n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": " Penalize bins with more than 20% excessive capacity and reward bins with more than 65% of their capacity, considering the item's size and the average capacity utilization of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Penalize bins with more than 20% excess capacity\n penalized_bins = np.where(percent_excess > 20, 0, 1)\n \n # Reward bins with more than 65% of their capacity\n rewarded_bins = np.where(percent_excess > 65, 1, 0)\n \n # Combine the penalties and rewards\n scores = penalized_bins + rewarded_bins\n \n return scores",
"objective": 0.03652,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalizing bins with more than 15% excessive capacity and rewarding bins with more than 75% of their capacity, considering the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Reward bins with more than 75% of their capacity\n rewards = np.where(percent_excess > 75, 1, 0)\n \n # Penalize bins with more than 15% excess capacity\n penalties = np.where(percent_excess > 15, -1, 0)\n \n # Combine rewards and penalties to get the final score\n scores = rewards + penalties\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a variable amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold based on the difference\n fav_thresh = np.minimum(diff / (item + 1), 0.5)\n \n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 - fav_thresh[i]\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.1 * bins, 10 * (1 - free_capacity / bins), 0)\n scores += np.where(free_capacity > 0.5 * bins, -5 * (free_capacity / bins - 0.5), 0)\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 10% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.1 * bins, 10 * (1 - free_capacity / bins), 0)\n scores += np.where(free_capacity > 0.9 * bins, -10 * (free_capacity / bins - 0.9), 0)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin as the natural log of the non-positive difference between the bin's rest capacity and item size, and the rest capacity to the power of the positive difference",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.log(np.abs(bins - item)) + (bins / (bins - item)) ** 2\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score for each bin as the exponential of the negative difference between the ratio of bin's rest capacity and item size, and the natural logarithm of the ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.exp(-np.log(bins / item))\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "For each bin, calculate its ratio of rest capacity to item size; if greater than 1, the score is 0, otherwise, the score is the inverse of the ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Set the score for each bin based on the ratio\n scores = np.where(ratios > 1, 0, 1 / ratios)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a fixed amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold for each bin\n thresholds = np.maximum(0, diff - 1)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 / (thresholds[i] + 1)\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " Prioritizing bins that have more than 75% of their capacity and penalizing bins that have less than 25% free capacity ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Penalize bins with less than 25% free capacity\n penalty = np.where(available_capacity < (0.25 * bins), 1, 0)\n \n # Prioritize bins with more than 75% free capacity\n bonus = np.where(available_capacity > (0.75 * bins), 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Penalizing bins with more than 20% excessive capacity and rewarding bins with more than 80% of their capacity, considering the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of capacity used by each bin\n capacity_used = (bins - excess_capacity) / bins\n \n # Reward bins with more than 80% capacity used\n rewards = np.where(capacity_used > 0.8, 1, 0)\n \n # Penalize bins with more than 20% excess capacity\n penalties = np.where(excess_capacity > 0.2 * bins, -1, 0)\n \n # Combine rewards and penalties to get the final score\n scores = rewards + penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: item size, bin capacity. New algorithm: For each bin, calculate its score as the difference between its rest capacity and the item size, if positive, the score is 0, otherwise, the score is the inverse of the difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the rest capacity and the item size\n diff = bins - item\n \n # Set the score to 0 if the difference is positive, otherwise set it to the inverse of the difference\n scores = np.where(diff > 0, 0, 1 / diff)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Assign a very high score to bins that exactly fit the item's size, while for all other less-fitting bins, calculate scores based on the difference in capacities and item size, with a penalty for bins exceeding the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin sizes\n diff = np.abs(item - bins)\n \n # Calculate the penalty for bins that exceed the item size\n penalty = np.maximum(0, diff - item)\n \n # Calculate the score for each bin\n scores = np.where(diff == 0, np.inf, 1 / (1 + penalty))\n \n return scores",
"objective": 0.04125,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_8.json
================================================
[
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizing bins with less than 20% free capacity and penalizing bins that have more than 30% of the item's capacity while decreasing the penalty term to zero for bins with less than 40% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins that have more than 30% of the item's capacity\n penalty = np.where(free_capacity > 0.3 * item, 1, 0)\n \n # Decrease the penalty term to zero for bins with less than 40% free capacity\n penalty = np.where(free_capacity < 0.4 * bins, 0, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Algorithm for minimizing the number of used bins: Prioritize bins that can fit the item leaving less than 20% free capacity, and penalize bins that leave more than 40% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 20% free capacity\n priority_bins = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins that leave more than 40% free capacity\n penalty_bins = np.where(free_capacity > 0.4 * bins, 1, 0)\n \n # Combine the prioritization and penalization scores\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.03582,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 25% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.25 * bins, 1 + (0.25 - free_capacity / bins), 0)\n scores = np.where(free_capacity > 0.75 * bins, 1 - (free_capacity - 0.75 * bins) / bins, scores)\n \n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": " Penalize bins with more than 20% excessive capacity and reward bins with more than 65% of their capacity, considering the item's size and the average capacity utilization of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Penalize bins with more than 20% excess capacity\n penalized_bins = np.where(percent_excess > 20, 0, 1)\n \n # Reward bins with more than 65% of their capacity\n rewarded_bins = np.where(percent_excess > 65, 1, 0)\n \n # Combine the penalties and rewards\n scores = penalized_bins + rewarded_bins\n \n return scores",
"objective": 0.03652,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalizing bins with more than 15% excessive capacity and rewarding bins with more than 75% of their capacity, considering the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Reward bins with more than 75% of their capacity\n rewards = np.where(percent_excess > 75, 1, 0)\n \n # Penalize bins with more than 15% excess capacity\n penalties = np.where(percent_excess > 15, -1, 0)\n \n # Combine rewards and penalties to get the final score\n scores = rewards + penalties\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": " Prioritize bins that can fit the item leaving less than 30% free capacity, penalized bins that have more than 30% free capacity, and assign a small bonus to bins that leave less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 30% free capacity\n penalty = np.where(free_capacity > (bins * 0.3), 0, (bins * 0.3) - free_capacity)\n \n # Bonus for bins with less than 10% free capacity\n bonus = np.where(free_capacity < (bins * 0.1), (bins * 0.1) - free_capacity, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a variable amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold based on the difference\n fav_thresh = np.minimum(diff / (item + 1), 0.5)\n \n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 - fav_thresh[i]\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 20% free capacity, and penalize bins with more than 60% of their capacity to prefer smaller capacity bins rather than larger ones.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of their capacity\n penalty = np.where(free_capacity > 0.6 * bins, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.1 * bins, 10 * (1 - free_capacity / bins), 0)\n scores += np.where(free_capacity > 0.5 * bins, -5 * (free_capacity / bins - 0.5), 0)\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 10% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.1 * bins, 10 * (1 - free_capacity / bins), 0)\n scores += np.where(free_capacity > 0.9 * bins, -10 * (free_capacity / bins - 0.9), 0)\n \n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin as the natural log of the non-positive difference between the bin's rest capacity and item size, and the rest capacity to the power of the positive difference",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.log(np.abs(bins - item)) + (bins / (bins - item)) ** 2\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score for each bin as the exponential of the negative difference between the ratio of bin's rest capacity and item size, and the natural logarithm of the ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.exp(-np.log(bins / item))\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "For each bin, calculate its ratio of rest capacity to item size; if greater than 1, the score is 0, otherwise, the score is the inverse of the ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = (bins - item) / item\n \n # Set the score for each bin based on the ratio\n scores = np.where(ratios > 1, 0, 1 / ratios)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a fixed amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold for each bin\n thresholds = np.maximum(0, diff - 1)\n \n # Calculate the scores for each bin\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 / (thresholds[i] + 1)\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " Prioritizing bins that have more than 75% of their capacity and penalizing bins that have less than 25% free capacity ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Penalize bins with less than 25% free capacity\n penalty = np.where(available_capacity < (0.25 * bins), 1, 0)\n \n # Prioritize bins with more than 75% free capacity\n bonus = np.where(available_capacity > (0.75 * bins), 1, 0)\n \n # Combine the penalty and bonus to get the final score\n scores = penalty + bonus\n \n return scores",
"objective": 0.04035,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run2/population_generation_9.json
================================================
[
{
"algorithm": "Main steps: Penalize bins with more than 30% of the item's capacity while increasing the penalty term; prioritize bins with less than 5% free capacity and decrease the priority term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum capacity of the bins\n max_capacity = np.max(bins)\n \n # Calculate the remaining capacity of the bins\n remaining_capacity = bins - item\n \n # Calculate the percentage of the item's capacity used by each bin\n usage_percentage = (remaining_capacity / max_capacity) * 100\n \n # Calculate the penalty term based on the usage percentage\n penalty_term = np.where(usage_percentage > 30, 100 - usage_percentage, 0)\n \n # Calculate the priority term based on the remaining capacity\n priority_term = np.where(remaining_capacity < 5, 100 - remaining_capacity, 0)\n \n # Combine the penalty and priority terms to get the final score\n scores = penalty_term + priority_term\n \n return scores",
"objective": 0.01751,
"other_inf": null
},
{
"algorithm": "A new algorithm to prioritize bins that have less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while increasing the penalty term .",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of free capacity for each bin\n free_capacity = (bins - item) / bins\n \n # Penalize bins with more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4, 1, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1, 1, 0)\n \n # Combine the penalty and priority scores\n scores = penalty + priority\n \n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that can fit the item leaving less than 10% free capacity, and penalize bins that leave more than 30% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 10% free capacity\n priority_bins = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that leave more than 30% free capacity\n penalty_bins = np.where(free_capacity > 0.3 * bins, 1, 0)\n \n # Calculate the total score for each bin\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.01902,
"other_inf": null
},
{
"algorithm": "Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 40% of the item's capacity while decreasing the penalty term.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 10% free capacity\n priority = np.where(free_capacity < 0.1 * bins, 1, 0)\n \n # Penalize bins that have more than 40% of the item's capacity\n penalty = np.where(free_capacity > 0.4 * item, 1, 0)\n \n # Decrease the penalty term for bins with less than 50% free capacity\n penalty = np.where(free_capacity < 0.5 * bins, 0.5 * penalty, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have more than 50% of their capacity and giving a larger penalty to bins that have less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the available capacity for each bin\n available_capacity = bins - item\n \n # Prioritize bins with more than 50% capacity\n priority_mask = (available_capacity > bins * 0.5)\n priority_score = np.where(priority_mask, 1, 0)\n \n # Penalize bins with less than 10% free capacity\n penalization_mask = (available_capacity < bins * 0.1)\n penalization_score = np.where(penalization_mask, 1, 0)\n \n # Combine the priority and penalization scores\n scores = priority_score + penalization_score\n \n return scores",
"objective": 0.02193,
"other_inf": null
},
{
"algorithm": "Assign priority to bins with close capacity to the size of the item, while penalizing bins with smaller capacities and omitting those with higher capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin capacity and the item size\n diff = np.abs(bins - item)\n \n # Penalize bins with smaller capacities\n penalty = np.where(diff < 0.5 * item, 0.5 * diff, 0)\n \n # Calculate the score for each bin\n scores = np.exp(-penalty / (0.5 * item))\n \n return scores",
"objective": 0.03059,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity, but only if the bin's capacity exceeds twice the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n # Normalize the scores to ensure they are between 0 and 1\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.03441,
"other_inf": null
},
{
"algorithm": "Prioritizing bins that have less than 20% free capacity and penalizing bins that have more than 60% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of the item's capacity\n penalty = np.where(free_capacity > 0.6 * item, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.03562,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizing bins with less than 20% free capacity and penalizing bins that have more than 30% of the item's capacity while decreasing the penalty term to zero for bins with less than 40% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins that have more than 30% of the item's capacity\n penalty = np.where(free_capacity > 0.3 * item, 1, 0)\n \n # Decrease the penalty term to zero for bins with less than 40% free capacity\n penalty = np.where(free_capacity < 0.4 * bins, 0, penalty)\n \n # Calculate the final score for each bin\n scores = priority + penalty\n \n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Algorithm for minimizing the number of used bins: Prioritize bins that can fit the item leaving less than 20% free capacity, and penalize bins that leave more than 40% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 20% free capacity\n priority_bins = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins that leave more than 40% free capacity\n penalty_bins = np.where(free_capacity > 0.4 * bins, 1, 0)\n \n # Combine the prioritization and penalization scores\n scores = priority_bins + penalty_bins\n \n return scores",
"objective": 0.03582,
"other_inf": null
},
{
"algorithm": "Prioritize bins that can fit the item leaving less than 20% free capacity, and penalizing bins that leave more than 40% free capacity based on the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Prioritize bins that can fit the item leaving less than 20% free capacity\n priority_mask = (free_capacity < 0.2 * bins) & (free_capacity >= 0)\n priority_scores = np.where(priority_mask, 1, 0)\n \n # Penalize bins that leave more than 40% free capacity based on the item size\n penalty_mask = (free_capacity > 0.4 * bins) & (free_capacity <= 0.6 * bins)\n penalty_scores = np.where(penalty_mask, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority_scores + penalty_scores\n \n return scores",
"objective": 0.03592,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 25% free capacity and penalizing bins that have more than 75% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.25 * bins, 1 + (0.25 - free_capacity / bins), 0)\n scores = np.where(free_capacity > 0.75 * bins, 1 - (free_capacity - 0.75 * bins) / bins, scores)\n \n return scores",
"objective": 0.03632,
"other_inf": null
},
{
"algorithm": " Penalize bins with more than 20% excessive capacity and reward bins with more than 65% of their capacity, considering the item's size and the average capacity utilization of all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Penalize bins with more than 20% excess capacity\n penalized_bins = np.where(percent_excess > 20, 0, 1)\n \n # Reward bins with more than 65% of their capacity\n rewarded_bins = np.where(percent_excess > 65, 1, 0)\n \n # Combine the penalties and rewards\n scores = penalized_bins + rewarded_bins\n \n return scores",
"objective": 0.03652,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalizing bins with more than 15% excessive capacity and rewarding bins with more than 75% of their capacity, considering the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the excess capacity of each bin\n excess_capacity = bins - item\n \n # Calculate the percentage of excess capacity for each bin\n percent_excess = excess_capacity / bins * 100\n \n # Reward bins with more than 75% of their capacity\n rewards = np.where(percent_excess > 75, 1, 0)\n \n # Penalize bins with more than 15% excess capacity\n penalties = np.where(percent_excess > 15, -1, 0)\n \n # Combine rewards and penalties to get the final score\n scores = rewards + penalties\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": " Prioritize bins that can fit the item leaving less than 30% free capacity, penalized bins that have more than 30% free capacity, and assign a small bonus to bins that leave less than 10% free capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = bins - item\n \n # Penalize bins with more than 30% free capacity\n penalty = np.where(free_capacity > (bins * 0.3), 0, (bins * 0.3) - free_capacity)\n \n # Bonus for bins with less than 10% free capacity\n bonus = np.where(free_capacity < (bins * 0.1), (bins * 0.1) - free_capacity, 0)\n \n # Calculate the total score for each bin\n scores = penalty + bonus\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New Algorithm: Reduce the favoring threshold for bins with capacities closely matching the item size by a variable amount.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the bin capacities\n diff = np.abs(item - bins)\n \n # Calculate the favoring threshold based on the difference\n fav_thresh = np.minimum(diff / (item + 1), 0.5)\n \n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = 1 - fav_thresh[i]\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 15% free capacity and penalizing bins that have more than 85% of the item's capacity. The penalty is higher if the bin's free capacity is greater than 25%.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the percentage of free capacity for each bin\n percent_free = (free_capacity / bins) * 100\n \n # Penalize bins with more than 85% free capacity\n penalized_bins = np.where(percent_free > 85, 1, 0)\n \n # Calculate the penalty for each bin based on its free capacity\n penalty = np.where(penalized_bins == 1, 100 - percent_free, 0)\n \n # Calculate the score for each bin\n scores = np.where(penalized_bins == 1, penalty, 0) + np.where(percent_free < 15, 100 - percent_free, 0)\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "Prioritize bins with less than 20% free capacity, and penalize bins with more than 60% of their capacity to prefer smaller capacity bins rather than larger ones.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with less than 20% free capacity\n priority = np.where(free_capacity < 0.2 * bins, 1, 0)\n \n # Penalize bins with more than 60% of their capacity\n penalty = np.where(free_capacity > 0.6 * bins, 1, 0)\n \n # Calculate the score for each bin\n scores = (priority + penalty) / (1 + penalty)\n \n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins with less than 10% free capacity and penalizing bins that have more than 50% of the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(0, bins - item)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.1 * bins, 10 * (1 - free_capacity / bins), 0)\n scores += np.where(free_capacity > 0.5 * bins, -5 * (free_capacity / bins - 0.5), 0)\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins that have less than 10% free capacity and penalizing bins that have more than 90% of the item's capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the free capacity of each bin\n free_capacity = np.maximum(bins - item, 0)\n \n # Calculate the score for each bin based on its free capacity\n scores = np.where(free_capacity < 0.1 * bins, 10 * (1 - free_capacity / bins), 0)\n scores += np.where(free_capacity > 0.9 * bins, -10 * (free_capacity / bins - 0.9), 0)\n \n return scores",
"objective": 0.03894,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_1.json
================================================
[
{
"algorithm": "The algorithm calculates the scores for each bin based on the exponential decay of their rest capacities, ensuring optimal bin selection and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the exponential decay of their rest capacities\n scores = np.exp(-bins / (item + 1))\n \n # Ensure that the scores are normalized to sum up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Algorithm 6: Score each bin by subtracting the squared difference between the bin's rest capacity and half of the bin's maximum capacity from the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the squared difference between the bin's rest capacity and half of the bin's maximum capacity\n diff = (bins - item) ** 2\n \n # Subtract the squared difference from the bin's maximum capacity\n scores = bins - diff\n \n # Return the scores for the bins\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates scores inversely proportional to the rest capacities of bins, prioritizing bins with higher remaining capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacities of the bins\n inv_rest_capacities = 1 / (bins - item)\n \n # Prioritize bins with higher remaining capacity\n scores = np.argsort(inv_rest_capacities)\n \n # Return the scores\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "The score function will prioritize bins with higher rest capacity and lower index, while penalizing bins with maximum capacity and fullness level to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Calculate the fullness level of each bin\n fullness_level = (rest_capacity / bins) * 100\n \n # Prioritize bins with higher rest capacity and lower index\n priority = np.argsort(-rest_capacity) + np.argsort(fullness_level)\n \n # Penalize bins with maximum capacity and fullness level\n penalty = np.where(np.logical_and(rest_capacity == bins, fullness_level == 100), 100, 0)\n \n # Calculate the final score for each bin\n scores = priority - penalty\n \n return scores",
"objective": 0.06721,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "The score function will prioritize bins with higher rest capacity, lower index, and a penalty for bins with maximum capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with higher rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize bins with maximum capacity\n penalty = np.where(bins == bins.max(), 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.07023,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using a scoring function that prioritizes bins with smaller rest capacity and closer item size using exponential decay instead of linear decay: scores = np.maximum(bins - item, 0) / (1 + (np.arange(len(bins)) ** 2))",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate scores using a scoring function that prioritizes bins with smaller rest capacity and closer item size using exponential decay instead of linear decay\n scores = np.maximum(bins - item, 0) / (1 + (np.arange(len(bins)) ** 2))\n return scores",
"objective": 0.07375,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the ratio of the bin's remaining capacity to the maximum capacity and the bin's index, and multiply the result by a weight that is inversely proportional to the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the bin's remaining capacity to its maximum capacity\n ratios = (bins - item) / bins\n \n # Multiply the ratio by a weight that is inversely proportional to the bin's index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = ratios * weights\n \n # Return the scores for the bins\n return scores",
"objective": 0.07989,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "New algorithm that calculates the bin score by taking the product of the remaining capacity and item size, and adding a penalty for bins that have been used less.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the score for each bin based on the product of the remaining capacity and item size\n scores = remaining_capacity * item\n \n # Add a penalty for bins that have been used less\n scores -= (bins - item) ** 2\n \n # Return the scores for the bins\n return scores",
"objective": 0.09035,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "Novel algorithm that calculates the bin score by taking the difference between the remaining capacity and the difference between the maximum capacity and the item size, then multiplying the result by a weight that is inversely proportional to the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the remaining capacity and the difference between the maximum capacity and the item size\n diff = np.abs(bins - item)\n \n # Multiply the result by a weight that is inversely proportional to the bin's index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = diff * weights\n \n return scores",
"objective": 0.10746,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_10.json
================================================
[
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the product of the total capacity and the used capacity, and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the total capacity and the used capacity for each bin\n prod_total_used = bins * (bins - item)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / prod_total_used\n \n # Subtract a random factor proportional to the remaining capacity from the score\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - scores)\n \n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Prioritize bins by adding randomness to the product of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the inverse rest capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.02686,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by inverse rest capacity, introducing randomness with a random number sampled from a uniform distribution with a range [0, constant].",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Prioritize smaller bins by their inverse rest capacity, penalize larger bins by a factor proportional to the item's size relative to bin capacity, and introduce a random factor to encourage diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for larger bins\n penalty = np.maximum(0, (item - bins) / bins)\n \n # Calculate the random factor\n random_factor = np.random.rand(len(bins))\n \n # Combine the three factors\n scores = inv_rest_capacity + penalty + random_factor\n \n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "Prioritize bins by multiplying the inverse rest capacity by the item's size and then adding a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random number between 0 and 1 to the inverse rest capacity\n random_component = np.random.uniform(size=len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores for the bins\n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the bin index, introducing randomness, and then taking the logarithm of the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.rand(len(bins))\n scores = inv_rest_capacity + randomness\n \n # Take the logarithm of the scores\n scores = np.log(scores)\n \n return scores",
"objective": 0.02767,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02817,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding a random number between 0 and 1 to the sum of the inverse rest capacity with the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random number between 0 and 1 to the sum of the inverse rest capacity\n # and the bin's capacity\n scores = inv_rest_capacity + np.random.uniform(size=len(bins))\n \n # Return the scores\n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": "New algorithm introduces a configurable parameter alpha that balances between prioritizing remaining capacity (alpha < 1) and randomness (alpha > 1) in the score function: score = (1 - alpha) * inv_rest_capacity + alpha * rand_factor.",
"code": "import numpy as np\n\ndef score(item, bins, alpha=0.5):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random factor for each bin\n rand_factor = np.random.rand(len(bins))\n \n # Calculate the score for each bin using the formula provided\n scores = (1 - alpha) * inv_rest_capacity + alpha * rand_factor\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": "Calculate the score by dividing the inverse rest capacity by the total capacity and introduce randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.rand(len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting inverse rest capacity from total capacity, and introducing randomness to enhance utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to enhance utilization\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": "The backbone idea of the provided algorithms is to combine the inverse rest capacity with a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin. The new algorithm uses a score function that combines a random factor with the number of bins to divide the inverse rest capacity and then adds a constant value to the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to prioritize bins with higher remaining capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Divide by the number of bins to normalize the scores\n scores = inv_rest_capacity / len(bins)\n \n # Add a constant value to the scores to ensure that all bins are considered\n scores += 1\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 0.5.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.uniform(0, 0.5, size=len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.03018,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_11.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the product of the total capacity and the used capacity, and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the total capacity and the used capacity for each bin\n prod_total_used = bins * (bins - item)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / prod_total_used\n \n # Subtract a random factor proportional to the remaining capacity from the score\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - scores)\n \n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Prioritize bins by adding randomness to the product of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the inverse rest capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.02686,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by inverse rest capacity, introducing randomness with a random number sampled from a uniform distribution with a range [0, constant].",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Prioritize smaller bins by their inverse rest capacity, penalize larger bins by a factor proportional to the item's size relative to bin capacity, and introduce a random factor to encourage diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for larger bins\n penalty = np.maximum(0, (item - bins) / bins)\n \n # Calculate the random factor\n random_factor = np.random.rand(len(bins))\n \n # Combine the three factors\n scores = inv_rest_capacity + penalty + random_factor\n \n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "Prioritize bins by multiplying the inverse rest capacity by the item's size and then adding a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random number between 0 and 1 to the inverse rest capacity\n random_component = np.random.uniform(size=len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores for the bins\n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the bin index, introducing randomness, and then taking the logarithm of the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.rand(len(bins))\n scores = inv_rest_capacity + randomness\n \n # Take the logarithm of the scores\n scores = np.log(scores)\n \n return scores",
"objective": 0.02767,
"other_inf": null
},
{
"algorithm": "The backbone idea is to combine the inverse rest capacity with a random factor to create a score for each bin. The new algorithm will prioritize bins with larger inverse rest capacity and add randomness to prevent always choosing the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to the inverse rest capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + random_factor\n \n # Return the scores for each bin\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02817,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding a random number between 0 and 1 to the sum of the inverse rest capacity with the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random number between 0 and 1 to the sum of the inverse rest capacity\n # and the bin's capacity\n scores = inv_rest_capacity + np.random.uniform(size=len(bins))\n \n # Return the scores\n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": "New algorithm introduces a configurable parameter alpha that balances between prioritizing remaining capacity (alpha < 1) and randomness (alpha > 1) in the score function: score = (1 - alpha) * inv_rest_capacity + alpha * rand_factor.",
"code": "import numpy as np\n\ndef score(item, bins, alpha=0.5):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random factor for each bin\n rand_factor = np.random.rand(len(bins))\n \n # Calculate the score for each bin using the formula provided\n scores = (1 - alpha) * inv_rest_capacity + alpha * rand_factor\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": "Calculate the score by dividing the inverse rest capacity by the total capacity and introduce randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.rand(len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02908,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_12.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the product of the total capacity and the used capacity, and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the total capacity and the used capacity for each bin\n prod_total_used = bins * (bins - item)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / prod_total_used\n \n # Subtract a random factor proportional to the remaining capacity from the score\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - scores)\n \n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Prioritize bins by score, which includes the inverse rest capacity and a randomness that is dependent on a feature of the item relative to the bin, and increase the impact of the randomness using an exponential function",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness component for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness components\n scores = inv_rest_capacity + randomness\n \n # Exponential function to amplify the effect of the randomness component\n scores = np.exp(scores)\n \n # Return the scores for each bin\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Prioritize bins by adding randomness to the product of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the inverse rest capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.02686,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by inverse rest capacity, introducing randomness with a random number sampled from a uniform distribution with a range [0, constant].",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Prioritize smaller bins by their inverse rest capacity, penalize larger bins by a factor proportional to the item's size relative to bin capacity, and introduce a random factor to encourage diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for larger bins\n penalty = np.maximum(0, (item - bins) / bins)\n \n # Calculate the random factor\n random_factor = np.random.rand(len(bins))\n \n # Combine the three factors\n scores = inv_rest_capacity + penalty + random_factor\n \n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "Prioritize bins by multiplying the inverse rest capacity by the item's size and then adding a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random number between 0 and 1 to the inverse rest capacity\n random_component = np.random.uniform(size=len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores for the bins\n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the bin index, introducing randomness, and then taking the logarithm of the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.rand(len(bins))\n scores = inv_rest_capacity + randomness\n \n # Take the logarithm of the scores\n scores = np.log(scores)\n \n return scores",
"objective": 0.02767,
"other_inf": null
},
{
"algorithm": "The backbone idea is to combine the inverse rest capacity with a random factor to create a score for each bin. The new algorithm will prioritize bins with larger inverse rest capacity and add randomness to prevent always choosing the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to the inverse rest capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + random_factor\n \n # Return the scores for each bin\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02817,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding a random number between 0 and 1 to the sum of the inverse rest capacity with the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random number between 0 and 1 to the sum of the inverse rest capacity\n # and the bin's capacity\n scores = inv_rest_capacity + np.random.uniform(size=len(bins))\n \n # Return the scores\n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": "New algorithm introduces a configurable parameter alpha that balances between prioritizing remaining capacity (alpha < 1) and randomness (alpha > 1) in the score function: score = (1 - alpha) * inv_rest_capacity + alpha * rand_factor.",
"code": "import numpy as np\n\ndef score(item, bins, alpha=0.5):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random factor for each bin\n rand_factor = np.random.rand(len(bins))\n \n # Calculate the score for each bin using the formula provided\n scores = (1 - alpha) * inv_rest_capacity + alpha * rand_factor\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": "Calculate the score by dividing the inverse rest capacity by the total capacity and introduce randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02898,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_13.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a difference between inverse rest capacity weighted by the item weight and inverse minimum capacity weighted by the bin weight, with a randomness factor that is dependent on the item relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity weighted by the item weight\n inv_rest_capacity = 1 / (bins - item)\n inv_min_capacity = 1 / bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_min_capacity\n \n # Add a randomness factor to the scores\n randomness = np.random.randint(0, 100, size=len(bins))\n scores += randomness\n \n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the product of the total capacity and the used capacity, and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the total capacity and the used capacity for each bin\n prod_total_used = bins * (bins - item)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / prod_total_used\n \n # Subtract a random factor proportional to the remaining capacity from the score\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - scores)\n \n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Prioritize bins by score, which includes the inverse rest capacity and a randomness that is dependent on a feature of the item relative to the bin, and increase the impact of the randomness using an exponential function",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness component for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness components\n scores = inv_rest_capacity + randomness\n \n # Exponential function to amplify the effect of the randomness component\n scores = np.exp(scores)\n \n # Return the scores for each bin\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins by penalized inv_rest_capacity subtracted by the squared inv_rest_capacity multiplied by a random factor dependent on the item's distance to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for each bin based on the item's distance to the bin\n penalty = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity - penalty\n \n # Return the scores for the bins\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by multiplying the square root of the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = np.sqrt(inv_rest_capacity * max_bin_capacity) - np.random.randint(0, item, size=len(bins))\n \n return scores",
"objective": 0.02304,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Prioritizing bins based on a function of their inverse rest capacity, penalizing occupied bins, and adding a random factor proportional to the item's relative size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins == 0, 0, 1e9)\n \n # Add a random factor proportional to the item's relative size\n rand_factor = np.random.randint(1, 10, size=len(bins)) * item\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.02586,
"other_inf": null
},
{
"algorithm": "Prioritize bins by adding randomness to the product of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the inverse rest capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.02686,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by inverse rest capacity, introducing randomness with a random number sampled from a uniform distribution with a range [0, constant].",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Prioritize smaller bins by their inverse rest capacity, penalize larger bins by a factor proportional to the item's size relative to bin capacity, and introduce a random factor to encourage diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for larger bins\n penalty = np.maximum(0, (item - bins) / bins)\n \n # Calculate the random factor\n random_factor = np.random.rand(len(bins))\n \n # Combine the three factors\n scores = inv_rest_capacity + penalty + random_factor\n \n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "Prioritize bins by multiplying the inverse rest capacity by the item's size and then adding a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random number between 0 and 1 to the inverse rest capacity\n random_component = np.random.uniform(size=len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores for the bins\n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the bin index, introducing randomness, and then taking the logarithm of the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.rand(len(bins))\n scores = inv_rest_capacity + randomness\n \n # Take the logarithm of the scores\n scores = np.log(scores)\n \n return scores",
"objective": 0.02767,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_14.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a difference between inverse rest capacity weighted by the item weight and inverse minimum capacity weighted by the bin weight, with a randomness factor that is dependent on the item relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity weighted by the item weight\n inv_rest_capacity = 1 / (bins - item)\n inv_min_capacity = 1 / bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_min_capacity\n \n # Add a randomness factor to the scores\n randomness = np.random.randint(0, 100, size=len(bins))\n scores += randomness\n \n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the product of the total capacity and the used capacity, and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the product of the total capacity and the used capacity for each bin\n prod_total_used = bins * (bins - item)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / prod_total_used\n \n # Subtract a random factor proportional to the remaining capacity from the score\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - scores)\n \n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Prioritize bins by score, which includes the inverse rest capacity and a randomness that is dependent on a feature of the item relative to the bin, and increase the impact of the randomness using an exponential function",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness component for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness components\n scores = inv_rest_capacity + randomness\n \n # Exponential function to amplify the effect of the randomness component\n scores = np.exp(scores)\n \n # Return the scores for each bin\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins by penalized inv_rest_capacity subtracted by the squared inv_rest_capacity multiplied by a random factor dependent on the item's distance to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for each bin based on the item's distance to the bin\n penalty = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity - penalty\n \n # Return the scores for the bins\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by multiplying the square root of the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = np.sqrt(inv_rest_capacity * max_bin_capacity) - np.random.randint(0, item, size=len(bins))\n \n return scores",
"objective": 0.02304,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Prioritizing bins based on a function of their inverse rest capacity, penalizing occupied bins, and adding a random factor proportional to the item's relative size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins == 0, 0, 1e9)\n \n # Add a random factor proportional to the item's relative size\n rand_factor = np.random.randint(1, 10, size=len(bins)) * item\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.02586,
"other_inf": null
},
{
"algorithm": "Prioritize bins by adding randomness to the product of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the inverse rest capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.02686,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by inverse rest capacity, introducing randomness with a random number sampled from a uniform distribution with a range [0, constant].",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Prioritize smaller bins by their inverse rest capacity, penalize larger bins by a factor proportional to the item's size relative to bin capacity, and introduce a random factor to encourage diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for larger bins\n penalty = np.maximum(0, (item - bins) / bins)\n \n # Calculate the random factor\n random_factor = np.random.rand(len(bins))\n \n # Combine the three factors\n scores = inv_rest_capacity + penalty + random_factor\n \n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "Prioritize bins by multiplying the inverse rest capacity by the item's size and then adding a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random number between 0 and 1 to the inverse rest capacity\n random_component = np.random.uniform(size=len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores for the bins\n return scores",
"objective": 0.02717,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by adding randomness to the difference between a random number between 0 and 1 and the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the difference between a random number between 0 and 1 and the inverse rest capacity\n randomness = np.random.uniform(size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02727,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_15.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a difference between inverse rest capacity weighted by the item weight and inverse minimum capacity weighted by the bin weight, with a randomness factor that is dependent on the item relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity weighted by the item weight\n inv_rest_capacity = 1 / (bins - item)\n inv_min_capacity = 1 / bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_min_capacity\n \n # Add a randomness factor to the scores\n randomness = np.random.randint(0, 100, size=len(bins))\n scores += randomness\n \n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted sum of inverse rest capacity, occupancy status, and a random factor proportional to the item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the occupancy status for each bin\n occupancy_status = np.where(bins > item, 1, 0)\n \n # Calculate the random factor for each bin\n random_factor = np.random.randint(0, 100, size=len(bins))\n \n # Weighted sum of inverse rest capacity, occupancy status, and random factor\n scores = inv_rest_capacity * occupancy_status + random_factor\n \n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Prioritize bins by score, which includes the inverse rest capacity and a randomness that is dependent on a feature of the item relative to the bin, and increase the impact of the randomness using an exponential function",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness component for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness components\n scores = inv_rest_capacity + randomness\n \n # Exponential function to amplify the effect of the randomness component\n scores = np.exp(scores)\n \n # Return the scores for each bin\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted sum of inverse rest capacity, occupancy status, and a random factor proportional to the item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the occupancy status for each bin\n occupancy_status = np.where(bins > item, 1, 0)\n \n # Calculate the random factor for each bin\n random_factor = np.random.randint(0, 100, size=len(bins))\n \n # Weight the factors using the learned weights\n weights = np.array([0.5, 0.3, 0.2])\n weighted_factors = np.dot(weights, np.array([inv_rest_capacity, occupancy_status, random_factor]))\n \n # Normalize the weighted factors to get the scores\n scores = weighted_factors / np.sum(weighted_factors)\n \n return scores",
"objective": 0.02103,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the inverse maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum bin capacity\n inv_rest_capacity = 1 / (bins - item)\n inv_max_bin_capacity = 1 / bins.max()\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n scores -= np.random.randint(0, 100, size=len(bins)) * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.02113,
"other_inf": null
},
{
"algorithm": "Prioritize bins by penalized inv_rest_capacity subtracted by the squared inv_rest_capacity multiplied by a random factor dependent on the item's distance to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for each bin based on the item's distance to the bin\n penalty = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity - penalty\n \n # Return the scores for the bins\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "Score function prioritizing bins by inverse rest capacity with a randomness factor adjusted based on the difference between the item and bin sizes.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor to the scores\n randomness = np.random.randint(0, 100, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02214,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by multiplying the square root of the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = np.sqrt(inv_rest_capacity * max_bin_capacity) - np.random.randint(0, item, size=len(bins))\n \n return scores",
"objective": 0.02304,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Prioritizing bins based on a function of their inverse rest capacity, penalizing occupied bins, and adding a random factor proportional to the item's relative size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins == 0, 0, 1e9)\n \n # Add a random factor proportional to the item's relative size\n rand_factor = np.random.randint(1, 10, size=len(bins)) * item\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.02586,
"other_inf": null
},
{
"algorithm": "Prioritize bins by adding randomness to the product of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the inverse rest capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.02686,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by inverse rest capacity, introducing randomness with a random number sampled from a uniform distribution with a range [0, constant].",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_16.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and compensate for small item sizes relative to bin maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n occupied_penalty = np.where(bins == 0, 0, 1e9)\n \n # Compensate for small item sizes relative to bin maximum capacities\n small_item_compensation = np.where(item < 0.5 * bins, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + occupied_penalty + small_item_compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a difference between inverse rest capacity weighted by the item weight and inverse minimum capacity weighted by the bin weight, with a randomness factor that is dependent on the item relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity weighted by the item weight\n inv_rest_capacity = 1 / (bins - item)\n inv_min_capacity = 1 / bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_min_capacity\n \n # Add a randomness factor to the scores\n randomness = np.random.randint(0, 100, size=len(bins))\n scores += randomness\n \n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Prioritize bins by score, which includes the inverse rest capacity and a randomness that is dependent on a feature of the item relative to the bin, and increase the impact of the randomness using an exponential function",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness component for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness components\n scores = inv_rest_capacity + randomness\n \n # Exponential function to amplify the effect of the randomness component\n scores = np.exp(scores)\n \n # Return the scores for each bin\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted sum of inverse rest capacity, occupancy status, and a random factor proportional to the item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the occupancy status for each bin\n occupancy_status = np.where(bins > item, 1, 0)\n \n # Calculate the random factor for each bin\n random_factor = np.random.randint(0, 100, size=len(bins))\n \n # Weight the factors using the learned weights\n weights = np.array([0.5, 0.3, 0.2])\n weighted_factors = np.dot(weights, np.array([inv_rest_capacity, occupancy_status, random_factor]))\n \n # Normalize the weighted factors to get the scores\n scores = weighted_factors / np.sum(weighted_factors)\n \n return scores",
"objective": 0.02103,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the inverse maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum bin capacity\n inv_rest_capacity = 1 / (bins - item)\n inv_max_bin_capacity = 1 / bins.max()\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n scores -= np.random.randint(0, 100, size=len(bins)) * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.02113,
"other_inf": null
},
{
"algorithm": "Algorithm: Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on the bin's size relative to the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness factors\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02123,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the difference between the item's features and the bin's features.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + rand_factor\n \n # Return the scores\n return scores",
"objective": 0.02153,
"other_inf": null
},
{
"algorithm": "Prioritize bins by penalized inv_rest_capacity subtracted by the squared inv_rest_capacity multiplied by a random factor dependent on the item's distance to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for each bin based on the item's distance to the bin\n penalty = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity - penalty\n \n # Return the scores for the bins\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the maximum capacity of the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness factors\n scores = inv_rest_capacity + randomness\n \n # Return the scores for each bin\n return scores",
"objective": 0.02183,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_17.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins based on their inverse rest capacity, penalizes occupied bins but less than the previous algorithm, and compensates for small item sizes relative to bin maximum capacities but more than the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins\n penalty = np.where(bins == 0, 0, 1)\n \n # Compensate for small item sizes relative to bin maximum capacities\n compensation = np.where(item < bins * 0.5, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a difference between inverse rest capacity weighted by the item weight and inverse minimum capacity weighted by the bin weight, with a randomness factor that is dependent on the item relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity weighted by the item weight\n inv_rest_capacity = 1 / (bins - item)\n inv_min_capacity = 1 / bins\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_min_capacity\n \n # Add a randomness factor to the scores\n randomness = np.random.randint(0, 100, size=len(bins))\n scores += randomness\n \n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Prioritize bins by score, which includes the inverse rest capacity and a randomness that is dependent on a feature of the item relative to the bin, and increase the impact of the randomness using an exponential function",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness component for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness components\n scores = inv_rest_capacity + randomness\n \n # Exponential function to amplify the effect of the randomness component\n scores = np.exp(scores)\n \n # Return the scores for each bin\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "{New algorithm: Prioritizes bins based on their inverse rest capacity, penalizes occupied bins, and compensates for small item sizes relative to bin maximum capacities differently.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n occupied_penalty = 100 * (bins == 0)\n \n # Compensate for small item sizes relative to bin maximum capacities\n small_item_compensation = 0.5 * (item < 0.5 * bins)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + occupied_penalty + small_item_compensation\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted sum of inverse rest capacity, occupancy status, and a random factor proportional to the item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the occupancy status for each bin\n occupancy_status = np.where(bins > item, 1, 0)\n \n # Calculate the random factor for each bin\n random_factor = np.random.randint(0, 100, size=len(bins))\n \n # Weight the factors using the learned weights\n weights = np.array([0.5, 0.3, 0.2])\n weighted_factors = np.dot(weights, np.array([inv_rest_capacity, occupancy_status, random_factor]))\n \n # Normalize the weighted factors to get the scores\n scores = weighted_factors / np.sum(weighted_factors)\n \n return scores",
"objective": 0.02103,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the inverse maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum bin capacity\n inv_rest_capacity = 1 / (bins - item)\n inv_max_bin_capacity = 1 / bins.max()\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n scores -= np.random.randint(0, 100, size=len(bins)) * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.02113,
"other_inf": null
},
{
"algorithm": "Algorithm: Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on the bin's size relative to the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness factors\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02123,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the difference between the item's features and the bin's features.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + rand_factor\n \n # Return the scores\n return scores",
"objective": 0.02153,
"other_inf": null
},
{
"algorithm": "Prioritize bins by penalized inv_rest_capacity subtracted by the squared inv_rest_capacity multiplied by a random factor dependent on the item's distance to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for each bin based on the item's distance to the bin\n penalty = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity - penalty\n \n # Return the scores for the bins\n return scores",
"objective": 0.02163,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_18.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins based on their inverse rest capacity, penalizes occupied bins but less than the previous algorithm, and compensates for small item sizes relative to bin maximum capacities but more than the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins\n penalty = np.where(bins == 0, 0, 1)\n \n # Compensate for small item sizes relative to bin maximum capacities\n compensation = np.where(item < bins * 0.5, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting a randomized term that is a product of the item size and the inverse of the bin size from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Subtract the randomized term from the inverse rest capacity\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Prioritize bins by score, which includes the inverse rest capacity and a randomness that is dependent on a feature of the item relative to the bin, and increase the impact of the randomness using an exponential function",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness component for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness components\n scores = inv_rest_capacity + randomness\n \n # Exponential function to amplify the effect of the randomness component\n scores = np.exp(scores)\n \n # Return the scores for each bin\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "{New algorithm: Prioritizes bins based on their inverse rest capacity, penalizes occupied bins, and compensates for small item sizes relative to bin maximum capacities differently.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n occupied_penalty = 100 * (bins == 0)\n \n # Compensate for small item sizes relative to bin maximum capacities\n small_item_compensation = 0.5 * (item < 0.5 * bins)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + occupied_penalty + small_item_compensation\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Divide the inverse rest capacity by a function of the item size and the maximum capacity, then add a randomized term that is dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the final score\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted sum of inverse rest capacity, occupancy status, and a random factor proportional to the item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the occupancy status for each bin\n occupancy_status = np.where(bins > item, 1, 0)\n \n # Calculate the random factor for each bin\n random_factor = np.random.randint(0, 100, size=len(bins))\n \n # Weight the factors using the learned weights\n weights = np.array([0.5, 0.3, 0.2])\n weighted_factors = np.dot(weights, np.array([inv_rest_capacity, occupancy_status, random_factor]))\n \n # Normalize the weighted factors to get the scores\n scores = weighted_factors / np.sum(weighted_factors)\n \n return scores",
"objective": 0.02103,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the inverse maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum bin capacity\n inv_rest_capacity = 1 / (bins - item)\n inv_max_bin_capacity = 1 / bins.max()\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n scores -= np.random.randint(0, 100, size=len(bins)) * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.02113,
"other_inf": null
},
{
"algorithm": "Algorithm: Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on the bin's size relative to the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness factors\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02123,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor inversely proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, inv_rest_capacity - 1)\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.02143,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_19.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins based on their inverse rest capacity, penalizes occupied bins but less than the previous algorithm, and compensates for small item sizes relative to bin maximum capacities but more than the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins\n penalty = np.where(bins == 0, 0, 1)\n \n # Compensate for small item sizes relative to bin maximum capacities\n compensation = np.where(item < bins * 0.5, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting a randomized term that is a product of the item size and the inverse of the bin size from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Subtract the randomized term from the inverse rest capacity\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Prioritize bins by score, which includes the inverse rest capacity and a randomness that is dependent on a feature of the item relative to the bin, and increase the impact of the randomness using an exponential function",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness component for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness components\n scores = inv_rest_capacity + randomness\n \n # Exponential function to amplify the effect of the randomness component\n scores = np.exp(scores)\n \n # Return the scores for each bin\n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins inversely proportional to their available capacity, penalizes occupied bins, and accommodates small items through a constant relative to bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the available capacity for each bin\n inv_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a constant value\n penalty = np.where(bins > 0, 1, 0) * 10\n \n # Accommodate small items by adding a constant relative to bin size\n small_item_bonus = np.where(item < 0.5 * bins, 1, 0) * 0.5\n \n # Calculate the final score for each bin\n scores = inv_capacity + penalty + small_item_bonus\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Divide the inverse rest capacity by a function of the item size and the maximum capacity, then add a randomized term that is dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the final score\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted sum of inverse rest capacity, occupancy status, and a random factor proportional to the item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the occupancy status for each bin\n occupancy_status = np.where(bins > item, 1, 0)\n \n # Calculate the random factor for each bin\n random_factor = np.random.randint(0, 100, size=len(bins))\n \n # Weight the factors using the learned weights\n weights = np.array([0.5, 0.3, 0.2])\n weighted_factors = np.dot(weights, np.array([inv_rest_capacity, occupancy_status, random_factor]))\n \n # Normalize the weighted factors to get the scores\n scores = weighted_factors / np.sum(weighted_factors)\n \n return scores",
"objective": 0.02103,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the inverse maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum bin capacity\n inv_rest_capacity = 1 / (bins - item)\n inv_max_bin_capacity = 1 / bins.max()\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n scores -= np.random.randint(0, 100, size=len(bins)) * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.02113,
"other_inf": null
},
{
"algorithm": "Algorithm: Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on the bin's size relative to the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness factors\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02123,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor inversely proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, inv_rest_capacity - 1)\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.02143,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_2.json
================================================
[
{
"algorithm": "Modified algorithm: Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item. Then, multiply the scores by a weight that is inversely proportional to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.minimum(bins, item) * (1 / bins)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Algorithm 6: Score each bin by subtracting the squared difference between the bin's rest capacity and half of the bin's maximum capacity from the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the squared difference between the bin's rest capacity and half of the bin's maximum capacity\n diff = (bins - item) ** 2\n \n # Subtract the squared difference from the bin's maximum capacity\n scores = bins - diff\n \n # Return the scores for the bins\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates scores inversely proportional to the rest capacities of bins, prioritizing bins with higher remaining capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacities of the bins\n inv_rest_capacities = 1 / (bins - item)\n \n # Prioritize bins with higher remaining capacity\n scores = np.argsort(inv_rest_capacities)\n \n # Return the scores\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores based on a weighted combination of the normalized available capacity and the inverse of the bin index, prioritizing bins with higher normalized capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the available capacity of each bin\n norm_capacity = bins / np.max(bins)\n \n # Calculate the inverse of the bin index\n inv_index = 1 / (np.arange(len(bins)) + 1)\n \n # Weighted combination of normalized available capacity and inverse of bin index\n scores = norm_capacity * inv_index\n \n # Return the scores for each bin\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "Prioritize bins with low fullness level, then high remaining capacity. Penalize bins with high fullness level, then zero remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the fullness level of each bin\n fullness = (bins - item) / bins\n \n # Prioritize bins with low fullness level\n priority_score = 1 - fullness\n \n # Penalize bins with high fullness level\n penalty_score = fullness ** 2\n \n # Combine the priority and penalty scores\n scores = priority_score + penalty_score\n \n # Normalize the scores to ensure they are between 0 and 1\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The score function prioritizes bins with higher remaining capacity and lower fullness level, while penalizing bins with maximum capacity and high fullness level to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity and fullness level for each bin\n remaining_capacity = bins - item\n fullness_level = (bins - remaining_capacity) / bins\n \n # Prioritize bins with higher remaining capacity and lower fullness level\n priority = np.where(remaining_capacity > 0, remaining_capacity, 0) + \\\n np.where(fullness_level < 1, 1 - fullness_level, 0)\n \n # Penalize bins with maximum capacity and high fullness level\n penalty = np.where(bins == max(bins), 1, 0) + \\\n np.where(fullness_level >= 0.5, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.05544,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity and bin index, prioritizing bins with higher rest capacity and assigning a reasonable penalty for bins with a high index to encourage using fewer bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on a combination of rest capacity and bin index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (i + 1)\n else:\n scores[i] = 0\n \n # Penalize bins with high indices to encourage using fewer bins\n penalties = np.arange(len(bins)) ** 2\n scores -= penalties\n \n return scores",
"objective": 0.06027,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins with smaller index and lower fullness level, penalizing bins with higher fullness level and maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the fullness level of each bin\n fullness = (bins - item) / bins\n \n # Penalize bins with high fullness levels\n penalty = np.maximum(0, fullness - 0.5) ** 2\n \n # Prioritize bins with smaller indices and lower fullness levels\n priority = np.minimum(fullness, 0.5) + np.arange(len(bins)) * 0.1\n \n # Calculate the score for each bin\n scores = priority - penalty\n \n return scores",
"objective": 0.06329,
"other_inf": null
},
{
"algorithm": "The score function will prioritize bins with higher rest capacity and lower index, while penalizing bins with maximum capacity and fullness level to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Calculate the fullness level of each bin\n fullness_level = (rest_capacity / bins) * 100\n \n # Prioritize bins with higher rest capacity and lower index\n priority = np.argsort(-rest_capacity) + np.argsort(fullness_level)\n \n # Penalize bins with maximum capacity and fullness level\n penalty = np.where(np.logical_and(rest_capacity == bins, fullness_level == 100), 100, 0)\n \n # Calculate the final score for each bin\n scores = priority - penalty\n \n return scores",
"objective": 0.06721,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "The score function will prioritize bins with higher rest capacity, lower index, and a penalty for bins with maximum capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = np.maximum(0, bins - item)\n \n # Prioritize bins with higher rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize bins with maximum capacity\n penalty = np.where(bins == bins.max(), 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.07023,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using a scoring function that prioritizes bins with smaller rest capacity and closer item size using exponential decay instead of linear decay: scores = np.maximum(bins - item, 0) / (1 + (np.arange(len(bins)) ** 2))",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate scores using a scoring function that prioritizes bins with smaller rest capacity and closer item size using exponential decay instead of linear decay\n scores = np.maximum(bins - item, 0) / (1 + (np.arange(len(bins)) ** 2))\n return scores",
"objective": 0.07375,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the ratio of the bin's remaining capacity to the maximum capacity and the bin's index, and multiply the result by a weight that is inversely proportional to the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the bin's remaining capacity to its maximum capacity\n ratios = (bins - item) / bins\n \n # Multiply the ratio by a weight that is inversely proportional to the bin's index\n weights = 1 / (np.arange(len(bins)) + 1)\n scores = ratios * weights\n \n # Return the scores for the bins\n return scores",
"objective": 0.07989,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_20.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins based on their inverse rest capacity, penalizes occupied bins but less than the previous algorithm, and compensates for small item sizes relative to bin maximum capacities but more than the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins\n penalty = np.where(bins == 0, 0, 1)\n \n # Compensate for small item sizes relative to bin maximum capacities\n compensation = np.where(item < bins * 0.5, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting a randomized term that is a product of the item size and the inverse of the bin size from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Subtract the randomized term from the inverse rest capacity\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a logarithm of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=inv_rest_capacity.shape)\n inv_rest_capacity += rand_term\n \n # Take the logarithm of the sum of both terms\n scores = np.log(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins inversely proportional to their available capacity, penalizes occupied bins, and accommodates small items through a constant relative to bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the available capacity for each bin\n inv_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a constant value\n penalty = np.where(bins > 0, 1, 0) * 10\n \n # Accommodate small items by adding a constant relative to bin size\n small_item_bonus = np.where(item < 0.5 * bins, 1, 0) * 0.5\n \n # Calculate the final score for each bin\n scores = inv_capacity + penalty + small_item_bonus\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Divide the inverse rest capacity by a function of the item size and the maximum capacity, then add a randomized term that is dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the final score\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted sum of inverse rest capacity, occupancy status, and a random factor proportional to the item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the occupancy status for each bin\n occupancy_status = np.where(bins > item, 1, 0)\n \n # Calculate the random factor for each bin\n random_factor = np.random.randint(0, 100, size=len(bins))\n \n # Weight the factors using the learned weights\n weights = np.array([0.5, 0.3, 0.2])\n weighted_factors = np.dot(weights, np.array([inv_rest_capacity, occupancy_status, random_factor]))\n \n # Normalize the weighted factors to get the scores\n scores = weighted_factors / np.sum(weighted_factors)\n \n return scores",
"objective": 0.02103,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the inverse maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum bin capacity\n inv_rest_capacity = 1 / (bins - item)\n inv_max_bin_capacity = 1 / bins.max()\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * inv_max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n scores -= np.random.randint(0, 100, size=len(bins)) * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.02113,
"other_inf": null
},
{
"algorithm": "Algorithm: Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on the bin's size relative to the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the inverse rest capacity and randomness factors\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02123,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor inversely proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, inv_rest_capacity - 1)\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.02143,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_21.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a sine of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Take the sine of the sum of both terms\n scores = np.sin(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum additive of the inverse rest capacity and the subtracted a random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, item, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins based on their inverse rest capacity, penalizes occupied bins but less than the previous algorithm, and compensates for small item sizes relative to bin maximum capacities but more than the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins\n penalty = np.where(bins == 0, 0, 1)\n \n # Compensate for small item sizes relative to bin maximum capacities\n compensation = np.where(item < bins * 0.5, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting a randomized term that is a product of the item size and the inverse of the bin size from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Subtract the randomized term from the inverse rest capacity\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a logarithm of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=inv_rest_capacity.shape)\n inv_rest_capacity += rand_term\n \n # Take the logarithm of the sum of both terms\n scores = np.log(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins inversely proportional to their available capacity, penalizes occupied bins, and accommodates small items through a constant relative to bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the available capacity for each bin\n inv_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a constant value\n penalty = np.where(bins > 0, 1, 0) * 10\n \n # Accommodate small items by adding a constant relative to bin size\n small_item_bonus = np.where(item < 0.5 * bins, 1, 0) * 0.5\n \n # Calculate the final score for each bin\n scores = inv_capacity + penalty + small_item_bonus\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Divide the inverse rest capacity by a function of the item size and the maximum capacity, then add a randomized term that is dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the final score\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted sum of inverse rest capacity, occupancy status, and a random factor proportional to the item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the occupancy status for each bin\n occupancy_status = np.where(bins > item, 1, 0)\n \n # Calculate the random factor for each bin\n random_factor = np.random.randint(0, 100, size=len(bins))\n \n # Weight the factors using the learned weights\n weights = np.array([0.5, 0.3, 0.2])\n weighted_factors = np.dot(weights, np.array([inv_rest_capacity, occupancy_status, random_factor]))\n \n # Normalize the weighted factors to get the scores\n scores = weighted_factors / np.sum(weighted_factors)\n \n return scores",
"objective": 0.02103,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on the minimum of the inverse of the rest capacity minus a random factor proportional to the item size and the maximum bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity - rand_factor * item\n \n # Return the scores\n return scores",
"objective": 0.02113,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_22.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a sine of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Take the sine of the sum of both terms\n scores = np.sin(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum additive of the inverse rest capacity and the subtracted a random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, item, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins based on their inverse rest capacity, penalizes occupied bins but less than the previous algorithm, and compensates for small item sizes relative to bin maximum capacities but more than the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins\n penalty = np.where(bins == 0, 0, 1)\n \n # Compensate for small item sizes relative to bin maximum capacities\n compensation = np.where(item < bins * 0.5, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a score that is a product of the inverse rest capacity and the inverse of the maximum capacity of the bin, then add a random term that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n inv_max_capacity = 1 / bins\n \n # Calculate the random term\n rand_term = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * inv_max_capacity + rand_term\n \n return scores",
"objective": 0.01972,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting a randomized term that is a product of the item size and the inverse of the bin size from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Subtract the randomized term from the inverse rest capacity\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a logarithm of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=inv_rest_capacity.shape)\n inv_rest_capacity += rand_term\n \n # Take the logarithm of the sum of both terms\n scores = np.log(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins inversely proportional to their available capacity, penalizes occupied bins, and accommodates small items through a constant relative to bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the available capacity for each bin\n inv_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a constant value\n penalty = np.where(bins > 0, 1, 0) * 10\n \n # Accommodate small items by adding a constant relative to bin size\n small_item_bonus = np.where(item < 0.5 * bins, 1, 0) * 0.5\n \n # Calculate the final score for each bin\n scores = inv_capacity + penalty + small_item_bonus\n \n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Divide the inverse rest capacity by a function of the item size and the maximum capacity, then add a randomized term that is dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the final score\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the highest score calculated by the ratio of bin capacity minus item size to the square of their difference, minus a random factor proportional to the item size if the rest capacity is smaller than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (bin - item) ** 2\n else:\n scores[i] = 0\n \n # Add a random factor to the scores\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores += rand_factor * (item - bin)\n \n return scores",
"objective": 0.02093,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a weighted sum of inverse rest capacity, occupancy status, and a random factor proportional to the item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the occupancy status for each bin\n occupancy_status = np.where(bins > item, 1, 0)\n \n # Calculate the random factor for each bin\n random_factor = np.random.randint(0, 100, size=len(bins))\n \n # Weight the factors using the learned weights\n weights = np.array([0.5, 0.3, 0.2])\n weighted_factors = np.dot(weights, np.array([inv_rest_capacity, occupancy_status, random_factor]))\n \n # Normalize the weighted factors to get the scores\n scores = weighted_factors / np.sum(weighted_factors)\n \n return scores",
"objective": 0.02103,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_23.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a sine of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Take the sine of the sum of both terms\n scores = np.sin(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum difference between the inverse rest capacity multiplied by the item size and the subtracted random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity multiplied by the item size\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the subtracted random term dependent on both the item size and the remaining capacity\n rand_term = np.random.randint(0, item, size=len(bins)) * (bins - item)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * rand_term\n \n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum additive of the inverse rest capacity and the subtracted a random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, item, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins based on their inverse rest capacity, penalizes occupied bins but less than the previous algorithm, and compensates for small item sizes relative to bin maximum capacities but more than the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins\n penalty = np.where(bins == 0, 0, 1)\n \n # Compensate for small item sizes relative to bin maximum capacities\n compensation = np.where(item < bins * 0.5, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum of the subtracted inverse rest capacity and the multiplied a random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their inverse rest capacity, penalize occupied bins, and introduce a random factor proportional to the item's size relative to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a large value\n penalty = np.where(bins > item, 0, 1e9)\n \n # Introduce a random factor proportional to the item's size relative to the bin's maximum capacity\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + rand_factor\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a score that is a product of the inverse rest capacity and the inverse of the maximum capacity of the bin, then add a random term that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n inv_max_capacity = 1 / bins\n \n # Calculate the random term\n rand_term = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * inv_max_capacity + rand_term\n \n return scores",
"objective": 0.01972,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting a randomized term that is a product of the item size and the inverse of the bin size from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Subtract the randomized term from the inverse rest capacity\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign the item to the bin with the maximum of the subtracted inverse rest capacity and the multiplied random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, 100, size=len(bins)) * item\n \n # Calculate the score for each bin\n scores = inv_rest_capacity + rand_term\n \n # Return the scores\n return scores",
"objective": 0.02032,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a logarithm of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=inv_rest_capacity.shape)\n inv_rest_capacity += rand_term\n \n # Take the logarithm of the sum of both terms\n scores = np.log(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "`Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is dependent on a feature of the item relative to the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomness factor based on the item's size\n randomness = np.random.randint(0, 100, size=len(bins))\n randomness = randomness * (inv_rest_capacity > 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02063,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins inversely proportional to their available capacity, penalizes occupied bins, and accommodates small items through a constant relative to bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the available capacity for each bin\n inv_capacity = 1 / (bins - item)\n \n # Penalize occupied bins by subtracting a constant value\n penalty = np.where(bins > 0, 1, 0) * 10\n \n # Accommodate small items by adding a constant relative to bin size\n small_item_bonus = np.where(item < 0.5 * bins, 1, 0) * 0.5\n \n # Calculate the final score for each bin\n scores = inv_capacity + penalty + small_item_bonus\n \n return scores",
"objective": 0.02073,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_24.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a sine of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Take the sine of the sum of both terms\n scores = np.sin(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum difference between the inverse rest capacity multiplied by the item size and the subtracted random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity multiplied by the item size\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the subtracted random term dependent on both the item size and the remaining capacity\n rand_term = np.random.randint(0, item, size=len(bins)) * (bins - item)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * rand_term\n \n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum additive of the inverse rest capacity and the subtracted a random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, item, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum score calculated by subtracting a random term dependent on both the item size and the absolute difference between the item size and the remaining capacity from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, item, size=len(bins))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity - rand_term\n \n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins based on their inverse rest capacity, penalizes occupied bins but less than the previous algorithm, and compensates for small item sizes relative to bin maximum capacities but more than the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins\n penalty = np.where(bins == 0, 0, 1)\n \n # Compensate for small item sizes relative to bin maximum capacities\n compensation = np.where(item < bins * 0.5, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum of the subtracted inverse rest capacity and the multiplied a random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on the inverse of their remaining capacity and introduce a random factor proportional to both the item size and the bin's maximum capacity, while penalizing occupied bins using a multiplicative and subtractive approach.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity for each bin\n inv_capacity = 1 / (bins - item)\n \n # Calculate the random factor for each bin\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the penalty for occupied bins\n occupied_penalty = np.where(bins > 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = inv_capacity + rand_factor + occupied_penalty\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a score that is a product of the inverse rest capacity and the inverse of the maximum capacity of the bin, then add a random term that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n inv_max_capacity = 1 / bins\n \n # Calculate the random term\n rand_term = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * inv_max_capacity + rand_term\n \n return scores",
"objective": 0.01972,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting a randomized term that is a product of the item size and the inverse of the bin size from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Subtract the randomized term from the inverse rest capacity\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "{Prioritize bins by the product of the inverse rest capacity raised to a power and a randomized term based on the item's size relative to the bin's maximum capacity}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term based on the item's size relative to the bin's maximum capacity\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity ** 2 + rand_term\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign the item to the bin with the maximum of the subtracted inverse rest capacity and the multiplied random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, 100, size=len(bins)) * item\n \n # Calculate the score for each bin\n scores = inv_rest_capacity + rand_term\n \n # Return the scores\n return scores",
"objective": 0.02032,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a logarithm of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=inv_rest_capacity.shape)\n inv_rest_capacity += rand_term\n \n # Take the logarithm of the sum of both terms\n scores = np.log(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum of the subtracted inverse rest capacity and the multiplied a random term dependent on only the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term dependent on the item size\n rand_term = np.random.randint(0, 100, size=len(bins)) * item\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + rand_term\n \n # Return the scores\n return scores",
"objective": 0.02053,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_25.json
================================================
[
{
"algorithm": "Prioritize bins by a count of a function of inverse rest capacity, corrected by a random factor that is dependent on a feature of the item relative to the bin, with a penalty applied to bins whose inverse rest capacity is close to 0.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Apply a random factor to the inverse rest capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n inv_rest_capacity *= rand_factor\n \n # Penalize bins with low inverse rest capacity\n penalized_inv_rest_capacity = np.where(inv_rest_capacity < 0.5, inv_rest_capacity * 0.5, inv_rest_capacity)\n \n # Calculate the final score for each bin\n scores = penalized_inv_rest_capacity + (1 - penalized_inv_rest_capacity) * np.log(penalized_inv_rest_capacity)\n \n return scores",
"objective": 0.00765,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a sine of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Take the sine of the sum of both terms\n scores = np.sin(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum difference between the inverse rest capacity multiplied by the item size and the subtracted random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity multiplied by the item size\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the subtracted random term dependent on both the item size and the remaining capacity\n rand_term = np.random.randint(0, item, size=len(bins)) * (bins - item)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * rand_term\n \n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum additive of the inverse rest capacity and the subtracted a random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, item, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + rand_term\n \n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "Use the product of the inverse rest capacity and the logarithm of the item size, then deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity and the logarithm of the item size\n scores = (1 / (bins - item)) * np.log(item)\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape[0])\n \n return scores",
"objective": 0.0158,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the minimum score calculated by subtracting a random term dependent on both the item size and the absolute difference between the item size and the remaining capacity from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, item, size=len(bins))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity - rand_term\n \n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "Use the square root of the inverse rest capacity divided by the maximum capacity and deduct a randomized term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the inverse rest capacity divided by the maximum capacity\n scores = np.sqrt(1 / (bins - item))\n \n # Deduct a randomized term dependent on both the item size and the remaining capacity\n scores -= np.random.randint(0, item, size=bins.shape) * (bins - item)\n \n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Calculate the inverse rest capacity of each bin and penalize smaller bins, while introducing a random factor proportional to both the item's size and the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize smaller bins by adding a random factor\n random_factor = np.random.randint(0, item, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Normalize the scores\n scores = inv_rest_capacity / np.sum(inv_rest_capacity)\n \n return scores",
"objective": 0.017,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes bins based on their inverse rest capacity, penalizes occupied bins but less than the previous algorithm, and compensates for small item sizes relative to bin maximum capacities but more than the previous algorithm.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize occupied bins\n penalty = np.where(bins == 0, 0, 1)\n \n # Compensate for small item sizes relative to bin maximum capacities\n compensation = np.where(item < bins * 0.5, 1, 0)\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + penalty + compensation\n \n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum of the subtracted inverse rest capacity and the multiplied a random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on the inverse of their remaining capacity and introduce a random factor proportional to both the item size and the bin's maximum capacity, while penalizing occupied bins using a multiplicative and subtractive approach.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity for each bin\n inv_capacity = 1 / (bins - item)\n \n # Calculate the random factor for each bin\n rand_factor = np.random.randint(0, 100, size=len(bins)) * (item + 1)\n \n # Calculate the penalty for occupied bins\n occupied_penalty = np.where(bins > 0, 1, 0)\n \n # Calculate the total score for each bin\n scores = inv_capacity + rand_factor + occupied_penalty\n \n return scores",
"objective": 0.01962,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a score that is a product of the inverse rest capacity and the inverse of the maximum capacity of the bin, then add a random term that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and inverse maximum capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n inv_max_capacity = 1 / bins\n \n # Calculate the random term\n rand_term = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * inv_max_capacity + rand_term\n \n return scores",
"objective": 0.01972,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the highest score calculated by dividing the inverse rest capacity by the maximum bin capacity and subtracting a random factor proportional to the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the maximum bin capacity\n max_bin_capacity = np.max(bins)\n \n # Calculate the score for each bin\n scores = inv_rest_capacity / max_bin_capacity\n \n # Subtract a random factor proportional to the remaining capacity\n rand_factor = np.random.randint(0, 100, size=len(bins))\n scores -= rand_factor * (1 - inv_rest_capacity)\n \n return scores",
"objective": 0.01982,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting a randomized term that is a product of the item size and the inverse of the bin size from the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term\n rand_term = np.random.randint(0, 100, size=len(bins)) * inv_rest_capacity\n \n # Subtract the randomized term from the inverse rest capacity\n scores = inv_rest_capacity - rand_term\n \n # Return the scores\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins by a score that is a function of inverse rest capacity, with a randomness factor that is proportional to the sum of the item's features relative to the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomness factor for each bin\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02012,
"other_inf": null
},
{
"algorithm": "{Prioritize bins by the product of the inverse rest capacity raised to a power and a randomized term based on the item's size relative to the bin's maximum capacity}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the randomized term based on the item's size relative to the bin's maximum capacity\n rand_term = np.random.randint(0, 100, size=len(bins)) * (item / bins.max())\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity ** 2 + rand_term\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign the item to the bin with the maximum of the subtracted inverse rest capacity and the multiplied random term dependent on both the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term for each bin\n rand_term = np.random.randint(0, 100, size=len(bins)) * item\n \n # Calculate the score for each bin\n scores = inv_rest_capacity + rand_term\n \n # Return the scores\n return scores",
"objective": 0.02032,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the inverse rest capacity by the item size, add a randomized term based on the inverse remaining capacity, and take a logarithm of the sum of both terms.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a randomized term based on the inverse remaining capacity\n rand_term = np.random.randint(0, 100, size=inv_rest_capacity.shape)\n inv_rest_capacity += rand_term\n \n # Take the logarithm of the sum of both terms\n scores = np.log(inv_rest_capacity + rand_term)\n \n return scores",
"objective": 0.02042,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum of the subtracted inverse rest capacity and the multiplied a random term dependent on only the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random term dependent on the item size\n rand_term = np.random.randint(0, 100, size=len(bins)) * item\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + rand_term\n \n # Return the scores\n return scores",
"objective": 0.02053,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_3.json
================================================
[
{
"algorithm": "Modified algorithm uses a score function that combines inverse rest capacity and a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to introduce randomness\n random_factor = np.random.rand(len(bins))\n \n # Combine the inverse rest capacity and random factor\n scores = inv_rest_capacity + random_factor\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item. Then, multiply the scores by a weight that is inversely proportional to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.minimum(bins, item) * (1 / bins)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Algorithm 6: Score each bin by subtracting the squared difference between the bin's rest capacity and half of the bin's maximum capacity from the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the squared difference between the bin's rest capacity and half of the bin's maximum capacity\n diff = (bins - item) ** 2\n \n # Subtract the squared difference from the bin's maximum capacity\n scores = bins - diff\n \n # Return the scores for the bins\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Prioritize bins with high remaining capacity, then low fullness level. Penalize bins with zero remaining capacity, then high fullness level.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with high remaining capacity\n priority = np.argsort(-remaining_capacity)\n \n # Penalize bins with zero remaining capacity\n penalty = np.where(remaining_capacity == 0, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates scores inversely proportional to the rest capacities of bins, prioritizing bins with higher remaining capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacities of the bins\n inv_rest_capacities = 1 / (bins - item)\n \n # Prioritize bins with higher remaining capacity\n scores = np.argsort(inv_rest_capacities)\n \n # Return the scores\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Based on the common idea of prioritizing bins with higher rest capacity, the new algorithm assigns scores by taking the square of the rest capacity and dividing it by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize bins with higher rest capacity\n priority = np.argsort(rest_capacity)\n \n # Assign scores based on the square of the rest capacity and the index of the bin\n scores = (rest_capacity**2 / priority).astype(np.float32)\n \n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the square root of the ratio of item size to each bin's rest capacity while considering the condition that a bin's rest capacity should be larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the ratio of item size to each bin's rest capacity\n scores = np.sqrt(item / bins)\n \n # Filter out bins with rest capacity less than or equal to the item size\n scores = scores[bins > item]\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: The modified algorithm considers the volume of the item and the remaining capacity of the bins to calculate scores, minimizing the number of used bins and the total unused space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the volume of the item\n item_volume = item ** 3\n \n # Calculate the remaining capacity of each bin\n bin_capacities = bins - item_volume\n \n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bin_capacities[i] >= 0:\n scores[i] = (bin_capacities[i] / item_volume) * (1 - (item_volume / bins[i]))\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: This algorithm calculates scores for each bin based on the product of rest capacity and inverse of bin index, giving higher priority to bins with larger capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the product of its rest capacity and inverse of its index\n scores = np.multiply(bins, 1 / (np.arange(len(bins)) + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "Prioritize bins with low fullness level, then high remaining capacity. Penalize bins with high fullness level, then zero remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the fullness level of each bin\n fullness = (bins - item) / bins\n \n # Prioritize bins with low fullness level\n priority_score = 1 - fullness\n \n # Penalize bins with high fullness level\n penalty_score = fullness ** 2\n \n # Combine the priority and penalty scores\n scores = priority_score + penalty_score\n \n # Normalize the scores to ensure they are between 0 and 1\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "Score each bin by multiplying the ratio of the item's size to the bin's capacity with the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item's size to the bin's capacity\n ratios = np.divide(item, bins)\n \n # Multiply the ratios by the bin's maximum capacity\n scores = np.multiply(ratios, bins)\n \n # Return the scores\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate bin scores based on the product of rest capacity and square root of bin index, favoring larger capacity bins with lower indices for higher scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the rest capacity and the square root of the bin index\n scores = np.sqrt(bins) * (bins - item)\n \n # Favor larger capacity bins with lower indices for higher scores\n scores[np.where(bins > item)] = np.inf\n \n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "The score function prioritizes bins with higher remaining capacity and lower fullness level, while penalizing bins with maximum capacity and high fullness level to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity and fullness level for each bin\n remaining_capacity = bins - item\n fullness_level = (bins - remaining_capacity) / bins\n \n # Prioritize bins with higher remaining capacity and lower fullness level\n priority = np.where(remaining_capacity > 0, remaining_capacity, 0) + \\\n np.where(fullness_level < 1, 1 - fullness_level, 0)\n \n # Penalize bins with maximum capacity and high fullness level\n penalty = np.where(bins == max(bins), 1, 0) + \\\n np.where(fullness_level >= 0.5, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority * (1 - penalty)\n \n return scores",
"objective": 0.05544,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on a combination of rest capacity and bin index, prioritizing bins with higher rest capacity and assigning a reasonable penalty for bins with a high index to encourage using fewer bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on a combination of rest capacity and bin index\n scores = np.zeros(len(bins))\n for i, bin in enumerate(bins):\n if bin >= item:\n scores[i] = (bin - item) / (i + 1)\n else:\n scores[i] = 0\n \n # Penalize bins with high indices to encourage using fewer bins\n penalties = np.arange(len(bins)) ** 2\n scores -= penalties\n \n return scores",
"objective": 0.06027,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_4.json
================================================
[
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Modified algorithm uses a score function that combines inverse rest capacity and a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to introduce randomness\n random_factor = np.random.rand(len(bins))\n \n # Combine the inverse rest capacity and random factor\n scores = inv_rest_capacity + random_factor\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting inverse rest capacity from total capacity, and introducing randomness to enhance utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to enhance utilization\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": "Prioritize bins by multiplying inverse rest capacity with total capacity, and introducing randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Introduce randomness to balance diversity\n randomness = np.random.rand(len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * randomness\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New Algorithm: Score function that combines inverse rest capacity, a random factor, and item-bin affinity to prioritize bins based on remaining capacity, randomness, and item-specific preferences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Generate a random factor for each bin\n random_factor = np.random.rand(len(bins))\n \n # Calculate the item-bin affinity for each bin\n item_bin_affinity = np.dot(item, bins)\n \n # Combine the three factors to get the final score\n scores = inv_rest_capacity * random_factor * item_bin_affinity\n \n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Design a score function that prioritizes bins with higher remaining capacity, penalizes bins with high fullness level, and assigns a bonus score based on the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins with high fullness level\n fullness_level = (bins / item) ** 2\n penalty = 1 - fullness_level\n \n # Assign a bonus score based on the bin's index\n bonus = np.arange(len(bins)) + 1\n \n # Combine the three components into a single score\n scores = remaining_capacity * penalty * bonus\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Assign bins based on ranking by total capacity and then score inversely proportional to item difference and a random factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the item difference\n diff = 1 / (np.abs(item - bins) + 1e-6)\n \n # Calculate the random factor\n rand = np.random.rand(len(bins))\n \n # Calculate the score for each bin\n scores = diff * rand\n \n # Return the scores\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that combines inverse rest capacity and a weighted random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the weighted random factor\n rand_factor = np.random.rand(len(bins)) * 0.5 + 0.5\n \n # Combine the inverse rest capacity and weighted random factor\n scores = inv_rest_capacity * rand_factor\n \n # Return the scores\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item. Then, multiply the scores by a weight that is inversely proportional to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.minimum(bins, item) * (1 / bins)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Algorithm 6: Score each bin by subtracting the squared difference between the bin's rest capacity and half of the bin's maximum capacity from the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the squared difference between the bin's rest capacity and half of the bin's maximum capacity\n diff = (bins - item) ** 2\n \n # Subtract the squared difference from the bin's maximum capacity\n scores = bins - diff\n \n # Return the scores for the bins\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Prioritize bins with high remaining capacity, then low fullness level. Penalize bins with zero remaining capacity, then high fullness level.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with high remaining capacity\n priority = np.argsort(-remaining_capacity)\n \n # Penalize bins with zero remaining capacity\n penalty = np.where(remaining_capacity == 0, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates scores inversely proportional to the rest capacities of bins, prioritizing bins with higher remaining capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacities of the bins\n inv_rest_capacities = 1 / (bins - item)\n \n # Prioritize bins with higher remaining capacity\n scores = np.argsort(inv_rest_capacities)\n \n # Return the scores\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Based on the common idea of prioritizing bins with higher rest capacity, the new algorithm assigns scores by taking the square of the rest capacity and dividing it by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize bins with higher rest capacity\n priority = np.argsort(rest_capacity)\n \n # Assign scores based on the square of the rest capacity and the index of the bin\n scores = (rest_capacity**2 / priority).astype(np.float32)\n \n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by dividing the bin's maximum capacity by the sum of the bin's maximum capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.divide(bins.max(), bins.sum() + item)\n \n # Return the scores\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the square root of the ratio of item size to each bin's rest capacity while considering the condition that a bin's rest capacity should be larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the ratio of item size to each bin's rest capacity\n scores = np.sqrt(item / bins)\n \n # Filter out bins with rest capacity less than or equal to the item size\n scores = scores[bins > item]\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: The modified algorithm considers the volume of the item and the remaining capacity of the bins to calculate scores, minimizing the number of used bins and the total unused space.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the volume of the item\n item_volume = item ** 3\n \n # Calculate the remaining capacity of each bin\n bin_capacities = bins - item_volume\n \n # Calculate the score for each bin\n scores = np.zeros(len(bins))\n for i in range(len(bins)):\n if bin_capacities[i] >= 0:\n scores[i] = (bin_capacities[i] / item_volume) * (1 - (item_volume / bins[i]))\n else:\n scores[i] = 0\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: This algorithm calculates scores for each bin based on the product of rest capacity and inverse of bin index, giving higher priority to bins with larger capacity and lower index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the product of its rest capacity and inverse of its index\n scores = np.multiply(bins, 1 / (np.arange(len(bins)) + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "Prioritize bins with low fullness level, then high remaining capacity. Penalize bins with high fullness level, then zero remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the fullness level of each bin\n fullness = (bins - item) / bins\n \n # Prioritize bins with low fullness level\n priority_score = 1 - fullness\n \n # Penalize bins with high fullness level\n penalty_score = fullness ** 2\n \n # Combine the priority and penalty scores\n scores = priority_score + penalty_score\n \n # Normalize the scores to ensure they are between 0 and 1\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.04417,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_5.json
================================================
[
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Modified algorithm uses a score function that combines inverse rest capacity and a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to introduce randomness\n random_factor = np.random.rand(len(bins))\n \n # Combine the inverse rest capacity and random factor\n scores = inv_rest_capacity + random_factor\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Calculate the score by dividing the inverse rest capacity by the total capacity and introduce randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting inverse rest capacity from total capacity, and introducing randomness to enhance utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to enhance utilization\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": "Prioritize bins by inverse rest capacity, introducing randomness with a constant value to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + randomness\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": "Prioritize bins by multiplying inverse rest capacity with total capacity, and introducing randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Introduce randomness to balance diversity\n randomness = np.random.rand(len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * randomness\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that multiplies the inverse rest capacity with a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity by a random factor to introduce randomness\n random_factor = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity * random_factor\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Prioritize bins by adding randomness to the product of inverse rest capacity with a random number between 0 and the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the product of inverse rest capacity and a random number between 0 and the inverse rest capacity\n randomness = np.random.uniform(size=len(bins)) * inv_rest_capacity\n scores = inv_rest_capacity * randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Design a score function that prioritizes bins with higher remaining capacity, penalizes bins with high fullness level, and assigns a bonus score based on the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins with high fullness level\n fullness_level = (bins / item) ** 2\n penalty = 1 - fullness_level\n \n # Assign a bonus score based on the bin's index\n bonus = np.arange(len(bins)) + 1\n \n # Combine the three components into a single score\n scores = remaining_capacity * penalty * bonus\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Assign bins based on ranking by total capacity and then score inversely proportional to item difference and a random factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the item difference\n diff = 1 / (np.abs(item - bins) + 1e-6)\n \n # Calculate the random factor\n rand = np.random.rand(len(bins))\n \n # Calculate the score for each bin\n scores = diff * rand\n \n # Return the scores\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that combines inverse rest capacity and a weighted random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the weighted random factor\n rand_factor = np.random.rand(len(bins)) * 0.5 + 0.5\n \n # Combine the inverse rest capacity and weighted random factor\n scores = inv_rest_capacity * rand_factor\n \n # Return the scores\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item. Then, multiply the scores by a weight that is inversely proportional to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.minimum(bins, item) * (1 / bins)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher density (score inversely proportional to the rest capacity over remaining maximum capacity) and introduce randomness to enhance utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity over the maximum capacity\n # for each bin, and multiply by a random value between 0 and 1\n scores = np.random.rand(len(bins)) * (1 / (bins - item + 1))\n \n # Normalize the scores so that they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm 6: Score each bin by subtracting the squared difference between the bin's rest capacity and half of the bin's maximum capacity from the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the squared difference between the bin's rest capacity and half of the bin's maximum capacity\n diff = (bins - item) ** 2\n \n # Subtract the squared difference from the bin's maximum capacity\n scores = bins - diff\n \n # Return the scores for the bins\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Design a score function that prioritizes bins with both larger remaining capacity and smaller fullness level, and assigns a bonus score based on the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity and fullness level for each bin\n remaining_capacity = bins - item\n fullness_level = (bins - remaining_capacity) / bins\n \n # Prioritize bins with larger remaining capacity and smaller fullness level\n priority = np.argsort(-remaining_capacity * fullness_level)\n \n # Assign a bonus score based on the bin's index\n bonus_score = np.arange(len(priority)) + 1\n \n # Combine the priority and bonus scores to get the final scores\n scores = priority * bonus_score\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Prioritize bins with high remaining capacity, then low fullness level. Penalize bins with zero remaining capacity, then high fullness level.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Prioritize bins with high remaining capacity\n priority = np.argsort(-remaining_capacity)\n \n # Penalize bins with zero remaining capacity\n penalty = np.where(remaining_capacity == 0, 1, 0)\n \n # Combine the priority and penalty scores\n scores = priority + penalty\n \n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates scores inversely proportional to the rest capacities of bins, prioritizing bins with higher remaining capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacities of the bins\n inv_rest_capacities = 1 / (bins - item)\n \n # Prioritize bins with higher remaining capacity\n scores = np.argsort(inv_rest_capacities)\n \n # Return the scores\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Based on the common idea of prioritizing bins with higher rest capacity, the new algorithm assigns scores by taking the square of the rest capacity and dividing it by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize bins with higher rest capacity\n priority = np.argsort(rest_capacity)\n \n # Assign scores based on the square of the rest capacity and the index of the bin\n scores = (rest_capacity**2 / priority).astype(np.float32)\n \n return scores",
"objective": 0.04175,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin by dividing the bin's maximum capacity by the sum of the bin's maximum capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.divide(bins.max(), bins.sum() + item)\n \n # Return the scores\n return scores",
"objective": 0.04226,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_6.json
================================================
[
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Modified algorithm uses a score function that combines inverse rest capacity and a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to introduce randomness\n random_factor = np.random.rand(len(bins))\n \n # Combine the inverse rest capacity and random factor\n scores = inv_rest_capacity + random_factor\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Calculate the score by dividing the inverse rest capacity by the total capacity and introduce randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.rand(len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting inverse rest capacity from total capacity, and introducing randomness to enhance utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to enhance utilization\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": "Prioritize bins by inverse rest capacity, introducing randomness with a constant value to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + randomness\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that multiplies the inverse rest capacity with a constant factor to prioritize bins with higher remaining capacity and then adding a random factor to introduce randomness and prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity by a constant factor to prioritize bins with higher remaining capacity\n priority = inv_rest_capacity * 0.5\n \n # Add a random factor to introduce randomness and prevent constant assignment to the same bin\n randomness = np.random.uniform(size=len(bins))\n \n # Combine the priority and randomness factors to get the final score for each bin\n scores = priority + randomness\n \n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "Prioritize smaller bins by their inverse rest capacity and penalize larger ones, while introducing a random factor based on the item's size relative to bin capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize larger bins by adding a random factor\n random_factor = np.random.uniform(0, 1, size=len(bins))\n penalized_inv_rest_capacity = inv_rest_capacity + random_factor\n \n # Calculate the scores for each bin\n scores = penalized_inv_rest_capacity * (1 - random_factor)\n \n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "Prioritize bins by multiplying inverse rest capacity with total capacity, and introducing randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Introduce randomness to balance diversity\n randomness = np.random.rand(len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * randomness\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "{New Algorithm: Prioritize bins by multiplying the inverse rest capacity with a random number between 0 and 2}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity with a random number between 0 and 2\n scores = inv_rest_capacity * np.random.uniform(0, 2, len(bins))\n \n # Return the scores\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that multiplies the inverse rest capacity with a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity by a random factor to introduce randomness\n random_factor = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity * random_factor\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the product of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the product of inverse rest capacity and a random number between 0 and 1\n randomness = np.random.rand(len(bins))\n scores = inv_rest_capacity * randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.03894,
"other_inf": null
},
{
"algorithm": "Prioritize bins by adding randomness to the product of inverse rest capacity with a random number between 0 and the inverse rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the product of inverse rest capacity and a random number between 0 and the inverse rest capacity\n randomness = np.random.uniform(size=len(bins)) * inv_rest_capacity\n scores = inv_rest_capacity * randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Design a score function that prioritizes bins with higher remaining capacity, penalizes bins with high fullness level, and assigns a bonus score based on the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Penalize bins with high fullness level\n fullness_level = (bins / item) ** 2\n penalty = 1 - fullness_level\n \n # Assign a bonus score based on the bin's index\n bonus = np.arange(len(bins)) + 1\n \n # Combine the three components into a single score\n scores = remaining_capacity * penalty * bonus\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Assign bins based on ranking by total capacity and then score inversely proportional to item difference and a random factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the item difference\n diff = 1 / (np.abs(item - bins) + 1e-6)\n \n # Calculate the random factor\n rand = np.random.rand(len(bins))\n \n # Calculate the score for each bin\n scores = diff * rand\n \n # Return the scores\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that combines inverse rest capacity and a weighted random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the weighted random factor\n rand_factor = np.random.rand(len(bins)) * 0.5 + 0.5\n \n # Combine the inverse rest capacity and weighted random factor\n scores = inv_rest_capacity * rand_factor\n \n # Return the scores\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item. Then, multiply the scores by a weight that is inversely proportional to the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.minimum(bins, item) * (1 / bins)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Prioritize bins with higher density (score inversely proportional to the rest capacity over remaining maximum capacity) and introduce randomness to enhance utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity over the maximum capacity\n # for each bin, and multiply by a random value between 0 and 1\n scores = np.random.rand(len(bins)) * (1 / (bins - item + 1))\n \n # Normalize the scores so that they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on a new score that considers rest capacity, remaining capacity, and a randomized component",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Calculate the remaining capacity of each bin\n remaining_capacity = np.maximum(0, rest_capacity)\n \n # Calculate the randomized component\n randomized_component = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the total score for each bin\n scores = (remaining_capacity + randomized_component) / (rest_capacity + 1)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Algorithm 6: Score each bin by subtracting the squared difference between the bin's rest capacity and half of the bin's maximum capacity from the bin's maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the squared difference between the bin's rest capacity and half of the bin's maximum capacity\n diff = (bins - item) ** 2\n \n # Subtract the squared difference from the bin's maximum capacity\n scores = bins - diff\n \n # Return the scores for the bins\n return scores",
"objective": 0.04045,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_7.json
================================================
[
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "Modified algorithm uses a score function that combines inverse rest capacity and a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to introduce randomness\n random_factor = np.random.rand(len(bins))\n \n # Combine the inverse rest capacity and random factor\n scores = inv_rest_capacity + random_factor\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "New algorithm introduces a configurable parameter alpha that balances between prioritizing remaining capacity (alpha < 1) and randomness (alpha > 1) in the score function: score = (1 - alpha) * inv_rest_capacity + alpha * rand_factor.",
"code": "import numpy as np\n\ndef score(item, bins, alpha=0.5):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random factor for each bin\n rand_factor = np.random.rand(len(bins))\n \n # Calculate the score for each bin using the formula provided\n scores = (1 - alpha) * inv_rest_capacity + alpha * rand_factor\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": "Calculate the score by dividing the inverse rest capacity by the total capacity and introduce randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.rand(len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting inverse rest capacity from total capacity, and introducing randomness to enhance utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to enhance utilization\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": "The backbone idea of the provided algorithms is to combine the inverse rest capacity with a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin. The new algorithm uses a score function that combines a random factor with the number of bins to divide the inverse rest capacity and then adds a constant value to the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to prioritize bins with higher remaining capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Divide by the number of bins to normalize the scores\n scores = inv_rest_capacity / len(bins)\n \n # Add a constant value to the scores to ensure that all bins are considered\n scores += 1\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": "Prioritize bins by inverse rest capacity, introducing randomness with a constant value to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + randomness\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": "New algorithm multiplies the inverse of the remaining capacity by a constant factor to prioritize bins with higher remaining capacity, adds a random factor to introduce randomness, and divides the result by the total capacity to normalize the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity\n inv_remaining_capacity = 1 / (bins - item)\n \n # Multiply the inverse of the remaining capacity by a constant factor\n # to prioritize bins with higher remaining capacity\n priority_factor = 0.5\n scores = inv_remaining_capacity * priority_factor\n \n # Add a random factor to introduce randomness\n random_factor = np.random.uniform(size=len(bins))\n scores += random_factor\n \n # Normalize the scores by dividing them by the total capacity\n total_capacity = np.sum(bins)\n scores /= total_capacity\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that multiplies the inverse rest capacity with a constant factor to prioritize bins with higher remaining capacity and then adding a random factor to introduce randomness and prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity by a constant factor to prioritize bins with higher remaining capacity\n priority = inv_rest_capacity * 0.5\n \n # Add a random factor to introduce randomness and prevent constant assignment to the same bin\n randomness = np.random.uniform(size=len(bins))\n \n # Combine the priority and randomness factors to get the final score for each bin\n scores = priority + randomness\n \n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "Prioritize smaller bins by their inverse rest capacity and penalize larger ones, while introducing a random factor based on the item's size relative to bin capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize larger bins by adding a random factor\n random_factor = np.random.uniform(0, 1, size=len(bins))\n penalized_inv_rest_capacity = inv_rest_capacity + random_factor\n \n # Calculate the scores for each bin\n scores = penalized_inv_rest_capacity * (1 - random_factor)\n \n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with higher remaining capacity using a score function that combines the inverse rest capacity with a diminishing random factor, starting with a higher random factor for bins with larger rest capacities and gradually decreasing the factor as the item is assigned to bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the diminishing random factor for each bin\n rand_factor = np.random.uniform(0, 1, len(bins))\n rand_factor[rand_factor > 0.5] *= 2\n \n # Combine the inverse rest capacity and random factor for each bin\n scores = inv_rest_capacity + rand_factor\n \n # Return the scores for each bin\n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": "New algorithm assigns the item to the bin with the highest score calculated by adding a small constant to the inverse rest capacity and multiplying it with a squared random factor to increase randomness and prioritize bins with higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a small constant to the inverse rest capacity\n inv_rest_capacity += 0.01\n \n # Multiply the inverse rest capacity by a squared random factor\n # to increase randomness and prioritize bins with higher remaining capacity\n random_factor = np.random.randint(0, 100, size=len(bins)) ** 2\n scores = inv_rest_capacity * random_factor\n \n return scores",
"objective": 0.03753,
"other_inf": null
},
{
"algorithm": "New algorithm assigns the item to the bin with the highest score calculated by multiplying the inverse rest capacity with a squared random factor for increased randomness and prioritization of bins with higher remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the squared random factor for increased randomness and prioritization of bins with higher remaining capacity\n rand_factor = np.random.rand(len(bins)) ** 2\n \n # Multiply the inverse rest capacity and squared random factor to get the final score for each bin\n scores = inv_rest_capacity * rand_factor\n \n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by multiplying the inverse rest capacity with a random number between 0 and 3",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity with a random number between 0 and 3\n scores = inv_rest_capacity * np.random.randint(0, 3, size=len(bins))\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "Prioritize bins by multiplying inverse rest capacity with total capacity, and introducing randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Introduce randomness to balance diversity\n randomness = np.random.rand(len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * randomness\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "{New Algorithm: Prioritize bins by multiplying the inverse rest capacity with a random number between 0 and 2}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity with a random number between 0 and 2\n scores = inv_rest_capacity * np.random.uniform(0, 2, len(bins))\n \n # Return the scores\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that multiplies the inverse rest capacity with a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity by a random factor to introduce randomness\n random_factor = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity * random_factor\n \n # Return the scores for the bins\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Assign bins based on a score calculated by dividing the sum of inverse rest capacity and a random factor with the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random factor\n rand_factor = np.random.rand(len(bins))\n \n # Calculate the score for each bin\n scores = inv_rest_capacity * rand_factor\n \n # Return the scores\n return scores",
"objective": 0.03894,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_8.json
================================================
[
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by inverse rest capacity, introducing randomness with a random number sampled from a uniform distribution with a range [0, constant].",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the bin index, introducing randomness, and then taking the logarithm of the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.rand(len(bins))\n scores = inv_rest_capacity + randomness\n \n # Take the logarithm of the scores\n scores = np.log(scores)\n \n return scores",
"objective": 0.02767,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02817,
"other_inf": null
},
{
"algorithm": "New algorithm introduces a configurable parameter alpha that balances between prioritizing remaining capacity (alpha < 1) and randomness (alpha > 1) in the score function: score = (1 - alpha) * inv_rest_capacity + alpha * rand_factor.",
"code": "import numpy as np\n\ndef score(item, bins, alpha=0.5):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random factor for each bin\n rand_factor = np.random.rand(len(bins))\n \n # Calculate the score for each bin using the formula provided\n scores = (1 - alpha) * inv_rest_capacity + alpha * rand_factor\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": "Calculate the score by dividing the inverse rest capacity by the total capacity and introduce randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.rand(len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting inverse rest capacity from total capacity, and introducing randomness to enhance utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to enhance utilization\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": "The backbone idea of the provided algorithms is to combine the inverse rest capacity with a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin. The new algorithm uses a score function that combines a random factor with the number of bins to divide the inverse rest capacity and then adds a constant value to the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to prioritize bins with higher remaining capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Divide by the number of bins to normalize the scores\n scores = inv_rest_capacity / len(bins)\n \n # Add a constant value to the scores to ensure that all bins are considered\n scores += 1\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 0.5.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.uniform(0, 0.5, size=len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": "Prioritize bins by inverse rest capacity, introducing randomness with a constant value to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + randomness\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by calculating the product of the inverse rest capacity with a score based on the item's size relative to the bin capacity and applying a random factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity with a score based on the item's size relative to the bin capacity\n scores = (1 / (bins - item)) * (item / bins)\n \n # Apply a random factor to the scores\n scores += np.random.uniform(0, 1, size=len(bins))\n \n # Return the scores\n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": " Modified algorithm assigns the item to the bin with the highest score calculated by subtracting a squared random factor from the inverse rest capacity to prioritize bins with lower remaining capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Subtract a squared random factor from the inverse rest capacity\n # to prioritize bins with lower remaining capacity\n random_factor = np.random.uniform(0, 1, size=len(bins)) ** 2\n scores = inv_rest_capacity - random_factor\n \n # Return the scores for the bins\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate a score for each bin by dividing the inverse rest capacity by a term that combines the item size and normalized bin capacity, and then adding a random factor to prioritize bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the normalized bin capacity\n norm_bin_capacity = bins / np.sum(bins)\n \n # Combine the item size and normalized bin capacity\n combined = item * norm_bin_capacity\n \n # Add a random factor to prioritize bins with lower remaining capacity\n random_factor = np.random.rand(len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + combined + random_factor\n \n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "New algorithm multiplies the inverse of the remaining capacity by a constant factor to prioritize bins with higher remaining capacity, adds a random factor to introduce randomness, and divides the result by the total capacity to normalize the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity\n inv_remaining_capacity = 1 / (bins - item)\n \n # Multiply the inverse of the remaining capacity by a constant factor\n # to prioritize bins with higher remaining capacity\n priority_factor = 0.5\n scores = inv_remaining_capacity * priority_factor\n \n # Add a random factor to introduce randomness\n random_factor = np.random.uniform(size=len(bins))\n scores += random_factor\n \n # Normalize the scores by dividing them by the total capacity\n total_capacity = np.sum(bins)\n scores /= total_capacity\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that multiplies the inverse rest capacity with a constant factor to prioritize bins with higher remaining capacity and then adding a random factor to introduce randomness and prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity by a constant factor to prioritize bins with higher remaining capacity\n priority = inv_rest_capacity * 0.5\n \n # Add a random factor to introduce randomness and prevent constant assignment to the same bin\n randomness = np.random.uniform(size=len(bins))\n \n # Combine the priority and randomness factors to get the final score for each bin\n scores = priority + randomness\n \n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "Prioritize smaller bins by their inverse rest capacity and penalize larger ones, while introducing a random factor based on the item's size relative to bin capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize larger bins by adding a random factor\n random_factor = np.random.uniform(0, 1, size=len(bins))\n penalized_inv_rest_capacity = inv_rest_capacity + random_factor\n \n # Calculate the scores for each bin\n scores = penalized_inv_rest_capacity * (1 - random_factor)\n \n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with higher remaining capacity using a score function that combines the inverse rest capacity with a diminishing random factor, starting with a higher random factor for bins with larger rest capacities and gradually decreasing the factor as the item is assigned to bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the diminishing random factor for each bin\n rand_factor = np.random.uniform(0, 1, len(bins))\n rand_factor[rand_factor > 0.5] *= 2\n \n # Combine the inverse rest capacity and random factor for each bin\n scores = inv_rest_capacity + rand_factor\n \n # Return the scores for each bin\n return scores",
"objective": 0.03511,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that multiplies the inverse rest capacity with a constant factor and then adds a random factor weighted by a tunable parameter to balance the influence of capacity and randomness on bin selection.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity with a constant factor\n const_factor = 0.5\n scores = inv_rest_capacity * const_factor\n \n # Add a random factor weighted by a tunable parameter\n random_factor = np.random.uniform(size=len(bins))\n scores += random_factor * 0.1\n \n return scores",
"objective": 0.03532,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama34b/Run3/population_generation_9.json
================================================
[
{
"algorithm": "The new algorithm prioritizes larger bins by their rest capacity and penalizes smaller ones, while introducing a random factor based on the item's size relative to bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacity = bins - item\n \n # Prioritize larger bins by their rest capacity\n priority = np.argsort(-rest_capacity)\n \n # Penalize smaller bins\n penalty = np.exp(-np.log(rest_capacity))\n \n # Introduce a random factor based on the item's size relative to bin capacity\n randomness = np.random.randint(0, 100, size=len(bins))\n \n # Combine the priority, penalty, and randomness to get the final score\n scores = (priority + penalty + randomness) / 3\n \n return scores",
"objective": 0.01912,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize larger bins by their inverse rest capacity, penalizing smaller ones, while introducing a random factor proportional to the item's size relative to the maximum capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the penalty for smaller bins\n penalty = np.maximum(0, (bins - item) / (bins + 1))\n \n # Calculate the random factor\n rand_factor = np.random.randint(0, 100, size=len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity * (1 - penalty) + rand_factor\n \n return scores",
"objective": 0.02022,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with larger rest capacity and higher total capacity by combining inverse rest capacity and total capacity, introducing randomness to prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity and total capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n total_capacity = np.sum(bins)\n \n # Combine the inverse rest capacity and total capacity using a weighted average\n weighted_average = 0.5 * inv_rest_capacity + 0.5 * total_capacity\n \n # Add randomness to the scores to prevent constant assignment to the same bin\n randomness = np.random.randint(0, 10, size=len(bins))\n scores = weighted_average + randomness\n \n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by inverse rest capacity, introducing randomness with a random number sampled from a uniform distribution with a range [0, constant].",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores\n return scores",
"objective": 0.02696,
"other_inf": null
},
{
"algorithm": "Prioritize bins by dividing the inverse rest capacity by the bin index, introducing randomness, and then taking the logarithm of the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n randomness = np.random.rand(len(bins))\n scores = inv_rest_capacity + randomness\n \n # Take the logarithm of the scores\n scores = np.log(scores)\n \n return scores",
"objective": 0.02767,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02817,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding a random number between 0 and 1 to the sum of the inverse rest capacity with the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random number between 0 and 1 to the sum of the inverse rest capacity\n # and the bin's capacity\n scores = inv_rest_capacity + np.random.uniform(size=len(bins))\n \n # Return the scores\n return scores",
"objective": 0.02857,
"other_inf": null
},
{
"algorithm": "New algorithm introduces a configurable parameter alpha that balances between prioritizing remaining capacity (alpha < 1) and randomness (alpha > 1) in the score function: score = (1 - alpha) * inv_rest_capacity + alpha * rand_factor.",
"code": "import numpy as np\n\ndef score(item, bins, alpha=0.5):\n # Calculate the inverse of the remaining capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the random factor for each bin\n rand_factor = np.random.rand(len(bins))\n \n # Calculate the score for each bin using the formula provided\n scores = (1 - alpha) * inv_rest_capacity + alpha * rand_factor\n \n return scores",
"objective": 0.02888,
"other_inf": null
},
{
"algorithm": "Calculate the score by dividing the inverse rest capacity by the total capacity and introduce randomness to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + randomness\n \n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.rand(len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "Prioritize bins by subtracting inverse rest capacity from total capacity, and introducing randomness to enhance utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to enhance utilization\n randomness = np.random.uniform(0, 1, size=len(bins))\n scores = inv_rest_capacity + randomness\n \n # Return the scores for the bins\n return scores",
"objective": 0.02928,
"other_inf": null
},
{
"algorithm": "The backbone idea of the provided algorithms is to combine the inverse rest capacity with a random factor to prioritize bins with higher remaining capacity while introducing randomness to prevent constant assignment to the same bin. The new algorithm uses a score function that combines a random factor with the number of bins to divide the inverse rest capacity and then adds a constant value to the score.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add a random factor to prioritize bins with higher remaining capacity\n random_factor = np.random.uniform(0, 1, size=len(bins))\n inv_rest_capacity += random_factor\n \n # Divide by the number of bins to normalize the scores\n scores = inv_rest_capacity / len(bins)\n \n # Add a constant value to the scores to ensure that all bins are considered\n scores += 1\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins by adding randomness to the sum of inverse rest capacity with a random number between 0 and 0.5.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores\n random_component = np.random.uniform(0, 0.5, size=len(bins))\n scores = inv_rest_capacity + random_component\n \n # Return the scores\n return scores",
"objective": 0.03018,
"other_inf": null
},
{
"algorithm": "Prioritize bins by inverse rest capacity, introducing randomness with a constant value to balance diversity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Add randomness to the scores to balance diversity\n randomness = np.random.uniform(0, 1, len(bins))\n scores = inv_rest_capacity + randomness\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins by calculating the product of the inverse rest capacity with a score based on the item's size relative to the bin capacity and applying a random factor.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the inverse rest capacity with a score based on the item's size relative to the bin capacity\n scores = (1 / (bins - item)) * (item / bins)\n \n # Apply a random factor to the scores\n scores += np.random.uniform(0, 1, size=len(bins))\n \n # Return the scores\n return scores",
"objective": 0.03069,
"other_inf": null
},
{
"algorithm": " Modified algorithm assigns the item to the bin with the highest score calculated by subtracting a squared random factor from the inverse rest capacity to prioritize bins with lower remaining capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Subtract a squared random factor from the inverse rest capacity\n # to prioritize bins with lower remaining capacity\n random_factor = np.random.uniform(0, 1, size=len(bins)) ** 2\n scores = inv_rest_capacity - random_factor\n \n # Return the scores for the bins\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate a score for each bin by dividing the inverse rest capacity by a term that combines the item size and normalized bin capacity, and then adding a random factor to prioritize bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the normalized bin capacity\n norm_bin_capacity = bins / np.sum(bins)\n \n # Combine the item size and normalized bin capacity\n combined = item * norm_bin_capacity\n \n # Add a random factor to prioritize bins with lower remaining capacity\n random_factor = np.random.rand(len(bins))\n \n # Calculate the final score for each bin\n scores = inv_rest_capacity + combined + random_factor\n \n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "New algorithm multiplies the inverse of the remaining capacity by a constant factor to prioritize bins with higher remaining capacity, adds a random factor to introduce randomness, and divides the result by the total capacity to normalize the scores.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity\n inv_remaining_capacity = 1 / (bins - item)\n \n # Multiply the inverse of the remaining capacity by a constant factor\n # to prioritize bins with higher remaining capacity\n priority_factor = 0.5\n scores = inv_remaining_capacity * priority_factor\n \n # Add a random factor to introduce randomness\n random_factor = np.random.uniform(size=len(bins))\n scores += random_factor\n \n # Normalize the scores by dividing them by the total capacity\n total_capacity = np.sum(bins)\n scores /= total_capacity\n \n return scores",
"objective": 0.03401,
"other_inf": null
},
{
"algorithm": "New algorithm uses a score function that multiplies the inverse rest capacity with a constant factor to prioritize bins with higher remaining capacity and then adding a random factor to introduce randomness and prevent constant assignment to the same bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Multiply the inverse rest capacity by a constant factor to prioritize bins with higher remaining capacity\n priority = inv_rest_capacity * 0.5\n \n # Add a random factor to introduce randomness and prevent constant assignment to the same bin\n randomness = np.random.uniform(size=len(bins))\n \n # Combine the priority and randomness factors to get the final score for each bin\n scores = priority + randomness\n \n return scores",
"objective": 0.03451,
"other_inf": null
},
{
"algorithm": "Prioritize smaller bins by their inverse rest capacity and penalize larger ones, while introducing a random factor based on the item's size relative to bin capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse rest capacity of each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Penalize larger bins by adding a random factor\n random_factor = np.random.uniform(0, 1, size=len(bins))\n penalized_inv_rest_capacity = inv_rest_capacity + random_factor\n \n # Calculate the scores for each bin\n scores = penalized_inv_rest_capacity * (1 - random_factor)\n \n return scores",
"objective": 0.03471,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_1.json
================================================
[
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Calculate the score as the multiplication of the item's capacity divided by the bin's remaining capacity, and the bin's index plus 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item's capacity and the bin's remaining capacity\n scores = (item / bins) * (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Minimize the number of used bins while considering both the residual capacity and the difference between bin capacity and item size: score = (bins[i] - item) / max(bins[i] - item, min_capacity)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the residual capacity for each bin\n residual_capacities = bins - item\n \n # Calculate the difference between the bin capacity and the item size\n capacity_differences = bins - item\n \n # Calculate the scores for each bin based on the residual capacity and the capacity difference\n scores = (residual_capacities / capacity_differences).clip(min=0)\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size, and using a logarithmic function to increase the penalty for using larger bins. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size\n scores = (bins ** 2) / (bins - item)\n \n # Apply a logarithmic function to increase the penalty for using larger bins\n scores = np.log(scores + 1)\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign the item to the bin that has the highest score calculated by this function: (rest capacity - item size) / max(rest capacity - item size, 1), excluding bins with full capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / np.maximum(bins - item, 1)\n \n # Exclude bins with full capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "Algorithm: Score bins with their rest capacities raised to the power of their maximum capacity, assigning items to bins with the maximum score and excluding bins with maximum rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its rest capacity raised to the power of its maximum capacity\n scores = np.power(bins, item)\n \n # Exclude bins with maximum rest capacity from the scores\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.06932,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "{ New algorithm: Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin's index, and using a logarithmic function to increase the penalty for using larger bins. }",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin's index, and using a logarithmic function to increase the penalty for using larger bins\n scores = np.log(np.abs(bins - item)) / (np.abs(bins - item) + 1) * np.arange(len(bins))\n return scores",
"objective": 0.06993,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_10.json
================================================
[
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index\n scores = -np.log(bins / item) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the inverse of the item size multiplied by the square root of the product of the bin's capacity and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.sqrt(bins * item) - 1) / (np.sqrt(bins) - 1)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the product of the bin's capacity and the square root of the reciprocal of the difference between its capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the inverse of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Calculate the score of a bin as the product of the difference between its maximum and current capacity and the reciprocal of the capacity difference between the bin and the item, multiplied by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (bins - item) * (1 / (bins - item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + ((1 - bins) * (1 / (item - bins)))\n \n # Normalize the scores to ensure they add up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index\n scores = (bins / item) - np.arange(len(bins))\n \n # Return the scores\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiply each bin's capacity by the square of the reciprocal of the bin's index, multiplied by the square root of the reciprocal of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the formula provided\n scores = (bins * (np.sqrt(item) / bins)) ** 2\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_11.json
================================================
[
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index\n scores = -np.log(bins / item) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the inverse of the item size multiplied by the square root of the product of the bin's capacity and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.sqrt(bins * item) - 1) / (np.sqrt(bins) - 1)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the product of the bin's capacity and the square root of the reciprocal of the difference between its capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the inverse of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Calculate the score of a bin as the product of the difference between its maximum and current capacity and the reciprocal of the capacity difference between the bin and the item, multiplied by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (bins - item) * (1 / (bins - item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + ((1 - bins) * (1 / (item - bins)))\n \n # Normalize the scores to ensure they add up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index\n scores = (bins / item) - np.arange(len(bins))\n \n # Return the scores\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiply each bin's capacity by the square of the reciprocal of the bin's index, multiplied by the square root of the reciprocal of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the formula provided\n scores = (bins * (np.sqrt(item) / bins)) ** 2\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_12.json
================================================
[
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the inverse of the item size multiplied by the square root of the product of the bin's capacity and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.sqrt(bins * item) - 1) / (np.sqrt(bins) - 1)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the product of the bin's capacity and the square root of the reciprocal of the difference between its capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the inverse of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of the bin's capacity raised to a power and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins ** item) / (bins - item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Calculate the score of a bin as the product of the difference between its maximum and current capacity and the reciprocal of the capacity difference between the bin and the item, multiplied by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (bins - item) * (1 / (bins - item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the bin's index and the logarithm of the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the bin's index and the logarithm of the reciprocal of the difference between the bin's capacity and the item size\n scores = np.log(np.reciprocal(bins - item)) * np.arange(len(bins))\n \n # Return the scores\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + ((1 - bins) * (1 / (item - bins)))\n \n # Normalize the scores to ensure they add up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index\n scores = (bins / item) - np.arange(len(bins))\n \n # Return the scores\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiply each bin's capacity by the square of the reciprocal of the bin's index, multiplied by the square root of the reciprocal of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the formula provided\n scores = (bins * (np.sqrt(item) / bins)) ** 2\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_13.json
================================================
[
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the inverse of the item size multiplied by the square root of the product of the bin's capacity and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.sqrt(bins * item) - 1) / (np.sqrt(bins) - 1)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the product of the bin's capacity and the square root of the reciprocal of the difference between its capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the reciprocal of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between the bin's capacity and the item size\n scores = np.exp(-(bins - item)) / (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power\n scores = np.exp(-((bins - item) ** 2)) * (np.arange(len(bins)) + 1) ** 0.5\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the inverse of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of the bin's capacity raised to a power and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins ** item) / (bins - item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score of a bin as the product of the bin's position and the difference between its maximum and current capacity, divided by the difference between the bin and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on its position and capacity\n scores = (np.arange(len(bins)) + 1) * (bins - item) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the bin's index and the logarithm of the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the bin's index and the logarithm of the reciprocal of the difference between the bin's capacity and the item size\n scores = np.log(np.reciprocal(bins - item)) * np.arange(len(bins))\n \n # Return the scores\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin as the product of the bin's capacity minus the item size raised to a power, and then divide this value by the product of the bin's capacity and the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) ** 0.5 / (bins * (bins - item))\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_14.json
================================================
[
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the inverse of the item size multiplied by the square root of the product of the bin's capacity and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.sqrt(bins * item) - 1) / (np.sqrt(bins) - 1)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the product of the bin's capacity and the square root of the reciprocal of the difference between its capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the reciprocal of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between the bin's capacity and the item size\n scores = np.exp(-(bins - item)) / (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power\n scores = np.exp(-((bins - item) ** 2)) * (np.arange(len(bins)) + 1) ** 0.5\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the inverse of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of the bin's capacity raised to a power and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins ** item) / (bins - item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score of a bin as the product of the bin's position and the difference between its maximum and current capacity, divided by the difference between the bin and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on its position and capacity\n scores = (np.arange(len(bins)) + 1) * (bins - item) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the bin's index and the logarithm of the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the bin's index and the logarithm of the reciprocal of the difference between the bin's capacity and the item size\n scores = np.log(np.reciprocal(bins - item)) * np.arange(len(bins))\n \n # Return the scores\n return scores",
"objective": 0.04155,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_15.json
================================================
[
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size\n scores = (bins ** (np.arange(len(bins)) + 1)) / (bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the inverse of the item size multiplied by the square root of the product of the bin's capacity and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.sqrt(bins * item) - 1) / (np.sqrt(bins) - 1)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the product of the bin's capacity and the square root of the reciprocal of the difference between its capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the reciprocal of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between the bin's capacity and the item size\n scores = np.exp(-(bins - item)) / (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power\n scores = np.exp(-((bins - item) ** 2)) * (np.arange(len(bins)) + 1) ** 0.5\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the inverse of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of the bin's capacity raised to a power and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins ** item) / (bins - item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score of a bin as the product of the bin's position and the difference between its maximum and current capacity, divided by the difference between the bin and the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on its position and capacity\n scores = (np.arange(len(bins)) + 1) * (bins - item) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_16.json
================================================
[
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size\n scores = (bins ** (np.arange(len(bins)) + 1)) / (bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the inverse of the item size multiplied by the square root of the product of the bin's capacity and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.sqrt(bins * item) - 1) / (np.sqrt(bins) - 1)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score of each bin as the square root of the reciprocal of the difference between its capacity and the item size, divided by the bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) / bins\n \n # Return the scores for all bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the reciprocal of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between the bin's capacity and the item size\n scores = np.exp(-(bins - item)) / (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power\n scores = np.exp(-((bins - item) ** 2)) * (np.arange(len(bins)) + 1) ** 0.5\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the inverse of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of the bin's capacity raised to a power and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins ** item) / (bins - item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the scores as linear combination between the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(bins - item)) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_17.json
================================================
[
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size\n scores = (bins ** (np.arange(len(bins)) + 1)) / (bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " Modified algorithm: Calculate the scores for each bin as the product of the square root of the bin's capacity and the reciprocal of the difference between the bin's capacity and the item size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(bins) / (bins - item)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score of each bin as the square root of the reciprocal of the difference between its capacity and the item size, divided by the bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) / bins\n \n # Return the scores for all bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the reciprocal of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between the bin's capacity and the item size\n scores = np.exp(-(bins - item)) / (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power\n scores = np.exp(-((bins - item) ** 2)) * (np.arange(len(bins)) + 1) ** 0.5\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the inverse of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the product of the bin's capacity raised to a power and the reciprocal of the difference between the bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins ** item) / (bins - item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the scores as linear combination between the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(bins - item)) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_18.json
================================================
[
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size\n scores = (bins ** (np.arange(len(bins)) + 1)) / (bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Algorithm Description: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.exp(-np.abs(bins - item)) + np.log(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Updated algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to bin indices\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of bin capacities and the square of item size\n diff = np.square(bins) - np.square(item)\n # Divide the sum of rest capacities by the difference\n scores = rest_capacities / diff\n # Return the scores as a NumPy array\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * item) / (np.square(bins) - np.square(item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the square root of the bin's index",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the square root of the bin's index\n scores = np.exp(-((bins - item) ** 2)) + np.sqrt(np.arange(len(bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " Modified algorithm: Calculate the scores for each bin as the product of the square root of the bin's capacity and the reciprocal of the difference between the bin's capacity and the item size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(bins) / (bins - item)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score of each bin as the square root of the reciprocal of the difference between its capacity and the item size, divided by the bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) / bins\n \n # Return the scores for all bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the reciprocal of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between the bin's capacity and the item size\n scores = np.exp(-(bins - item)) / (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores equivalently as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores equivalently as the product of exponential of the difference between the rest capacity of the bin and the item size and the bin's index raised to a power\n scores = np.exp(-((bins - item) ** 2)) * (np.arange(len(bins)) + 1) ** 0.5\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the inverse of the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_19.json
================================================
[
{
"algorithm": "New algorithm: Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) / np.sqrt(bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to the power of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the bin's capacity and the item size\n reciprocal_diff = 1 / (bins - item)\n \n # Calculate the bin's index raised to the power of the rest capacity\n powered_index = np.power(np.arange(len(bins)), bins)\n \n # Multiply the reciprocal difference and the powered index\n scores = reciprocal_diff * powered_index\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size\n scores = (bins ** (np.arange(len(bins)) + 1)) / (bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Algorithm Description: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.exp(-np.abs(bins - item)) + np.log(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, multiplied by bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the power of the bin index\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of the bin capacity and the square of the item size\n diff = np.square(bins) - np.square(item)\n # Calculate the scores for each bin\n scores = (rest_capacities / diff) * bins\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Updated algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to bin indices\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of bin capacities and the square of item size\n diff = np.square(bins) - np.square(item)\n # Divide the sum of rest capacities by the difference\n scores = rest_capacities / diff\n # Return the scores as a NumPy array\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * item) / (np.square(bins) - np.square(item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the square root of the bin's index",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the square root of the bin's index\n scores = np.exp(-((bins - item) ** 2)) + np.sqrt(np.arange(len(bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " Modified algorithm: Calculate the scores for each bin as the product of the square root of the bin's capacity and the reciprocal of the difference between the bin's capacity and the item size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(bins) / (bins - item)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score of each bin as the square root of the reciprocal of the difference between its capacity and the item size, divided by the bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) / bins\n \n # Return the scores for all bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_2.json
================================================
[
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each feasible bin as the sum of the square of the bin's rest capacity and the negative of item size multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = -np.square(bins) * item\n \n # Add the rest capacity of each bin to the scores\n scores += bins\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the sum of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity\n scores = (np.reciprocal(np.abs(bins - item)) ** 0.5) / bins\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculating scores based on rest capacities and item size, assigning items to bins with the highest score, using a score function of (item / rest capacity) to maximize bin utilization and minimize used bins. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its rest capacity and item size\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item / bins[i]\n else:\n scores[i] = 0\n \n # Return the scores in descending order\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the square root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the square root of the bin's index\n scores = (np.reciprocal(bins - item) * np.sqrt(np.arange(len(bins))))\n \n # Return the scores\n return scores",
"objective": 0.04397,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size, and using a logarithmic function to increase the penalty for using larger bins. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size\n scores = (bins ** 2) / (bins - item)\n \n # Apply a logarithmic function to increase the penalty for using larger bins\n scores = np.log(scores + 1)\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate bin score using the natural logarithm of the ratio of item size to the difference between bin rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic ratio of item size to bin rest capacity\n ratios = np.log(item / (bins - item))\n \n # Calculate the scores for each bin based on the ratios\n scores = ratios * (bins - item)\n \n return scores",
"objective": 0.05081,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the score of a bin by subtracting the item size from the bin's rest capacity, dividing it by the difference between the bin's rest capacity and the maximum bin capacity, then adding 1 and finally taking the natural logarithm.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.log((bins - item) / (bins - max(bins))) + 1\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the reciprocal of the bin's index, using a logarithmic function with a scaling factor of 0.5.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the reciprocal of the bin's index, using a logarithmic function with a scaling factor of 0.5\n scores = np.log(np.abs(bins - item)) / (np.log(bins) + 0.5)\n \n # Scale the scores by the reciprocal of the bin's index\n scores *= 1 / np.arange(len(bins))\n \n return scores",
"objective": 0.05946,
"other_inf": null
},
{
"algorithm": "Algorithm: Score bins with their rest capacities raised to the power of their maximum capacity, assigning items to bins with the maximum score and excluding bins with maximum rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its rest capacity raised to the power of its maximum capacity\n scores = np.power(bins, item)\n \n # Exclude bins with maximum rest capacity from the scores\n scores[bins == np.max(bins)] = 0\n \n return scores",
"objective": 0.06932,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_20.json
================================================
[
{
"algorithm": "New algorithm: Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) / np.sqrt(bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to the power of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the bin's capacity and the item size\n reciprocal_diff = 1 / (bins - item)\n \n # Calculate the bin's index raised to the power of the rest capacity\n powered_index = np.power(np.arange(len(bins)), bins)\n \n # Multiply the reciprocal difference and the powered index\n scores = reciprocal_diff * powered_index\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size\n scores = (bins ** (np.arange(len(bins)) + 1)) / (bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Updated algorithm: Compute the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * np.arange(len(bins)) / (np.square(bins) - np.square(item)))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Algorithm Description: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.exp(-np.abs(bins - item)) + np.log(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, multiplied by bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the power of the bin index\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of the bin capacity and the square of the item size\n diff = np.square(bins) - np.square(item)\n # Calculate the scores for each bin\n scores = (rest_capacities / diff) * bins\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Updated algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to bin indices\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of bin capacities and the square of item size\n diff = np.square(bins) - np.square(item)\n # Divide the sum of rest capacities by the difference\n scores = rest_capacities / diff\n # Return the scores as a NumPy array\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * item) / (np.square(bins) - np.square(item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the square root of the bin's index",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the square root of the bin's index\n scores = np.exp(-((bins - item) ** 2)) + np.sqrt(np.arange(len(bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": " Modified algorithm: Calculate the scores for each bin as the product of the square root of the bin's capacity and the reciprocal of the difference between the bin's capacity and the item size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(bins) / (bins - item)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score of each bin as the square root of the reciprocal of the difference between its capacity and the item size, divided by the bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) / bins\n \n # Return the scores for all bins\n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_21.json
================================================
[
{
"algorithm": "New algorithm: Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) / np.sqrt(bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the square root of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins))) + 1\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.02646,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to the power of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the bin's capacity and the item size\n reciprocal_diff = 1 / (bins - item)\n \n # Calculate the bin's index raised to the power of the rest capacity\n powered_index = np.power(np.arange(len(bins)), bins)\n \n # Multiply the reciprocal difference and the powered index\n scores = reciprocal_diff * powered_index\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between bin's capacity and the item size\n scores = (bins ** (np.arange(len(bins)) + 1)) / (bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Updated algorithm: Compute the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * np.arange(len(bins)) / (np.square(bins) - np.square(item)))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "Calculate the product of the bin's index raised to the bin's rest capacity divided by the square root of the difference between the bin's capacity and item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the bin's index raised to the bin's rest capacity\n # divided by the square root of the difference between the bin's capacity\n # and item's size\n scores = (np.arange(len(bins)) + 1) ** (bins - item) / np.sqrt(bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Algorithm Description: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.exp(-np.abs(bins - item)) + np.log(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, multiplied by bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the power of the bin index\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of the bin capacity and the square of the item size\n diff = np.square(bins) - np.square(item)\n # Calculate the scores for each bin\n scores = (rest_capacities / diff) * bins\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size, where the weights are the square of the bin's index or the logarithm of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size\n scores = (np.minimum(bins, item) / np.maximum(bins - item, 0)) ** 2 + (np.log(bins) / np.log(item)) ** 2\n \n # Return the scores for the bins\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * item) / (np.square(bins) - np.square(item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the square root of the bin's index",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the square root of the bin's index\n scores = np.exp(-((bins - item) ** 2)) + np.sqrt(np.arange(len(bins)))\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Main steps: Adjust the rest capacities by dividing the rest capacities of all bins by the index of each bin, and then multiply this value by the square root of the capacity of the bin. Finally, divide this value by the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the adjusted rest capacities\n adjusted_rest_capacities = bins / (np.arange(len(bins)) + 1) * np.sqrt(bins)\n \n # Calculate the scores\n scores = adjusted_rest_capacities / abs(item - bins)\n \n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_22.json
================================================
[
{
"algorithm": "New algorithm: Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) / np.sqrt(bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "Calculate the product of the square root of rest capacity raised to the bin's index, multiplied by the bin index, divided by the difference between the bin's capacity and the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the square root of rest capacity raised to the bin's index, multiplied by the bin index, divided by the difference between the bin's capacity and the item size\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) * (np.arange(len(bins)) + 1) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the square root of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins))) + 1\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.02646,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to the power of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the bin's capacity and the item size\n reciprocal_diff = 1 / (bins - item)\n \n # Calculate the bin's index raised to the power of the rest capacity\n powered_index = np.power(np.arange(len(bins)), bins)\n \n # Multiply the reciprocal difference and the powered index\n scores = reciprocal_diff * powered_index\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the sum of bin's index raised to the power of rest capacity by the product of the square of item size and the square of the difference between bin's capacity and the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the indices of the bins raised to the power of their rest capacities\n idx_pow = np.power(np.arange(len(bins)), bins)\n # Calculate the product of the square of the item size and the square of the difference between the bin's capacity and the item size\n item_size_sq = np.square(item)\n bin_capacity_diff_sq = np.square(bins - item)\n # Calculate the scores for each bin based on the formula\n scores = idx_pow / (item_size_sq * bin_capacity_diff_sq)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Compute the score for each bin as the rest capacity raised to the bin's index divided by the difference between the capacity and the item size, to prioritize bins with higher remaining capacity while accounting for item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin as the rest capacity raised to the bin's index divided by the difference between the capacity and the item size\n scores = np.power(bins, np.arange(len(bins))) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Updated algorithm: Compute the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * np.arange(len(bins)) / (np.square(bins) - np.square(item)))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "Calculate the product of the bin's index raised to the bin's rest capacity divided by the square root of the difference between the bin's capacity and item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the bin's index raised to the bin's rest capacity\n # divided by the square root of the difference between the bin's capacity\n # and item's size\n scores = (np.arange(len(bins)) + 1) ** (bins - item) / np.sqrt(bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Algorithm Description: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.exp(-np.abs(bins - item)) + np.log(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by multiplying its rest capacity with the inverse of the difference between its capacity and the item size, and then subtracting the bin's index from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the difference between the item size and the bin capacity\n inv_diff = 1 / (np.array(bins) - item)\n \n # Multiply the inverse of the difference with the rest capacity of each bin\n scores = inv_diff * np.array(bins)\n \n # Subtract the bin index from the scores\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, multiplied by bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the power of the bin index\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of the bin capacity and the square of the item size\n diff = np.square(bins) - np.square(item)\n # Calculate the scores for each bin\n scores = (rest_capacities / diff) * bins\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size, where the weights are the square of the bin's index or the logarithm of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size\n scores = (np.minimum(bins, item) / np.maximum(bins - item, 0)) ** 2 + (np.log(bins) / np.log(item)) ** 2\n \n # Return the scores for the bins\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * item) / (np.square(bins) - np.square(item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03924,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_23.json
================================================
[
{
"algorithm": "New algorithm: Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) / np.sqrt(bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is the product of square root of rest capacity to the power of bin index multiplied by the sum of rest capacity and item size, divided by their difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) * (bins + item) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the square root of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins))) + 1\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.02646,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to the power of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the bin's capacity and the item size\n reciprocal_diff = 1 / (bins - item)\n \n # Calculate the bin's index raised to the power of the rest capacity\n powered_index = np.power(np.arange(len(bins)), bins)\n \n # Multiply the reciprocal difference and the powered index\n scores = reciprocal_diff * powered_index\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the sum of bin's index raised to the power of rest capacity by the product of the square of item size and the square of the difference between bin's capacity and the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the indices of the bins raised to the power of their rest capacities\n idx_pow = np.power(np.arange(len(bins)), bins)\n # Calculate the product of the square of the item size and the square of the difference between the bin's capacity and the item size\n item_size_sq = np.square(item)\n bin_capacity_diff_sq = np.square(bins - item)\n # Calculate the scores for each bin based on the formula\n scores = idx_pow / (item_size_sq * bin_capacity_diff_sq)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Compute the score for each bin as the rest capacity raised to the bin's index divided by the difference between the capacity and the item size, to prioritize bins with higher remaining capacity while accounting for item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin as the rest capacity raised to the bin's index divided by the difference between the capacity and the item size\n scores = np.power(bins, np.arange(len(bins))) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Updated algorithm: Compute the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * np.arange(len(bins)) / (np.square(bins) - np.square(item)))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "Calculate the product of the bin's index raised to the bin's rest capacity divided by the square root of the difference between the bin's capacity and item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the bin's index raised to the bin's rest capacity\n # divided by the square root of the difference between the bin's capacity\n # and item's size\n scores = (np.arange(len(bins)) + 1) ** (bins - item) / np.sqrt(bins - item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Algorithm Description: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.exp(-np.abs(bins - item)) + np.log(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by multiplying its rest capacity with the inverse of the difference between its capacity and the item size, and then subtracting the bin's index from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the difference between the item size and the bin capacity\n inv_diff = 1 / (np.array(bins) - item)\n \n # Multiply the inverse of the difference with the rest capacity of each bin\n scores = inv_diff * np.array(bins)\n \n # Subtract the bin index from the scores\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, multiplied by bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the power of the bin index\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of the bin capacity and the square of the item size\n diff = np.square(bins) - np.square(item)\n # Calculate the scores for each bin\n scores = (rest_capacities / diff) * bins\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size, where the weights are the square of the bin's index or the logarithm of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size\n scores = (np.minimum(bins, item) / np.maximum(bins - item, 0)) ** 2 + (np.log(bins) / np.log(item)) ** 2\n \n # Return the scores for the bins\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, to account for limited capacity while encouraging bins with higher remaining capacity to be used first.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * item) / (np.square(bins) - np.square(item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03924,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_24.json
================================================
[
{
"algorithm": "New algorithm: Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) / np.sqrt(bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is the product of square root of rest capacity to the power of bin index multiplied by the sum of rest capacity and item size, divided by their difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) * (bins + item) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the square root of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins))) + 1\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.02646,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to the power of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the bin's capacity and the item size\n reciprocal_diff = 1 / (bins - item)\n \n # Calculate the bin's index raised to the power of the rest capacity\n powered_index = np.power(np.arange(len(bins)), bins)\n \n # Multiply the reciprocal difference and the powered index\n scores = reciprocal_diff * powered_index\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the sum of bin's index raised to the power of rest capacity by the product of the square of item size and the square of the difference between bin's capacity and the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the indices of the bins raised to the power of their rest capacities\n idx_pow = np.power(np.arange(len(bins)), bins)\n # Calculate the product of the square of the item size and the square of the difference between the bin's capacity and the item size\n item_size_sq = np.square(item)\n bin_capacity_diff_sq = np.square(bins - item)\n # Calculate the scores for each bin based on the formula\n scores = idx_pow / (item_size_sq * bin_capacity_diff_sq)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Compute the score for each bin as the rest capacity raised to the bin's index divided by the difference between the capacity and the item size, to prioritize bins with higher remaining capacity while accounting for item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin as the rest capacity raised to the bin's index divided by the difference between the capacity and the item size\n scores = np.power(bins, np.arange(len(bins))) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Updated algorithm: Compute the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * np.arange(len(bins)) / (np.square(bins) - np.square(item)))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "Calculate the product of the bin's index raised to the bin's rest capacity divided by the power of the difference between the bin's capacity and item's size with the power being a new parameter.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the bin's index raised to the bin's rest capacity\n # divided by the power of the difference between the bin's capacity and item's size\n scores = (np.arange(len(bins)) + 1) ** (bins - item) / (bins - item) ** 0.5\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the difference between the bin's capacity raised to the bin's index and the item size raised to the bin's index, divided by the difference between the square of bin's capacity and the square of item size, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin's capacity raised to the bin's index and the item size raised to the bin's index\n diff = (bins ** (np.arange(len(bins)) + 1) - item ** (np.arange(len(bins)) + 1))\n \n # Divide the difference by the difference between the square of bin's capacity and the square of item size\n scores = diff / (bins ** 2 - item ** 2)\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Algorithm Description: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.exp(-np.abs(bins - item)) + np.log(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by multiplying its rest capacity with the inverse of the difference between its capacity and the item size, and then subtracting the bin's index from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the difference between the item size and the bin capacity\n inv_diff = 1 / (np.array(bins) - item)\n \n # Multiply the inverse of the difference with the rest capacity of each bin\n scores = inv_diff * np.array(bins)\n \n # Subtract the bin index from the scores\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, multiplied by bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the power of the bin index\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of the bin capacity and the square of the item size\n diff = np.square(bins) - np.square(item)\n # Calculate the scores for each bin\n scores = (rest_capacities / diff) * bins\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size, where the weights are the square of the bin's index or the logarithm of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size\n scores = (np.minimum(bins, item) / np.maximum(bins - item, 0)) ** 2 + (np.log(bins) / np.log(item)) ** 2\n \n # Return the scores for the bins\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_25.json
================================================
[
{
"algorithm": "New algorithm: Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the square root of rest capacity raised to bin's index, divided by the square root of the difference between bin's capacity and the item size\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) / np.sqrt(bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is the product of square root of rest capacity to the power of bin index multiplied by the sum of rest capacity and item size, divided by their difference.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(bins) ** (np.arange(len(bins)) + 1) * (bins + item) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the square root of the bin's index or the square root of the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins)) + 1) / np.sqrt(len(bins))\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.01519,
"other_inf": null
},
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the square root of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n weights = np.sqrt(np.arange(len(bins))) + 1\n scores = (weights * bins) / (item - bins)\n \n # Return the scores for the bins\n return scores",
"objective": 0.02646,
"other_inf": null
},
{
"algorithm": "Assign to each bin the value of the rest capacity raised to the power of the index of that bin, and then divide this value by the square root of the absolute difference between the current capacity and the size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities raised to the power of the index of each bin\n rest_capacities = np.power(bins, np.arange(len(bins)))\n \n # Calculate the absolute difference between the current capacity and the size of the item\n abs_diff = np.abs(np.subtract(bins, item))\n \n # Divide the rest capacities by the square root of the absolute difference\n scores = np.divide(rest_capacities, np.sqrt(abs_diff))\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign score to each bin as the multiplication of the reciprocal of the difference between the bin's rest capacity and the item size and the bin's index raised to the power of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the bin's rest capacity and the item size\n reciprocal_diff = 1 / (bins - item)\n \n # Raise the bin's index to the power of the rest capacity\n powered_index = np.power(np.arange(len(bins)), bins)\n \n # Multiply the reciprocal difference and the powered index\n scores = reciprocal_diff * powered_index\n \n return scores",
"objective": 0.03491,
"other_inf": null
},
{
"algorithm": "New algorithm: Divide the sum of bin's index raised to the power of rest capacity by the product of the square of item size and the square of the difference between bin's capacity and the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the indices of the bins raised to the power of their rest capacities\n idx_pow = np.power(np.arange(len(bins)), bins)\n # Calculate the product of the square of the item size and the square of the difference between the bin's capacity and the item size\n item_size_sq = np.square(item)\n bin_capacity_diff_sq = np.square(bins - item)\n # Calculate the scores for each bin based on the formula\n scores = idx_pow / (item_size_sq * bin_capacity_diff_sq)\n return scores",
"objective": 0.03572,
"other_inf": null
},
{
"algorithm": "Compute the score for each bin as the rest capacity raised to the bin's index divided by the difference between the capacity and the item size, to prioritize bins with higher remaining capacity while accounting for item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin as the rest capacity raised to the bin's index divided by the difference between the capacity and the item size\n scores = np.power(bins, np.arange(len(bins))) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Updated algorithm: Compute the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the bin's index, multiplied by the bin's index, divided by the difference between the square of bin's capacity and the square of item size\n scores = (np.power(bins, np.arange(len(bins))) * np.arange(len(bins)) / (np.square(bins) - np.square(item)))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03763,
"other_inf": null
},
{
"algorithm": "Calculate the product of the bin's index raised to the bin's rest capacity divided by the power of the difference between the bin's capacity and item's size with the power being a new parameter.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the bin's index raised to the bin's rest capacity\n # divided by the power of the difference between the bin's capacity and item's size\n scores = (np.arange(len(bins)) + 1) ** (bins - item) / (bins - item) ** 0.5\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03773,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the difference between the bin's capacity raised to the bin's index and the item size raised to the bin's index, divided by the difference between the square of bin's capacity and the square of item size, to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the bin's capacity raised to the bin's index and the item size raised to the bin's index\n diff = (bins ** (np.arange(len(bins)) + 1) - item ** (np.arange(len(bins)) + 1))\n \n # Divide the difference by the difference between the square of bin's capacity and the square of item size\n scores = diff / (bins ** 2 - item ** 2)\n \n return scores",
"objective": 0.03783,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square root of the exponential of the difference between the rest capacity of the bin and the item size and the bin's index\n scores = np.sqrt(np.exp(-((bins - item) ** 2)))\n \n # Add a small value to avoid division by zero\n scores += 1e-6\n \n # Normalize the scores to ensure they sum up to 1\n scores /= np.sum(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Algorithm Description: Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the exponential of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.exp(-np.abs(bins - item)) + np.log(np.arange(len(bins)))\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by multiplying its rest capacity with the inverse of the difference between its capacity and the item size, and then subtracting the bin's index from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the difference between the item size and the bin capacity\n inv_diff = 1 / (np.array(bins) - item)\n \n # Multiply the inverse of the difference with the rest capacity of each bin\n scores = inv_diff * np.array(bins)\n \n # Subtract the bin index from the scores\n scores -= np.arange(len(bins))\n \n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the sum of rest capacity raised to bin's index, divided by the difference between the square of bin's capacity and the square of item size, multiplied by bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of rest capacities raised to the power of the bin index\n rest_capacities = np.power(bins, np.arange(len(bins)))\n # Calculate the difference between the square of the bin capacity and the square of the item size\n diff = np.square(bins) - np.square(item)\n # Calculate the scores for each bin\n scores = (rest_capacities / diff) * bins\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the sum of the remaining capacity and the reciprocal of the bin's index multiplied by the reciprocal of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the reciprocal of the bin index and the reciprocal of the remaining capacity\n reciprocal_bin_index = 1 / (np.arange(len(bins)) + 1)\n reciprocal_remaining_capacity = 1 / remaining_capacity\n \n # Calculate the score for each bin\n scores = reciprocal_bin_index * reciprocal_remaining_capacity\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size, where the weights are the square of the bin's index or the logarithm of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as a weighted sum of the number of items it can still accommodate and the reciprocal of the difference between its capacity and the item size\n scores = (np.minimum(bins, item) / np.maximum(bins - item, 0)) ** 2 + (np.log(bins) / np.log(item)) ** 2\n \n # Return the scores for the bins\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "For each bin, score is computed as a weighted sum of the bin's capacity, rest capacity, and the reciprocal of the difference between the capacity and the item size, where the weights are inversely proportional to the square root of the bin's index, capacity, and rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin based on the given formula\n scores = (np.sqrt(bins) * item / (bins - item)) + (np.sqrt(bins) * (bins - item) / (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03914,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_3.json
================================================
[
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each feasible bin as the sum of the inverse of the bin's rest capacity and the negative of item size squared multiplied by the square of the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = -np.square(item) * np.square(bins) / (bins + 1e-8)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the sum of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity\n scores = (np.reciprocal(np.abs(bins - item)) ** 0.5) / bins\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores for bins based on a power function of the ratio of item size to bin rest capacity, with the power being the ratio of the sum of bin rest capacities to total bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power function of the ratio of item size to bin rest capacity\n power = (sum(bins) / len(bins)) ** (len(bins) - 1)\n # Calculate the scores for each bin based on the power function\n scores = np.power(item / bins, power)\n # Return the scores\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the arithmetic mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than half of the maximum capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average rest capacity and maximum capacity\n avg_rest = np.mean(bins)\n max_capacity = np.max(bins)\n \n # Apply a penalty to bins with more than half of the maximum capacity\n penalties = np.where(bins > max_capacity / 2, 0.5 * (max_capacity - bins), 0)\n \n # Calculate the scores for each bin\n scores = avg_rest + penalties\n \n return scores",
"objective": 0.04357,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the square root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the square root of the bin's index\n scores = (np.reciprocal(bins - item) * np.sqrt(np.arange(len(bins))))\n \n # Return the scores\n return scores",
"objective": 0.04397,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size, and using a logarithmic function to increase the penalty for using larger bins. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size\n scores = (bins ** 2) / (bins - item)\n \n # Apply a logarithmic function to increase the penalty for using larger bins\n scores = np.log(scores + 1)\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "New algorithm:\n1. Calculate the ratio of item size to each bin's rest capacity, and the product of the ratio and the rest capacity.\n2. Calculate the score for each bin based on the ratio and the product.\n3. Return the scores for the bins for assignment",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of item size to each bin's rest capacity\n ratios = np.divide(item, bins)\n \n # Calculate the product of the ratio and the rest capacity\n products = np.multiply(ratios, bins)\n \n # Calculate the score for each bin based on the ratio and the product\n scores = np.maximum(products, 0)\n \n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate bin score using the natural logarithm of the ratio of item size to the difference between bin rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic ratio of item size to bin rest capacity\n ratios = np.log(item / (bins - item))\n \n # Calculate the scores for each bin based on the ratios\n scores = ratios * (bins - item)\n \n return scores",
"objective": 0.05081,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the square root of the bin's remaining capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the square root of the bin's remaining capacity\n scores = (np.reciprocal(bins - item) * np.sqrt(bins))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the score of a bin by subtracting the item size from the bin's rest capacity, dividing it by the difference between the bin's rest capacity and the maximum bin capacity, then adding 1 and finally taking the natural logarithm.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.log((bins - item) / (bins - max(bins))) + 1\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score defined as the product of the bin's capacity and the inverse of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the product of the bin's capacity and the inverse of its rest capacity\n scores = np.array([bin_capacity * (1 / bin_rest_capacity) for bin_capacity, bin_rest_capacity in zip(bins, bins)])\n \n # Assign the item to the bin with the highest score\n best_bin_index = np.argmax(scores)\n best_bin_score = scores[best_bin_index]\n \n # Return the scores for all bins\n return scores",
"objective": 0.05695,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_4.json
================================================
[
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each feasible bin as the sum of the inverse of the bin's rest capacity and the negative of item size squared multiplied by the square of the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = -np.square(item) * np.square(bins) / (bins + 1e-8)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the sum of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity\n scores = (np.reciprocal(np.abs(bins - item)) ** 0.5) / bins\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores for bins based on a power function of the ratio of item size to bin rest capacity, with the power being the ratio of the sum of bin rest capacities to total bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power function of the ratio of item size to bin rest capacity\n power = (sum(bins) / len(bins)) ** (len(bins) - 1)\n # Calculate the scores for each bin based on the power function\n scores = np.power(item / bins, power)\n # Return the scores\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": " New Algorithm: Calculate the scores as the difference between the bin's capacity divided by the item size and the number of bins, scaled by the bin index. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the difference between the bin's capacity divided by the item size and the number of bins, scaled by the bin index\n scores = (bins / item) - (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the arithmetic mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than half of the maximum capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average rest capacity and maximum capacity\n avg_rest = np.mean(bins)\n max_capacity = np.max(bins)\n \n # Apply a penalty to bins with more than half of the maximum capacity\n penalties = np.where(bins > max_capacity / 2, 0.5 * (max_capacity - bins), 0)\n \n # Calculate the scores for each bin\n scores = avg_rest + penalties\n \n return scores",
"objective": 0.04357,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the cubic root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the cubic root of the bin's index\n scores = (np.reciprocal(bins - item) * np.cbrt(np.arange(len(bins))))\n \n # Return the scores\n return scores",
"objective": 0.04397,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size, and using a logarithmic function to increase the penalty for using larger bins. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size\n scores = (bins ** 2) / (bins - item)\n \n # Apply a logarithmic function to increase the penalty for using larger bins\n scores = np.log(scores + 1)\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "New algorithm:\n1. Calculate the ratio of item size to each bin's rest capacity, and the product of the ratio and the rest capacity.\n2. Calculate the score for each bin based on the ratio and the product.\n3. Return the scores for the bins for assignment",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of item size to each bin's rest capacity\n ratios = np.divide(item, bins)\n \n # Calculate the product of the ratio and the rest capacity\n products = np.multiply(ratios, bins)\n \n # Calculate the score for each bin based on the ratio and the product\n scores = np.maximum(products, 0)\n \n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the sum of the reciprocal of difference between the bin's capacity and item size and the square root of the bin's index, divided by the difference between maximum capacity and bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the reciprocal of difference between the bin's capacity and item size and the square root of the bin's index, divided by the difference between maximum capacity and bin's capacity\n scores = (np.reciprocal(np.abs(bins - item)) ** 0.5) / (np.maximum(bins, item) - bins)\n \n # Return the scores\n return scores",
"objective": 0.04638,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the exponent of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the exponent of the bin's index\n scores = np.reciprocal(np.abs(bins - item)) ** (bins.argsort() + 1)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04679,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate bin score using the natural logarithm of the ratio of item size to the difference between bin rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic ratio of item size to bin rest capacity\n ratios = np.log(item / (bins - item))\n \n # Calculate the scores for each bin based on the ratios\n scores = ratios * (bins - item)\n \n return scores",
"objective": 0.05081,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_5.json
================================================
[
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each feasible bin as the sum of the inverse of the bin's rest capacity and the negative of item size squared multiplied by the square of the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = -np.square(item) * np.square(bins) / (bins + 1e-8)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity\n scores = (np.reciprocal(np.abs(bins - item)) ** 0.5) / bins\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index, scaled by the bin index\n scores = (bins / item) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the arithmetic mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than half of the maximum capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average rest capacity and maximum capacity\n avg_rest = np.mean(bins)\n max_capacity = np.max(bins)\n \n # Apply a penalty to bins with more than half of the maximum capacity\n penalties = np.where(bins > max_capacity / 2, 0.5 * (max_capacity - bins), 0)\n \n # Calculate the scores for each bin\n scores = avg_rest + penalties\n \n return scores",
"objective": 0.04357,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the cubic root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the cubic root of the bin's index\n scores = (np.reciprocal(bins - item) * np.cbrt(np.arange(len(bins))))\n \n # Return the scores\n return scores",
"objective": 0.04397,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size, and using a logarithmic function to increase the penalty for using larger bins. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size\n scores = (bins ** 2) / (bins - item)\n \n # Apply a logarithmic function to increase the penalty for using larger bins\n scores = np.log(scores + 1)\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "Create a score by taking the product of the reciprocal of the difference between the bin capacity and item size, the square of the bin's capacity, and the inverse of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the bin capacity and item size\n r = np.reciprocal(np.subtract(bins, item))\n \n # Calculate the square of the bin's capacity\n s = np.square(bins)\n \n # Calculate the inverse of the bin's index\n i = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the final score\n scores = r * s * i\n \n return scores",
"objective": 0.04467,
"other_inf": null
},
{
"algorithm": "New algorithm:\n1. Calculate the ratio of item size to each bin's rest capacity, and the product of the ratio and the rest capacity.\n2. Calculate the score for each bin based on the ratio and the product.\n3. Return the scores for the bins for assignment",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of item size to each bin's rest capacity\n ratios = np.divide(item, bins)\n \n # Calculate the product of the ratio and the rest capacity\n products = np.multiply(ratios, bins)\n \n # Calculate the score for each bin based on the ratio and the product\n scores = np.maximum(products, 0)\n \n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the sum of the reciprocal of difference between the bin's capacity and item size and the square root of the bin's index, divided by the difference between maximum capacity and bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the sum of the reciprocal of difference between the bin's capacity and item size and the square root of the bin's index, divided by the difference between maximum capacity and bin's capacity\n scores = (np.reciprocal(np.abs(bins - item)) ** 0.5) / (np.maximum(bins, item) - bins)\n \n # Return the scores\n return scores",
"objective": 0.04638,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the exponent of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the exponent of the bin's index\n scores = np.reciprocal(np.abs(bins - item)) ** (bins.argsort() + 1)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04679,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_6.json
================================================
[
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each feasible bin as the sum of the inverse of the bin's rest capacity and the negative of item size squared multiplied by the square of the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = -np.square(item) * np.square(bins) / (bins + 1e-8)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and item size and the square root of the bin's index, divided by the bin's capacity\n scores = (np.reciprocal(np.abs(bins - item)) ** 0.5) / bins\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + ((1 - bins) * (1 / (item - bins)))\n \n # Normalize the scores to ensure they add up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index, scaled by the bin index\n scores = (bins / item) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the arithmetic mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than half of the maximum capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average rest capacity and maximum capacity\n avg_rest = np.mean(bins)\n max_capacity = np.max(bins)\n \n # Apply a penalty to bins with more than half of the maximum capacity\n penalties = np.where(bins > max_capacity / 2, 0.5 * (max_capacity - bins), 0)\n \n # Calculate the scores for each bin\n scores = avg_rest + penalties\n \n return scores",
"objective": 0.04357,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the cubic root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the cubic root of the bin's index\n scores = (np.reciprocal(bins - item) * np.cbrt(np.arange(len(bins))))\n \n # Return the scores\n return scores",
"objective": 0.04397,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size, and using a logarithmic function to increase the penalty for using larger bins. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the square of the bin's capacity multiplied by the inverse of the amount by which the bin's capacity exceeds the item size\n scores = (bins ** 2) / (bins - item)\n \n # Apply a logarithmic function to increase the penalty for using larger bins\n scores = np.log(scores + 1)\n \n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "Create a score by taking the product of the reciprocal of the difference between the bin capacity and item size, the square of the bin's capacity, and the inverse of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the difference between the bin capacity and item size\n r = np.reciprocal(np.subtract(bins, item))\n \n # Calculate the square of the bin's capacity\n s = np.square(bins)\n \n # Calculate the inverse of the bin's index\n i = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the final score\n scores = r * s * i\n \n return scores",
"objective": 0.04467,
"other_inf": null
},
{
"algorithm": "New algorithm:\n1. Calculate the ratio of item size to each bin's rest capacity, and the product of the ratio and the rest capacity.\n2. Calculate the score for each bin based on the ratio and the product.\n3. Return the scores for the bins for assignment",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of item size to each bin's rest capacity\n ratios = np.divide(item, bins)\n \n # Calculate the product of the ratio and the rest capacity\n products = np.multiply(ratios, bins)\n \n # Calculate the score for each bin based on the ratio and the product\n scores = np.maximum(products, 0)\n \n return scores",
"objective": 0.04518,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_7.json
================================================
[
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index\n scores = -np.log(bins / item) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each feasible bin as the sum of the inverse of the bin's rest capacity and the negative of item size squared multiplied by the square of the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = -np.square(item) * np.square(bins) / (bins + 1e-8)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the product of the bin's capacity and the square root of the reciprocal of the difference between its capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity; but in addition, if the rest capacity of the bin is less than or equal to half of its maximum capacity, the score is multiplied by a factor of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Multiply the score by 2 if the rest capacity of the bin is less than or equal to half of its maximum capacity\n scores[bins <= (bins / 2)] *= 2\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Calculate the score of a bin as the product of the difference between its maximum and current capacity and the reciprocal of the capacity difference between the bin and the item, multiplied by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (bins - item) * (1 / (bins - item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + ((1 - bins) * (1 / (item - bins)))\n \n # Normalize the scores to ensure they add up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index, scaled by the bin index\n scores = (bins / item) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the arithmetic mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than half of the maximum capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the average rest capacity and maximum capacity\n avg_rest = np.mean(bins)\n max_capacity = np.max(bins)\n \n # Apply a penalty to bins with more than half of the maximum capacity\n penalties = np.where(bins > max_capacity / 2, 0.5 * (max_capacity - bins), 0)\n \n # Calculate the scores for each bin\n scores = avg_rest + penalties\n \n return scores",
"objective": 0.04357,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the cubic root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the cubic root of the bin's index\n scores = (np.reciprocal(bins - item) * np.cbrt(np.arange(len(bins))))\n \n # Return the scores\n return scores",
"objective": 0.04397,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_8.json
================================================
[
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index\n scores = -np.log(bins / item) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the inverse of the item size multiplied by the square root of the product of the bin's capacity and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.sqrt(bins * item) - 1) / (np.sqrt(bins) - 1)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the product of the bin's capacity and the square root of the reciprocal of the difference between its capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity; but in addition, if the rest capacity of the bin is less than or equal to half of its maximum capacity, the score is multiplied by a factor of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Multiply the score by 2 if the rest capacity of the bin is less than or equal to half of its maximum capacity\n scores[bins <= (bins / 2)] *= 2\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Calculate the score of a bin as the product of the difference between its maximum and current capacity and the reciprocal of the capacity difference between the bin and the item, multiplied by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (bins - item) * (1 / (bins - item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + ((1 - bins) * (1 / (item - bins)))\n \n # Normalize the scores to ensure they add up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index, scaled by the bin index\n scores = (bins / item) - (np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiply each bin's capacity by the square of the reciprocal of the bin's index, multiplied by the square root of the reciprocal of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the formula provided\n scores = (bins * (np.sqrt(item) / bins)) ** 2\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run1/population_generation_9.json
================================================
[
{
"algorithm": "Novel Algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the bin's index multiplied by the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * bins) / (item - bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size, where the weights are the bin's index or the inverse of the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of its rest capacity and the reciprocal of the difference between its capacity and the item size\n scores = (bins * (1 - item / bins)) / (bins - item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03682,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the item size exceeds the bin's capacity, scaled by the log of the bin index\n scores = -np.log(bins / item) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the inverse of the amount by which the bin's capacity exceeds the item size, scaled by the bin index\n scores = (np.ones_like(bins) - (bins / item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the product of the reciprocal of the difference between the bin's capacity and the item size and the logarithm of the bin's index\n scores = np.log(np.reciprocal(bins - item)) + np.log(np.arange(len(bins)))\n \n # Return the scores\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the scores for each bin as the inverse of the item size multiplied by the square root of the product of the bin's capacity and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.sqrt(bins * item) - 1) / (np.sqrt(bins) - 1)\n \n # Return the scores\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score of each bin as the product of the bin's capacity and the square root of the reciprocal of the difference between its capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = np.sqrt(np.reciprocal(bins - item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: For each bin, score is computed as a weighted sum of the exponential of rest capacity divided by item size and reciprocal of rest capacity, with weights inversely proportional to the square root of bin index and the rest capacity; if rest capacity is less than half of max capacity, multiply score by two.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the weights for each bin\n weights = np.sqrt(np.arange(len(bins)) + 1) / (bins * item)\n \n # Compute the scores for each bin\n scores = np.exp(-weights * bins) / (bins * item)\n \n # Multiply the scores by two if the rest capacity is less than half of the max capacity\n scores[bins < item / 2] *= 2\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity; but in addition, if the rest capacity of the bin is less than or equal to half of its maximum capacity, the score is multiplied by a factor of 2.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + (item * (1 / (item - bins)))\n \n # Multiply the score by 2 if the rest capacity of the bin is less than or equal to half of its maximum capacity\n scores[bins <= (bins / 2)] *= 2\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores as the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic product of the reciprocal of the difference between the bin's capacity and the item size and the bin's index raised to a power\n scores = np.log(np.reciprocal(np.abs(bins - item))) ** (bins + 1)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores as the sum of the difference between maximum capacity and bin's capacity, divided by the difference between item size and maximum capacity, multiplied by the ratio of maximum capacity to bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (np.maximum(bins - item, 0) / (item - np.minimum(bins, item))) * (bins / np.maximum(bins, item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "Calculate the score of a bin as the product of the difference between its maximum and current capacity and the reciprocal of the capacity difference between the bin and the item, multiplied by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (bins - item) * (1 / (bins - item)) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size, where the weights are the product of the inverse of the bin's index and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the weighted sum of the rest capacity and the reciprocal of the difference between the capacity and the item size\n scores = (bins * (1 / (bins - item))) + ((1 - bins) * (1 / (item - bins)))\n \n # Normalize the scores to ensure they add up to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Re-calculate the score for each bin based on the item size, multiplying the score of a bin by the ratio of the item size to the remaining capacity to prioritize bins with more remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the remaining capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Prioritize bins with more remaining capacity\n scores[bins == 0] = 0\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores as the difference between the bin's capacity divided by the item size and the bin index\n scores = (bins / item) - np.arange(len(bins))\n \n # Return the scores\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Multiply each bin's capacity by the square of the reciprocal of the bin's index, multiplied by the square root of the reciprocal of the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the formula provided\n scores = (bins * (np.sqrt(item) / bins)) ** 2\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score based on the geometric mean of the rest capacity and the maximum capacity, and apply a penalty to bins with more than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the geometric mean of the rest capacities and the maximum capacity\n gmean = np.sqrt(np.prod(bins)) / np.sqrt(len(bins))\n max_capacity = np.max(bins)\n # Apply a penalty to bins with more than twice the item size\n penalties = np.where(bins > 2 * item, 0.5, 0)\n # Calculate the scores for each bin\n scores = (gmean - penalties) / max_capacity\n return scores",
"objective": 0.04316,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_1.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Normalize the bin capacities to the item size, then calculate the score as the maximum value among all bins minus the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bin capacities to the item size\n norm_bins = bins / item\n \n # Calculate the score for each bin\n scores = np.maximum(norm_bins - item, 0)\n \n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins with lower rest capacity and higher index by calculating the score as the product of the rest capacity and the reciprocal of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the reciprocal of the bin positions\n reciprocal_positions = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the scores for each bin\n scores = rest_capacities * reciprocal_positions\n \n return scores",
"objective": 0.04699,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the rest capacity, using a weighted sum of rest capacity and inverse of bin number, then returns scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin based on the rest capacity\n scores = (rest_capacities / np.maximum(rest_capacities, 1)) ** 0.5\n \n # Return the scores for each bin\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "The algorithm assigns a score to each bin based on the normalized bin capacity with a discount factor that exponentially decays with the bin order.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacities\n norm_capacities = bins / np.max(bins)\n \n # Calculate the discount factor\n discount_factor = np.exp(-np.arange(len(norm_capacities)) * 0.5)\n \n # Calculate the scores for each bin\n scores = (norm_capacities * discount_factor).cumsum()\n \n # Return the scores\n return scores",
"objective": 0.06097,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the rest capacity and a measure of the bin's position in the sequence.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the rest capacity and the bin's position in the sequence\n scores = np.zeros(len(bins))\n for i, bin_capacity in enumerate(bins):\n if bin_capacity >= item:\n scores[i] = (bin_capacity - item) / (len(bins) - i)\n else:\n scores[i] = 0\n return scores",
"objective": 0.11037,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin with the maximum score, where the score is calculated by dividing the remaining bin capacity by the item size and subtracting a penalty for bins with maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = (bins - item) / item\n \n # Subtract a penalty for bins with maximum capacity\n scores[bins == max(bins)] -= 10\n \n return scores",
"objective": 0.13231,
"other_inf": null
},
{
"algorithm": " New algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a weight factor to penalize bins with maximum capacity and avoid using them. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the remaining capacity\n scores = (bins - item) / (bins + item)\n \n # Penalize bins with maximum capacity and avoid using them\n max_capacity = np.max(bins)\n scores[bins == max_capacity] -= 0.5\n \n return scores",
"objective": 0.15605,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_10.json
================================================
[
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin using the item size divided by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the rest capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.square(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as a multiplication of the minimum rest capacity in the bins and the absolute difference between the maximum and the current bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum rest capacity in the bins\n min_rest_capacity = np.min(bins) - item\n \n # Calculate the absolute difference between the maximum and current bin capacity\n abs_diff = np.abs(np.max(bins) - bins)\n \n # Multiply the minimum rest capacity and absolute difference to get the scores\n scores = min_rest_capacity * abs_diff\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the product of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (item / (bins * np.sqrt(np.arange(len(bins)) + 1)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then raise the value to the power of the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) ** (bins / item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04286,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_11.json
================================================
[
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin using the item size divided by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the rest capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.square(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as a multiplication of the minimum rest capacity in the bins and the absolute difference between the maximum and the current bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum rest capacity in the bins\n min_rest_capacity = np.min(bins) - item\n \n # Calculate the absolute difference between the maximum and current bin capacity\n abs_diff = np.abs(np.max(bins) - bins)\n \n # Multiply the minimum rest capacity and absolute difference to get the scores\n scores = min_rest_capacity * abs_diff\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the product of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (item / (bins * np.sqrt(np.arange(len(bins)) + 1)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then raise the value to the power of the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) ** (bins / item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04286,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_12.json
================================================
[
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin using the item size divided by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the rest capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns bins by calculating the score as the item size divided by the sum of the cube root of the bin's position and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the bin's position and remaining capacity\n scores = (item / (np.cbrt(np.arange(len(bins))) + np.cbrt(bins - item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the product of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (item / (bins * np.sqrt(np.arange(len(bins)) + 1)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then raise the value to the power of the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) ** (bins / item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04286,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_13.json
================================================
[
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Assign scores based on capacity difference with penalties proportional to item size for bins at maximum capacity multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Calculate the penalty for using a full bin\n penalty = np.where(diff == 0, 0, (diff / item) * (1 - bins))\n \n # Calculate the total score for each bin\n scores = diff + penalty\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns bins by calculating the score as the item size divided by the sum of the cube root of the bin's position and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the bin's position and remaining capacity\n scores = (item / (np.cbrt(np.arange(len(bins))) + np.cbrt(bins - item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the product of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the formula you provided\n scores = (item / (bins * np.sqrt(np.arange(len(bins)) + 1)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_14.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": " The new algorithm will calculate the score of a bin by subtracting the division of the item's remainder after a division operation with the bin's capacity from 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.zeros(len(bins))\n for i, bin_capacity in enumerate(bins):\n if bin_capacity >= item:\n scores[i] = 1 - (bin_capacity % item) / item\n else:\n scores[i] = 0\n \n # Return the scores\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Assign scores based on capacity difference with penalties proportional to item size for bins at maximum capacity multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Calculate the penalty for using a full bin\n penalty = np.where(diff == 0, 0, (diff / item) * (1 - bins))\n \n # Calculate the total score for each bin\n scores = diff + penalty\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Scores are calculated by taking the difference between the item size and the square root of the bins' capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the square root of the bins' capacities\n diff = np.sqrt(bins) - item\n \n # Calculate the scores for each bin based on the difference\n scores = np.abs(diff)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns bins by calculating the score as the item size divided by the sum of the cube root of the bin's position and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the bin's position and remaining capacity\n scores = (item / (np.cbrt(np.arange(len(bins))) + np.cbrt(bins - item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_15.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": " The new algorithm will calculate the score of a bin by subtracting the division of the item's remainder after a division operation with the bin's capacity from 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.zeros(len(bins))\n for i, bin_capacity in enumerate(bins):\n if bin_capacity >= item:\n scores[i] = 1 - (bin_capacity % item) / item\n else:\n scores[i] = 0\n \n # Return the scores\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Assign scores based on capacity difference with penalties proportional to item size for bins at maximum capacity multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Calculate the penalty for using a full bin\n penalty = np.where(diff == 0, 0, (diff / item) * (1 - bins))\n \n # Calculate the total score for each bin\n scores = diff + penalty\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Scores are calculated by taking the difference between the item size and the square root of the bins' capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the square root of the bins' capacities\n diff = np.sqrt(bins) - item\n \n # Calculate the scores for each bin based on the difference\n scores = np.abs(diff)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns bins by calculating the score as the item size divided by the sum of the cube root of the bin's position and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the bin's position and remaining capacity\n scores = (item / (np.cbrt(np.arange(len(bins))) + np.cbrt(bins - item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_16.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Assign scores based on capacity difference with penalties proportional to item size for bins at maximum capacity multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Calculate the penalty for using a full bin\n penalty = np.where(diff == 0, 0, (diff / item) * (1 - bins))\n \n # Calculate the total score for each bin\n scores = diff + penalty\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Scores are calculated by taking the difference between the item size and the square root of the bins' capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the square root of the bins' capacities\n diff = np.sqrt(bins) - item\n \n # Calculate the scores for each bin based on the difference\n scores = np.abs(diff)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns bins by calculating the score as the item size divided by the sum of the cube root of the bin's position and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the bin's position and remaining capacity\n scores = (item / (np.cbrt(np.arange(len(bins))) + np.cbrt(bins - item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_17.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Assign scores based on capacity difference with penalties proportional to item size for bins at maximum capacity multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Calculate the penalty for using a full bin\n penalty = np.where(diff == 0, 0, (diff / item) * (1 - bins))\n \n # Calculate the total score for each bin\n scores = diff + penalty\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Scores are calculated by taking the difference between the item size and the square root of the bins' capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item size and the square root of the bins' capacities\n diff = np.sqrt(bins) - item\n \n # Calculate the scores for each bin based on the difference\n scores = np.abs(diff)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns bins by calculating the score as the item size divided by the sum of the cube root of the bin's position and the cube root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the bin's position and remaining capacity\n scores = (item / (np.cbrt(np.arange(len(bins))) + np.cbrt(bins - item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_18.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for bins as the weighted sum of the item reciprocal and the reciprocal of the bin's position, while considering the bin's remaining capacity and the item's weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item weight\n item_reciprocal = 1 / item\n \n # Initialize the scores array\n scores = np.zeros(len(bins))\n \n # Iterate over the bins\n for i, bin in enumerate(bins):\n # Calculate the reciprocal of the bin's position\n bin_reciprocal = 1 / (i + 1)\n \n # Calculate the score for this bin\n score = item_reciprocal * bin_reciprocal\n \n # Check if the bin has remaining capacity\n if bin > 0:\n # Calculate the reciprocal of the bin's remaining capacity\n bin_remaining_capacity_reciprocal = 1 / (bin - item)\n \n # Add the score for this bin based on its remaining capacity\n score += item_reciprocal * bin_remaining_capacity_reciprocal\n \n # Store the score for this bin\n scores[i] = score\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Assign scores based on capacity difference with penalties proportional to item size for bins at maximum capacity multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Calculate the penalty for using a full bin\n penalty = np.where(diff == 0, 0, (diff / item) * (1 - bins))\n \n # Calculate the total score for each bin\n scores = diff + penalty\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using the absolute difference between the square root of the bins' capacities and the item size, divided by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the square root of the bins' capacities and the item size\n diff = np.abs(np.sqrt(bins) - item)\n \n # Divide the absolute difference by the item size\n scores = diff / item\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_19.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for bins as the weighted sum of the item reciprocal and the reciprocal of the bin's position, while considering the bin's remaining capacity and the item's weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item weight\n item_reciprocal = 1 / item\n \n # Initialize the scores array\n scores = np.zeros(len(bins))\n \n # Iterate over the bins\n for i, bin in enumerate(bins):\n # Calculate the reciprocal of the bin's position\n bin_reciprocal = 1 / (i + 1)\n \n # Calculate the score for this bin\n score = item_reciprocal * bin_reciprocal\n \n # Check if the bin has remaining capacity\n if bin > 0:\n # Calculate the reciprocal of the bin's remaining capacity\n bin_remaining_capacity_reciprocal = 1 / (bin - item)\n \n # Add the score for this bin based on its remaining capacity\n score += item_reciprocal * bin_remaining_capacity_reciprocal\n \n # Store the score for this bin\n scores[i] = score\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Assign scores based on capacity difference with penalties proportional to item size for bins at maximum capacity multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Calculate the penalty for using a full bin\n penalty = np.where(diff == 0, 0, (diff / item) * (1 - bins))\n \n # Calculate the total score for each bin\n scores = diff + penalty\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using the absolute difference between the square root of the bins' capacities and the item size, divided by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the square root of the bins' capacities and the item size\n diff = np.abs(np.sqrt(bins) - item)\n \n # Divide the absolute difference by the item size\n scores = diff / item\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_2.json
================================================
[
{
"algorithm": "New algorithm: Calculating the score as the reciprocal of the product of the rest capacity and the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the product of the rest capacity and the bin's position\n scores = 1 / (bins * item)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the normalized bin capacity and the inverse of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacity and the inverse of the bin number\n norm_capacity = bins / np.sum(bins)\n inv_bin_num = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin based on the normalized capacity and the inverse of the bin number\n scores = norm_capacity * inv_bin_num\n \n # Return the scores for each bin\n return scores",
"objective": 0.04387,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on a weighted sum of the bin's relative capacity, number of items in the bin, and inverse of bin number, using a customizable weight vector.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weights for each bin based on its relative capacity, number of items, and inverse of bin number\n weights = np.array([bin_capacity / (bin_number + 1) for bin_number, bin_capacity in enumerate(bins)])\n \n # Calculate the scores for each bin based on the weights and the item size\n scores = np.dot(weights, item)\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "Normalize the bin capacities to the item size, then calculate the score as the maximum value among all bins minus the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bin capacities to the item size\n norm_bins = bins / item\n \n # Calculate the score for each bin\n scores = np.maximum(norm_bins - item, 0)\n \n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins with lower rest capacity and higher index by calculating the score as the product of the rest capacity and the reciprocal of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the reciprocal of the bin positions\n reciprocal_positions = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the scores for each bin\n scores = rest_capacities * reciprocal_positions\n \n return scores",
"objective": 0.04699,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the rest capacity, using a weighted sum of rest capacity and inverse of bin number, then returns scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin based on the rest capacity\n scores = (rest_capacities / np.maximum(rest_capacities, 1)) ** 0.5\n \n # Return the scores for each bin\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "The algorithm assigns a score to each bin based on the normalized bin capacity with a discount factor that exponentially decays with the bin order.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacities\n norm_capacities = bins / np.max(bins)\n \n # Calculate the discount factor\n discount_factor = np.exp(-np.arange(len(norm_capacities)) * 0.5)\n \n # Calculate the scores for each bin\n scores = (norm_capacities * discount_factor).cumsum()\n \n # Return the scores\n return scores",
"objective": 0.06097,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin based on the remaining capacity and the reciprocal of the bin's position, then multiplying the result by a penalty for bins with maximum capacity to minimize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the remaining capacity and the reciprocal of the bin's position\n scores = (bins - item) / (np.arange(len(bins)) + 1)\n \n # Multiply the scores by a penalty for bins with maximum capacity to minimize the number of used bins\n max_capacity = np.max(bins)\n penalties = np.where(bins == max_capacity, 0, 1)\n scores *= penalties\n \n return scores",
"objective": 0.06359,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns scores based on the bin capacity raised to a power, which grows with the bin order, and a discount factor that decreases exponentially.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power of the bin capacity\n powers = np.power(bins, np.arange(len(bins)))\n \n # Calculate the discount factor\n discount_factor = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Calculate the scores\n scores = powers * discount_factor\n \n return scores",
"objective": 0.06691,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores based on the remaining capacity and the reciprocal of the bin's position, multiplying the result by a penalty for bins with maximum capacity and a bonus for bins with minimum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores based on the remaining capacity and the reciprocal of the bin's position\n scores = (bins - item) / (np.arange(len(bins)) + 1)\n \n # Apply a penalty for bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] *= 0.5\n \n # Apply a bonus for bins with minimum capacity\n min_capacity = np.min(bins)\n scores[bins == min_capacity] *= 1.5\n \n return scores",
"objective": 0.07526,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_20.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for bins as the weighted sum of the item reciprocal and the reciprocal of the bin's position, while considering the bin's remaining capacity and the item's weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item weight\n item_reciprocal = 1 / item\n \n # Initialize the scores array\n scores = np.zeros(len(bins))\n \n # Iterate over the bins\n for i, bin in enumerate(bins):\n # Calculate the reciprocal of the bin's position\n bin_reciprocal = 1 / (i + 1)\n \n # Calculate the score for this bin\n score = item_reciprocal * bin_reciprocal\n \n # Check if the bin has remaining capacity\n if bin > 0:\n # Calculate the reciprocal of the bin's remaining capacity\n bin_remaining_capacity_reciprocal = 1 / (bin - item)\n \n # Add the score for this bin based on its remaining capacity\n score += item_reciprocal * bin_remaining_capacity_reciprocal\n \n # Store the score for this bin\n scores[i] = score\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Assign scores based on capacity difference with penalties proportional to item size for bins at maximum capacity multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the capacity difference between each bin and the item size\n diff = np.abs(bins - item)\n \n # Calculate the penalty for using a full bin\n penalty = np.where(diff == 0, 0, (diff / item) * (1 - bins))\n \n # Calculate the total score for each bin\n scores = diff + penalty\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using the absolute difference between the square root of the bins' capacities and the item size, divided by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the square root of the bins' capacities and the item size\n diff = np.abs(np.sqrt(bins) - item)\n \n # Divide the absolute difference by the item size\n scores = diff / item\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_21.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the remaining capacity, the number of items that can fit in the bin, the penalty for bins with maximum capacity, and an additional penalty for bins that are close to full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = (remaining_capacity == 0) * 100\n \n # Calculate the penalty for bins that are close to full\n near_full_penalty = (num_items_per_bin > 0.95) * 100\n \n # Calculate the total score for each bin\n scores = remaining_capacity + num_items_per_bin + max_capacity_penalty + near_full_penalty\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for bins as the weighted sum of the item reciprocal and the reciprocal of the bin's position, while considering the bin's remaining capacity and the item's weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item weight\n item_reciprocal = 1 / item\n \n # Initialize the scores array\n scores = np.zeros(len(bins))\n \n # Iterate over the bins\n for i, bin in enumerate(bins):\n # Calculate the reciprocal of the bin's position\n bin_reciprocal = 1 / (i + 1)\n \n # Calculate the score for this bin\n score = item_reciprocal * bin_reciprocal\n \n # Check if the bin has remaining capacity\n if bin > 0:\n # Calculate the reciprocal of the bin's remaining capacity\n bin_remaining_capacity_reciprocal = 1 / (bin - item)\n \n # Add the score for this bin based on its remaining capacity\n score += item_reciprocal * bin_remaining_capacity_reciprocal\n \n # Store the score for this bin\n scores[i] = score\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score of a bin by subtracting the square of the difference between the bin's capacity and the item's size from the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between its capacity and the item's size\n scores = np.subtract(bins, np.square(np.subtract(bins, item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using the absolute difference between the square root of the bins' capacities and the item size, divided by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the square root of the bins' capacities and the item size\n diff = np.abs(np.sqrt(bins) - item)\n \n # Divide the absolute difference by the item size\n scores = diff / item\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_22.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the remaining capacity, the number of items that can fit in the bin, the penalty for bins with maximum capacity, and an additional penalty for bins that are close to full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = (remaining_capacity == 0) * 100\n \n # Calculate the penalty for bins that are close to full\n near_full_penalty = (num_items_per_bin > 0.95) * 100\n \n # Calculate the total score for each bin\n scores = remaining_capacity + num_items_per_bin + max_capacity_penalty + near_full_penalty\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for bins as the weighted sum of the item reciprocal and the reciprocal of the bin's position, while considering the bin's remaining capacity and the item's weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item weight\n item_reciprocal = 1 / item\n \n # Initialize the scores array\n scores = np.zeros(len(bins))\n \n # Iterate over the bins\n for i, bin in enumerate(bins):\n # Calculate the reciprocal of the bin's position\n bin_reciprocal = 1 / (i + 1)\n \n # Calculate the score for this bin\n score = item_reciprocal * bin_reciprocal\n \n # Check if the bin has remaining capacity\n if bin > 0:\n # Calculate the reciprocal of the bin's remaining capacity\n bin_remaining_capacity_reciprocal = 1 / (bin - item)\n \n # Add the score for this bin based on its remaining capacity\n score += item_reciprocal * bin_remaining_capacity_reciprocal\n \n # Store the score for this bin\n scores[i] = score\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score of a bin by subtracting the square of the difference between the bin's capacity and the item's size from the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between its capacity and the item's size\n scores = np.subtract(bins, np.square(np.subtract(bins, item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using the absolute difference between the square root of the bins' capacities and the item size, divided by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the square root of the bins' capacities and the item size\n diff = np.abs(np.sqrt(bins) - item)\n \n # Divide the absolute difference by the item size\n scores = diff / item\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_23.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the remaining capacity, the number of items that can fit in the bin, the penalty for bins with maximum capacity, and an additional penalty for bins that are close to full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = (remaining_capacity == 0) * 100\n \n # Calculate the penalty for bins that are close to full\n near_full_penalty = (num_items_per_bin > 0.95) * 100\n \n # Calculate the total score for each bin\n scores = remaining_capacity + num_items_per_bin + max_capacity_penalty + near_full_penalty\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for bins as the weighted sum of the item reciprocal and the reciprocal of the bin's position, while considering the bin's remaining capacity and the item's weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item weight\n item_reciprocal = 1 / item\n \n # Initialize the scores array\n scores = np.zeros(len(bins))\n \n # Iterate over the bins\n for i, bin in enumerate(bins):\n # Calculate the reciprocal of the bin's position\n bin_reciprocal = 1 / (i + 1)\n \n # Calculate the score for this bin\n score = item_reciprocal * bin_reciprocal\n \n # Check if the bin has remaining capacity\n if bin > 0:\n # Calculate the reciprocal of the bin's remaining capacity\n bin_remaining_capacity_reciprocal = 1 / (bin - item)\n \n # Add the score for this bin based on its remaining capacity\n score += item_reciprocal * bin_remaining_capacity_reciprocal\n \n # Store the score for this bin\n scores[i] = score\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score of a bin by subtracting the square of the difference between the bin's capacity and the item's size from the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between its capacity and the item's size\n scores = np.subtract(bins, np.square(np.subtract(bins, item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using the absolute difference between the square root of the bins' capacities and the item size, divided by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the square root of the bins' capacities and the item size\n diff = np.abs(np.sqrt(bins) - item)\n \n # Divide the absolute difference by the item size\n scores = diff / item\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_24.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the remaining capacity, the number of items that can fit in the bin, the penalty for bins with maximum capacity, and an additional penalty for bins that are close to full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = (remaining_capacity == 0) * 100\n \n # Calculate the penalty for bins that are close to full\n near_full_penalty = (num_items_per_bin > 0.95) * 100\n \n # Calculate the total score for each bin\n scores = remaining_capacity + num_items_per_bin + max_capacity_penalty + near_full_penalty\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for bins as the weighted sum of the item reciprocal and the reciprocal of the bin's position, while considering the bin's remaining capacity and the item's weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item weight\n item_reciprocal = 1 / item\n \n # Initialize the scores array\n scores = np.zeros(len(bins))\n \n # Iterate over the bins\n for i, bin in enumerate(bins):\n # Calculate the reciprocal of the bin's position\n bin_reciprocal = 1 / (i + 1)\n \n # Calculate the score for this bin\n score = item_reciprocal * bin_reciprocal\n \n # Check if the bin has remaining capacity\n if bin > 0:\n # Calculate the reciprocal of the bin's remaining capacity\n bin_remaining_capacity_reciprocal = 1 / (bin - item)\n \n # Add the score for this bin based on its remaining capacity\n score += item_reciprocal * bin_remaining_capacity_reciprocal\n \n # Store the score for this bin\n scores[i] = score\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score of a bin by subtracting the square of the difference between the bin's capacity and the item's size from the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between its capacity and the item's size\n scores = np.subtract(bins, np.square(np.subtract(bins, item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using the absolute difference between the square root of the bins' capacities and the item size, divided by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the square root of the bins' capacities and the item size\n diff = np.abs(np.sqrt(bins) - item)\n \n # Divide the absolute difference by the item size\n scores = diff / item\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "Compute the score by subtracting the item size from the rest capacity and dividing it by the product of the item size and the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = (bins - item) / (item * (bins - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_25.json
================================================
[
{
"algorithm": "Score bins based on the weighted sum of the remaining capacity and the number of items that can fit in the bin, with a penalty for bins that have been used recently.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins that have been used recently\n recent_penalty = np.where(remaining_capacity < item, 0, 1)\n \n # Calculate the total score for each bin\n scores = (num_items_per_bin * remaining_capacity) + recent_penalty\n \n return scores",
"objective": 0.01308,
"other_inf": null
},
{
"algorithm": " Score bins based on a weighted sum of the remaining capacity, the square of the number of items that can fit in the bin, the penalty for bins with maximum capacity, and an additional penalty for bins that are close to full. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the square of the number of items that can fit in each bin\n num_items_in_bin = np.minimum(remaining_capacity, item)\n num_items_squared = num_items_in_bin ** 2\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = np.where(bins == item, 0, 1)\n \n # Calculate the additional penalty for bins that are close to full\n near_full_penalty = np.where(np.abs(remaining_capacity - item) < 0.5 * item, 0, 1)\n \n # Combine the penalties and calculate the total score for each bin\n scores = (num_items_squared + max_capacity_penalty + near_full_penalty) / (remaining_capacity + 1e-8)\n \n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Score bins based on a weighted sum of the remaining capacity, the number of items that can fit in the bin, and the number of empty neighboring bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = np.floor(remaining_capacity / item)\n \n # Calculate the number of empty neighboring bins\n num_empty_neighboring_bins = np.sum(np.where(remaining_capacity == 0, 1, 0))\n \n # Calculate the score for each bin\n scores = (num_items_per_bin + num_empty_neighboring_bins) / remaining_capacity\n \n return scores",
"objective": 0.01771,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on a weighted sum of the remaining capacity, the number of items that can fit in the bin, the penalty for bins with maximum capacity, and an additional penalty for bins that are close to full.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = (remaining_capacity == 0) * 100\n \n # Calculate the penalty for bins that are close to full\n near_full_penalty = (num_items_per_bin > 0.95) * 100\n \n # Calculate the total score for each bin\n scores = remaining_capacity + num_items_per_bin + max_capacity_penalty + near_full_penalty\n \n return scores",
"objective": 0.02938,
"other_inf": null
},
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin by subtracting the remainder of the division between the item's size by the bin's capacity from the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item's size and the bin's capacity\n scores = np.zeros_like(bins)\n for i in range(len(bins)):\n if bins[i] >= item:\n scores[i] = item - (bins[i] % item)\n else:\n scores[i] = 0\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "New algorithm: Normalize the bins' positions and remaining capacities to be between 0 and 1, and define the bin score as the sum of the exponential of the normalized bin position divided by the item size and the exponential of the normalized bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bins' positions and remaining capacities to be between 0 and 1\n norm_positions = (bins - np.min(bins)) / (np.max(bins) - np.min(bins))\n norm_remaining_capacities = (bins - item) / (np.max(bins) - np.min(bins))\n \n # Calculate the scores for each bin\n scores = np.exp(-norm_positions * item) / np.exp(-norm_remaining_capacities * item)\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "My algorithm calculates the score of a bin by subtracting the difference between the item size and the bin's capacity from the division of the item size by the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item - bins) / (bins + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by subtracting the difference of multiplying the item's size and its square root by its square root from the result of adding the item's size and square root of itself\n scores = np.sqrt(np.abs(item - np.sqrt(np.abs(item * np.sqrt(bins) - np.sqrt(bins)))))\n \n # Return the scores for the bins\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a score for bins as the weighted sum of the item reciprocal and the reciprocal of the bin's position, while considering the bin's remaining capacity and the item's weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item weight\n item_reciprocal = 1 / item\n \n # Initialize the scores array\n scores = np.zeros(len(bins))\n \n # Iterate over the bins\n for i, bin in enumerate(bins):\n # Calculate the reciprocal of the bin's position\n bin_reciprocal = 1 / (i + 1)\n \n # Calculate the score for this bin\n score = item_reciprocal * bin_reciprocal\n \n # Check if the bin has remaining capacity\n if bin > 0:\n # Calculate the reciprocal of the bin's remaining capacity\n bin_remaining_capacity_reciprocal = 1 / (bin - item)\n \n # Add the score for this bin based on its remaining capacity\n score += item_reciprocal * bin_remaining_capacity_reciprocal\n \n # Store the score for this bin\n scores[i] = score\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The algorithm calculates the score of a bin by subtracting the square of the difference between the bin's capacity and the item's size from the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between its capacity and the item's size\n scores = np.subtract(bins, np.square(np.subtract(bins, item)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate scores using the absolute difference between the square root of the bins' capacities plus a random constant and the item size, divided by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the absolute difference between the square root of the bin capacity and the item size\n scores = np.abs(np.sqrt(bins) - item) / item\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_3.json
================================================
[
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Algorithm description: New algorithm: Calculating the score as the reciprocal of the sum of the rest capacity and the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the sum of the rest capacity and the bin's position\n scores = 1 / (bins + item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and a penalty for bins with maximum capacity while considering the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the bin positions\n sqrt_positions = np.sqrt(np.arange(len(bins)))\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = np.where(bins == 0, 0, 1)\n \n # Calculate the scores for each bin\n scores = (item / bins) + (sqrt_positions * max_capacity_penalty)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and no penalty for bins with maximum capacity while considering the reciprocal of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the bin positions\n reciprocal_positions = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the scores for each bin\n scores = (item / bins) * reciprocal_positions\n \n # Mask out the scores for bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n # Return the scores\n return scores",
"objective": 0.04326,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the normalized bin capacity and the inverse of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacity and the inverse of the bin number\n norm_capacity = bins / np.sum(bins)\n inv_bin_num = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin based on the normalized capacity and the inverse of the bin number\n scores = norm_capacity * inv_bin_num\n \n # Return the scores for each bin\n return scores",
"objective": 0.04387,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the product of rest capacity and an index function that is inversely proportional to the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin position\n inv_pos = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin\n scores = item * inv_pos * bins\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the product of the normalized bin capacity and the inverse of the bin number, with a discount factor that exponentially decays with the bin order.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacities\n norm_capacities = bins / np.max(bins)\n \n # Calculate the inverse of the bin numbers\n inv_bin_nums = np.arange(len(bins))[::-1]\n \n # Calculate the discount factor\n discount_factor = np.exp(-inv_bin_nums * 0.5)\n \n # Calculate the scores for each bin\n scores = (norm_capacities * discount_factor) ** item\n \n return scores",
"objective": 0.04437,
"other_inf": null
},
{
"algorithm": "Normalize the bin capacities to the item size, then calculate the score as the maximum value among all bins minus the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bin capacities to the item size\n norm_bins = bins / item\n \n # Calculate the score for each bin\n scores = np.maximum(norm_bins - item, 0)\n \n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins with lower rest capacity and higher index by calculating the score as the product of the rest capacity and the reciprocal of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the reciprocal of the bin positions\n reciprocal_positions = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the scores for each bin\n scores = rest_capacities * reciprocal_positions\n \n return scores",
"objective": 0.04699,
"other_inf": null
},
{
"algorithm": "Assign scores based on the ratio of bin capacity to the sum of all bins' capacities, weighted by the inverse of the bin's distance from the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of bin capacity to the sum of all bins' capacities\n capacity_ratio = bins / np.sum(bins)\n \n # Calculate the distance of each bin from the middle of the array\n middle_index = len(bins) // 2\n distances = np.abs(np.arange(len(bins)) - middle_index)\n \n # Weight the capacity ratio by the inverse of the distance from the middle\n weights = 1 / (distances + 1)\n \n # Calculate the scores for each bin using the weighted capacity ratio\n scores = capacity_ratio * weights\n \n return scores",
"objective": 0.0487,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the rest capacity, using a weighted sum of rest capacity and inverse of bin number, then returns scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin based on the rest capacity\n scores = (rest_capacities / np.maximum(rest_capacities, 1)) ** 0.5\n \n # Return the scores for each bin\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score for each bin as the sum of the bin's number of items divided by its maximum capacity, weighted by the item size and bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin as the sum of the bin's number of items divided by its maximum capacity, weighted by the item size and bin number\n scores = (bins / bins.max()) * (item / bins)\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.05644,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_4.json
================================================
[
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Algorithm description: New algorithm: Calculating the score as the reciprocal of the sum of the rest capacity and the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the sum of the rest capacity and the bin's position\n scores = 1 / (bins + item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and a penalty for bins with maximum capacity while considering the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the bin positions\n sqrt_positions = np.sqrt(np.arange(len(bins)))\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = np.where(bins == 0, 0, 1)\n \n # Calculate the scores for each bin\n scores = (item / bins) + (sqrt_positions * max_capacity_penalty)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and no penalty for bins with maximum capacity while considering the reciprocal of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the bin positions\n reciprocal_positions = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the scores for each bin\n scores = (item / bins) * reciprocal_positions\n \n # Mask out the scores for bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n # Return the scores\n return scores",
"objective": 0.04326,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the normalized bin capacity and the inverse of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacity and the inverse of the bin number\n norm_capacity = bins / np.sum(bins)\n inv_bin_num = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin based on the normalized capacity and the inverse of the bin number\n scores = norm_capacity * inv_bin_num\n \n # Return the scores for each bin\n return scores",
"objective": 0.04387,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign scores to bins based on the reciprocal of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the remaining capacity for each bin\n rc = np.reciprocal(bins - item)\n \n # Calculate the positional weight for each bin\n pw = np.arange(len(bins)) / len(bins)\n \n # Combine the reciprocal of the remaining capacity and the positional weight\n scores = rc * pw\n \n return scores",
"objective": 0.04397,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the product of rest capacity and an index function that is inversely proportional to the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin position\n inv_pos = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin\n scores = item * inv_pos * bins\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the product of the normalized bin capacity and the inverse of the bin number, with a discount factor that exponentially decays with the bin order.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacities\n norm_capacities = bins / np.max(bins)\n \n # Calculate the inverse of the bin numbers\n inv_bin_nums = np.arange(len(bins))[::-1]\n \n # Calculate the discount factor\n discount_factor = np.exp(-inv_bin_nums * 0.5)\n \n # Calculate the scores for each bin\n scores = (norm_capacities * discount_factor) ** item\n \n return scores",
"objective": 0.04437,
"other_inf": null
},
{
"algorithm": "Normalize the bin capacities to the item size, then calculate the score as the maximum value among all bins minus the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Normalize the bin capacities to the item size\n norm_bins = bins / item\n \n # Calculate the score for each bin\n scores = np.maximum(norm_bins - item, 0)\n \n return scores",
"objective": 0.04507,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizing bins with lower rest capacity and higher index by calculating the score as the product of the rest capacity and the reciprocal of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the reciprocal of the bin positions\n reciprocal_positions = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the scores for each bin\n scores = rest_capacities * reciprocal_positions\n \n return scores",
"objective": 0.04699,
"other_inf": null
},
{
"algorithm": "Assign scores based on the ratio of bin capacity to the sum of all bins' capacities, weighted by the inverse of the bin's distance from the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of bin capacity to the sum of all bins' capacities\n capacity_ratio = bins / np.sum(bins)\n \n # Calculate the distance of each bin from the middle of the array\n middle_index = len(bins) // 2\n distances = np.abs(np.arange(len(bins)) - middle_index)\n \n # Weight the capacity ratio by the inverse of the distance from the middle\n weights = 1 / (distances + 1)\n \n # Calculate the scores for each bin using the weighted capacity ratio\n scores = capacity_ratio * weights\n \n return scores",
"objective": 0.0487,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the rest capacity, using a weighted sum of rest capacity and inverse of bin number, then returns scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin based on the rest capacity\n scores = (rest_capacities / np.maximum(rest_capacities, 1)) ** 0.5\n \n # Return the scores for each bin\n return scores",
"objective": 0.05383,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_5.json
================================================
[
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Algorithm description: New algorithm: Calculating the score as the reciprocal of the sum of the rest capacity and the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the sum of the rest capacity and the bin's position\n scores = 1 / (bins + item)\n \n # Return the scores for the bins\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and a penalty for bins with maximum capacity while considering the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the bin positions\n sqrt_positions = np.sqrt(np.arange(len(bins)))\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = np.where(bins == 0, 0, 1)\n \n # Calculate the scores for each bin\n scores = (item / bins) + (sqrt_positions * max_capacity_penalty)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.square(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function to calculate the scores for each candidate bin based on the item size and the bin's current usage percentage.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and the bin's current usage percentage\n scores = (bins - item) / (bins * (1 - (item / bins)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and no penalty for bins with maximum capacity while considering the reciprocal of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the bin positions\n reciprocal_positions = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the scores for each bin\n scores = (item / bins) * reciprocal_positions\n \n # Mask out the scores for bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n # Return the scores\n return scores",
"objective": 0.04326,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the normalized bin capacity and the inverse of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacity and the inverse of the bin number\n norm_capacity = bins / np.sum(bins)\n inv_bin_num = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin based on the normalized capacity and the inverse of the bin number\n scores = norm_capacity * inv_bin_num\n \n # Return the scores for each bin\n return scores",
"objective": 0.04387,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign scores to bins based on the reciprocal of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the remaining capacity for each bin\n rc = np.reciprocal(bins - item)\n \n # Calculate the positional weight for each bin\n pw = np.arange(len(bins)) / len(bins)\n \n # Combine the reciprocal of the remaining capacity and the positional weight\n scores = rc * pw\n \n return scores",
"objective": 0.04397,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the product of rest capacity and an index function that is inversely proportional to the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin position\n inv_pos = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin\n scores = item * inv_pos * bins\n \n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the product of the normalized bin capacity and the inverse of the bin number, with a discount factor that exponentially decays with the bin order.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacities\n norm_capacities = bins / np.max(bins)\n \n # Calculate the inverse of the bin numbers\n inv_bin_nums = np.arange(len(bins))[::-1]\n \n # Calculate the discount factor\n discount_factor = np.exp(-inv_bin_nums * 0.5)\n \n # Calculate the scores for each bin\n scores = (norm_capacities * discount_factor) ** item\n \n return scores",
"objective": 0.04437,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_6.json
================================================
[
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and a penalty for bins with maximum capacity while considering the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the bin positions\n sqrt_positions = np.sqrt(np.arange(len(bins)))\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = np.where(bins == 0, 0, 1)\n \n # Calculate the scores for each bin\n scores = (item / bins) + (sqrt_positions * max_capacity_penalty)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.square(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function to calculate the scores for each candidate bin based on the item size and the bin's current usage percentage.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and the bin's current usage percentage\n scores = (bins - item) / (bins * (1 - (item / bins)))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and no penalty for bins with maximum capacity while considering the reciprocal of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the bin positions\n reciprocal_positions = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the scores for each bin\n scores = (item / bins) * reciprocal_positions\n \n # Mask out the scores for bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n # Return the scores\n return scores",
"objective": 0.04326,
"other_inf": null
},
{
"algorithm": " Calculate the score as the product of the normalized bin capacity and the reciprocal of the sum of the bin's position and a constant. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacity\n norm_capacity = bins / np.sum(bins)\n \n # Calculate the reciprocal of the sum of the bin's position and a constant\n reciprocal = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the scores for each bin\n scores = norm_capacity * reciprocal\n \n return scores",
"objective": 0.04387,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign scores to bins based on the reciprocal of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the remaining capacity for each bin\n rc = np.reciprocal(bins - item)\n \n # Calculate the positional weight for each bin\n pw = np.arange(len(bins)) / len(bins)\n \n # Combine the reciprocal of the remaining capacity and the positional weight\n scores = rc * pw\n \n return scores",
"objective": 0.04397,
"other_inf": null
},
{
"algorithm": "Calculate a score for each bin based on the product of rest capacity and an index function that is inversely proportional to the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the bin position\n inv_pos = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the score for each bin\n scores = item * inv_pos * bins\n \n return scores",
"objective": 0.04407,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_7.json
================================================
[
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and a penalty for bins with maximum capacity while considering the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the bin positions\n sqrt_positions = np.sqrt(np.arange(len(bins)))\n \n # Calculate the penalty for bins with maximum capacity\n max_capacity_penalty = np.where(bins == 0, 0, 1)\n \n # Calculate the scores for each bin\n scores = (item / bins) + (sqrt_positions * max_capacity_penalty)\n \n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.square(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as a multiplication of the minimum rest capacity in the bins and the absolute difference between the maximum and the current bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum rest capacity in the bins\n min_rest_capacity = np.min(bins) - item\n \n # Calculate the absolute difference between the maximum and current bin capacity\n abs_diff = np.abs(np.max(bins) - bins)\n \n # Multiply the minimum rest capacity and absolute difference to get the scores\n scores = min_rest_capacity * abs_diff\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then raise the value to the power of the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) ** (bins / item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the maximum score to bins with sufficient remaining capacity and no penalty for bins with maximum capacity while considering the reciprocal of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the bin positions\n reciprocal_positions = np.reciprocal(np.arange(len(bins)))\n \n # Calculate the scores for each bin\n scores = (item / bins) * reciprocal_positions\n \n # Mask out the scores for bins with maximum capacity\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n \n # Return the scores\n return scores",
"objective": 0.04326,
"other_inf": null
},
{
"algorithm": " Calculate the score as the product of the normalized bin capacity and the reciprocal of the sum of the bin's position and a constant. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized bin capacity\n norm_capacity = bins / np.sum(bins)\n \n # Calculate the reciprocal of the sum of the bin's position and a constant\n reciprocal = 1 / (np.arange(len(bins)) + 1)\n \n # Calculate the scores for each bin\n scores = norm_capacity * reciprocal\n \n return scores",
"objective": 0.04387,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_8.json
================================================
[
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin using the item size divided by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the rest capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.square(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as a multiplication of the minimum rest capacity in the bins and the absolute difference between the maximum and the current bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum rest capacity in the bins\n min_rest_capacity = np.min(bins) - item\n \n # Calculate the absolute difference between the maximum and current bin capacity\n abs_diff = np.abs(np.max(bins) - bins)\n \n # Multiply the minimum rest capacity and absolute difference to get the scores\n scores = min_rest_capacity * abs_diff\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then raise the value to the power of the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) ** (bins / item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run2/population_generation_9.json
================================================
[
{
"algorithm": " Score bins based on the sum of the remaining capacity and the number of items that can fit in the bin, with a bias towards bins that have recently been used. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity for each bin\n remaining_capacity = bins - item\n \n # Calculate the number of items that can fit in each bin\n num_items_per_bin = item / remaining_capacity\n \n # Calculate the score for each bin based on the remaining capacity and the number of items that can fit in it\n scores = remaining_capacity * num_items_per_bin\n \n # Add a bias towards bins that have recently been used\n scores += (np.random.rand(len(bins)) < 0.5) * 0.5\n \n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the harmonic mean of the rest capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the harmonic mean of the rest capacities\n rest_capacities = np.array([bin - item for bin in bins])\n harmonic_mean = np.sum(rest_capacities) / np.prod(rest_capacities)\n \n # Calculate the score for each bin\n scores = harmonic_mean * (bins - item)\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then divide the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) / (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by combining the normalized inverse of the remaining capacity and the penalized inverse of the bin number to maximize the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized inverse of the remaining capacity\n inv_remaining = 1 / (bins - item)\n # Calculate the penalized inverse of the bin number\n inv_penalized = 1 / (np.arange(len(bins)) + 1)\n # Combine the two terms to get the final score\n scores = inv_remaining * inv_penalized\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score to bins as the sum of item reciprocal and reciprocal of the bin position while considering the reciprocal of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the item size and the bin positions\n item_recip = 1 / item\n bin_positions = np.arange(len(bins)) + 1\n bin_recips = 1 / bin_positions\n \n # Calculate the scores for each bin\n scores = item_recip * bin_recips\n \n # Add the reciprocal of the bin remaining capacity to the scores\n scores += 1 / (bins - item)\n \n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of the remaining capacity and the reciprocal of the number of items that can fit in the bin, with a bias towards bins that have recently been used.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of the number of items that can fit in each bin\n num_items = np.array([bin_size - item for bin_size in bins])\n reciprocal_num_items = 1 / num_items\n \n # Calculate the product of the remaining capacity and the reciprocal of the number of items that can fit in each bin\n scores = np.multiply(bins, reciprocal_num_items)\n \n # Add a bias towards bins that have recently been used\n recent_usage = np.random.randint(0, 10, len(bins))\n scores += recent_usage * 0.5\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Define a score for each bin as the sum of the exponential of the bin position divided by the item size and the exponential of the bin's remaining capacity multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item size\n scores = np.exp(-(bins / item) * (bins - item))\n \n # Add a constant term to the scores to make them more stable\n scores += 0.5\n \n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the item to bin ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) * (bins - item)\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin using the item size divided by the sum of the rest capacity and the square root of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and the rest capacity\n scores = (item / (bins + np.sqrt(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Calculate score as power of the exponential of the rest capacity, penalized by the number of bins already in use.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the rest capacity\n exp_rest_capacity = np.exp(-bins)\n \n # Penalize the number of bins already in use\n num_used_bins = len(np.where(bins > 0)[0])\n penalty = num_used_bins ** 2\n \n # Calculate the score for each bin\n scores = exp_rest_capacity - penalty\n \n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "New algorithm calculates the score of a bin by dividing the item size by the sum of the rest capacity and the square of the bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (item / (bins + np.square(np.arange(len(bins)))))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": " New algorithm uses a score function that multiplies the item size with the rest capacity and subtracts it from a random constant to calculate the scores for each candidate bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and rest capacity\n scores = (item * bins) - (np.random.randint(0, 100) * bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as a multiplication of the minimum rest capacity in the bins and the absolute difference between the maximum and the current bin capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the minimum rest capacity in the bins\n min_rest_capacity = np.min(bins) - item\n \n # Calculate the absolute difference between the maximum and current bin capacity\n abs_diff = np.abs(np.max(bins) - bins)\n \n # Multiply the minimum rest capacity and absolute difference to get the scores\n scores = min_rest_capacity * abs_diff\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Scores bins based on the logarithmic difference between the item size and the bins' rest capacity, multiplied by the number of bins minus the current bin's position.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic difference between the item size and the bins' rest capacities\n diff = np.log(bins / item)\n \n # Calculate the number of bins minus the current bin's position\n pos = np.arange(len(bins))\n num_bins = len(bins)\n diff -= (num_bins - pos)\n \n # Multiply the logarithmic difference by the number of bins minus the current bin's position\n scores = diff * (num_bins - pos)\n \n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the item size with the rest capacity, and subtracting it from a constant, and then returns the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item * bins) - (item * bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then multiple the value by the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Assign scores to bins based on the product of the remaining capacity and a positional weight that increases for bins closer to the middle of the array.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the positional weights\n weights = np.arange(len(bins)) / len(bins)\n \n # Calculate the scores\n scores = (weights * bins) + (item - bins)\n \n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Modified algorithm: compute the score by subtracting the current used percentage from 1, and then raise the value to the power of the difference between this value and the rest capacity to item ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the score for each bin\n scores = (1 - (bins / item)) ** (bins / item)\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04286,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_1.json
================================================
[
{
"algorithm": "The new algorithm considers the rest capacity of each bin in relation to the item's size, calculates the ratio of the item's size to the bin's rest capacity, and normalizes the scores based on the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item's size to the bin's rest capacity\n ratios = item / (bins - item)\n \n # Normalize the scores based on the item's size\n scores = ratios / np.max(ratios)\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin based on the sum of the bin's rest capacity divided by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power of 2 raised to the index of each bin\n powers = np.power(2, np.arange(len(bins)))\n \n # Calculate the sum of the bin's rest capacity divided by the power of 2\n scores = (bins - item) / powers\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Adjusted algorithm: Calculates bin scores as the weighted sum of the rest capacity to the power of 0.5, the proximity to the item size, and a penalty for exceeding the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity to the power of 0.5, the proximity to the item size, and a penalty for exceeding the maximum capacity\n scores = (bins / np.sqrt(bins)) * (np.abs(item - bins) ** 0.5) + (bins > item) * (bins - item)\n \n # Penalize bins that exceed the maximum capacity\n scores[bins > item] -= (bins[bins > item] - item) ** 2\n \n return scores",
"objective": 0.04568,
"other_inf": null
},
{
"algorithm": "The algorithm scores bins as a product of their rest capacity and the inverse of the maximum score of all bins, with bins at maximum capacity receiving a score of zero and prioritizing larger rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum score for each bin\n max_scores = np.maximum(0, bins - item)\n \n # Calculate the inverse of the maximum score for each bin\n inv_max_scores = np.reciprocal(max_scores)\n \n # Calculate the product of the rest capacity and the inverse of the maximum score for each bin\n scores = np.multiply(bins, inv_max_scores)\n \n # Return the scores\n return scores",
"objective": 0.0492,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "The algorithm scores bins by combining the percentage of rest capacity and the inverse of the difference between the item size and the rest capacity, prioritizing bins with higher percentages and lower differences.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the percentage of rest capacity for each bin\n rest_capacities = bins - item\n percents = rest_capacities / bins * 100\n \n # Calculate the inverse of the difference between the item size and the rest capacity\n diffs = item - rest_capacities\n inv_diffs = 1 / (diffs + 1e-6)\n \n # Combine the percentage of rest capacity and the inverse of the difference\n scores = percents * inv_diffs\n \n return scores",
"objective": 0.11671,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "New Algorithm: Score bins based on their remaining capacities relative to the item's size, with a penalty for bins that have reached their maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its remaining capacity and the item's size\n scores = (bins - item) / (bins + item)\n \n # Penalize bins that have reached their maximum capacity\n max_capacity = np.max(bins)\n scores[bins >= max_capacity] -= 0.5\n \n return scores",
"objective": 0.15605,
"other_inf": null
},
{
"algorithm": "Design a novel score function that subtracts the ratio of the item size to the bin's rest capacity from one and raises the result to a power.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the bin's rest capacity\n ratios = item / (bins - item)\n \n # Subtract 1 from the ratio and raise it to the power of 0.5\n scores = (ratios - 1) ** 0.5\n \n return scores",
"objective": 0.19952,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "New algorithm: Adjusted algorithm: Calculates bin scores as the weighted sum of the rest capacity, the proximity to the item size, and a penalty for exceeding the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacities = bins - item\n \n # Calculate the proximity to the item size for each bin\n proximities = np.abs(rest_capacities - item)\n \n # Calculate the penalty for exceeding the maximum capacity for each bin\n penalties = np.where(rest_capacities > item, rest_capacities - item, 0)\n \n # Calculate the total score for each bin\n scores = (rest_capacities * proximities + penalties) / (rest_capacities + 1)\n \n return scores",
"objective": 0.40658,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_10.json
================================================
[
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by subtracting the item's size divided by the rest capacity multiplied by bin's capacity and rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / (bins * (1 - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Score function for bins is calculated as the inverse exponential decay of the difference between rest capacity and item size, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse exponential decay of the difference between rest capacity and item size\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New score function: Calculate the score as the absolute difference between the logarithmic rest capacity and the bin index, multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins - item)\n \n # Calculate the absolute difference between the logarithmic rest capacity and the bin index\n abs_diff = np.abs(np.arange(len(bins)) - log_rest_capacity)\n \n # Multiply the absolute difference by a constant\n scores = abs_diff * 0.5\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will take into account the difference between the bin's rest capacity and the item's value, and a penalty for using bins with a rest capacity smaller than item's value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = item - bins\n \n # Penalize bins with a rest capacity smaller than the item's value\n penalties = np.where(diff < 0, diff**2, 0)\n \n # Calculate the scores for each bin\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the sum of the rest capacity and the product of the item and the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities * (1 / np.exp(-np.arange(len(rest_capacities)) ** 2))\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the rest capacity and an increasing linear function of the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities + (np.arange(len(rest_capacities)) + 1) * item\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Score bins by dividing the item size by the percentage of the bin's capacity that is greater than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_11.json
================================================
[
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by subtracting the item's size divided by the rest capacity multiplied by bin's capacity and rest capacity squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item / bins) - (bins ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Score function for bins is calculated as the inverse exponential decay of the difference between rest capacity and item size, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse exponential decay of the difference between rest capacity and item size\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New score function: Calculate the score as the absolute difference between the logarithmic rest capacity and the bin index, multiplied by a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins - item)\n \n # Calculate the absolute difference between the logarithmic rest capacity and the bin index\n abs_diff = np.abs(np.arange(len(bins)) - log_rest_capacity)\n \n # Multiply the absolute difference by a constant\n scores = abs_diff * 0.5\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will take into account the difference between the bin's rest capacity and the item's value, and a penalty for using bins with a rest capacity smaller than item's value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = item - bins\n \n # Penalize bins with a rest capacity smaller than the item's value\n penalties = np.where(diff < 0, diff**2, 0)\n \n # Calculate the scores for each bin\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the sum of the rest capacity and the product of the item and the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities * (1 / np.exp(-np.arange(len(rest_capacities)) ** 2))\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the rest capacity and an increasing linear function of the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities + (np.arange(len(rest_capacities)) + 1) * item\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Score bins by dividing the item size by the percentage of the bin's capacity that is greater than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_12.json
================================================
[
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by subtracting the item's size divided by the rest capacity multiplied by bin's capacity and rest capacity squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item / bins) - (bins ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: Score function for bins is calculated as the inverse exponential decay of the difference between rest capacity and item size, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse exponential decay of the difference between rest capacity and item size\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by multiplying their index by a weight, subtracting their capacity from the result, and adding a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weights for each bin based on its index\n weights = np.arange(len(bins)) * 0.5\n \n # Subtract the capacity of each bin from the weighted sum\n scores = (weights - bins) + 10\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will take into account the difference between the bin's rest capacity and the item's value, and a penalty for using bins with a rest capacity smaller than item's value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = item - bins\n \n # Penalize bins with a rest capacity smaller than the item's value\n penalties = np.where(diff < 0, diff**2, 0)\n \n # Calculate the scores for each bin\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "{New algorithm: Score bins by subtracting the item size from half the bin capacity and dividing by the absolute difference between the half bin capacity and item size.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / abs(bins - item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the rest capacity and an increasing linear function of the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities + (np.arange(len(rest_capacities)) + 1) * item\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Score bins by dividing the item size by the percentage of the bin's capacity that is greater than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_13.json
================================================
[
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by subtracting the item's size divided by the rest capacity multiplied by bin's capacity and rest capacity squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item / bins) - (bins ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by multiplying their index by a weight, subtracting their capacity from the result, and adding a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weights for each bin based on its index\n weights = np.arange(len(bins)) * 0.5\n \n # Subtract the capacity of each bin from the weighted sum\n scores = (weights - bins) + 10\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will take into account the difference between the bin's rest capacity and the item's value, and a penalty for using bins with a rest capacity smaller than item's value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = item - bins\n \n # Penalize bins with a rest capacity smaller than the item's value\n penalties = np.where(diff < 0, diff**2, 0)\n \n # Calculate the scores for each bin\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "{New algorithm: Score bins by subtracting the item size from half the bin capacity and dividing by the absolute difference between the half bin capacity and item size.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / abs(bins - item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the rest capacity and an increasing linear function of the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities + (np.arange(len(rest_capacities)) + 1) * item\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Score bins by dividing the item size by the percentage of the bin's capacity that is greater than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_14.json
================================================
[
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by subtracting the item's size divided by the rest capacity multiplied by bin's capacity and rest capacity squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item / bins) - (bins ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by multiplying their index by a weight, subtracting their capacity from the result, and adding a constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weights for each bin based on its index\n weights = np.arange(len(bins)) * 0.5\n \n # Subtract the capacity of each bin from the weighted sum\n scores = (weights - bins) + 10\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will take into account the difference between the bin's rest capacity and the item's value, and a penalty for using bins with a rest capacity smaller than item's value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = item - bins\n \n # Penalize bins with a rest capacity smaller than the item's value\n penalties = np.where(diff < 0, diff**2, 0)\n \n # Calculate the scores for each bin\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "{New algorithm: Score bins by subtracting the item size from half the bin capacity and dividing by the absolute difference between the half bin capacity and item size.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / abs(bins - item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the rest capacity and an increasing linear function of the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities + (np.arange(len(rest_capacities)) + 1) * item\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Score bins by dividing the item size by the percentage of the bin's capacity that is greater than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_15.json
================================================
[
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by subtracting the item's size divided by the rest capacity multiplied by bin's capacity and rest capacity squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item / bins) - (bins ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Assign each bin a score by subtracting the square root of the bin\u2019s index multiplied by the item size and the square root of half of the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(np.arange(len(bins)) * item) - np.sqrt(bins / 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will take into account the difference between the bin's rest capacity and the item's value, and a penalty for using bins with a rest capacity smaller than item's value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = item - bins\n \n # Penalize bins with a rest capacity smaller than the item's value\n penalties = np.where(diff < 0, diff**2, 0)\n \n # Calculate the scores for each bin\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "{New algorithm: Score bins by subtracting the item size from half the bin capacity and dividing by the absolute difference between the half bin capacity and item size.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / abs(bins - item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": " New Algorithm: Score bins by multiplying their index by a weight and adding their capacity to the result. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and capacity\n scores = (np.arange(len(bins)) * item) + bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Score bins by dividing the item size by the percentage of the bin's capacity that is greater than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_16.json
================================================
[
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by subtracting the item's size divided by the rest capacity multiplied by bin's capacity and rest capacity squared.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item / bins) - (bins ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Assign each bin a score by subtracting the square root of the bin\u2019s index multiplied by the item size and the square root of half of the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(np.arange(len(bins)) * item) - np.sqrt(bins / 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by subtracting a penalty from the sum of power of rest capacity and power of half of the item value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the penalty for each bin based on its rest capacity\n penalties = np.power(bins - item, 2)\n \n # Calculate the score for each bin by subtracting the penalty\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "{New algorithm: Score bins by subtracting the item size from half the bin capacity and dividing by the absolute difference between the half bin capacity and item size.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / abs(bins - item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": " New Algorithm: Score bins by multiplying their index by a weight and adding their capacity to the result. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and capacity\n scores = (np.arange(len(bins)) * item) + bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_17.json
================================================
[
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by dividing the item size by the product of the bin index and the square of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = (item / (bins * bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Assign each bin a score by subtracting the square root of the bin\u2019s index multiplied by the item size and the square root of half of the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(np.arange(len(bins)) * item) - np.sqrt(bins / 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by subtracting a penalty from the sum of power of rest capacity and power of half of the item value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the penalty for each bin based on its rest capacity\n penalties = np.power(bins - item, 2)\n \n # Calculate the score for each bin by subtracting the penalty\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "{New algorithm: Score bins by subtracting the item size from half the bin capacity and dividing by the absolute difference between the half bin capacity and item size.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / abs(bins - item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": " New Algorithm: Score bins by multiplying their index by a weight and adding their capacity to the result. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and capacity\n scores = (np.arange(len(bins)) * item) + bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_18.json
================================================
[
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by taking the ratio of its rest capacity to item size, subtracting the square root of its index, and adding the square root of the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size\n ratios = bins / item\n \n # Subtract the square root of the index of each bin\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n scores = ratios - sqrt_indices\n \n # Add the square root of the number of used bins\n num_used_bins = len(bins) - np.count_nonzero(bins > item)\n scores += np.sqrt(num_used_bins)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by dividing the item size by the product of the bin index and the square of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = (item / (bins * bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by dividing the sum of item size and rest capacity by their product, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins) / (item * bins) - (np.square(np.arange(len(bins))) / len(bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Assign each bin a score by subtracting the square root of the bin\u2019s index multiplied by the item size and the square root of half of the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(np.arange(len(bins)) * item) - np.sqrt(bins / 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the product of the square root of the difference between the bin's capacity and the item's size, and the inverse of the bin's index multiplied by the sine of the difference between the bin's capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = np.sqrt((bins - item) / bins) * (1 / np.sin(bins - item))\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "{New algorithm: Score bins by subtracting the item size from half the bin capacity and dividing by the absolute difference between the half bin capacity and item size.}",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / abs(bins - item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_19.json
================================================
[
{
"algorithm": "Assign the item to the bin with the maximum score computed by taking the sum of the inverse of the difference between the bin's capacity and the item's size multiplied by the sine of the rest capacity divided by the item's size, and the square root of the inverse of the square of the bin's index multiplied by the cosine of the rest capacity divided by the item's size.\\",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the sine of the rest capacity divided by the item's size\n sin_rest = np.sin(inv_diff * item)\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_index = np.sqrt(inv_diff ** 2)\n \n # Compute the cosine of the rest capacity divided by the item's size\n cos_rest = np.cos(sqrt_index * item)\n \n # Compute the final score for each bin\n scores = inv_diff + sin_rest + cos_rest\n \n return scores",
"objective": 0.02636,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_inv_sq_idx = np.sqrt(inv_sq_diff)\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item)\n sq_cos_rest_capacity = np.square(cos_rest_capacity)\n \n # Compute the final score\n scores = inv_sq_diff + sqrt_inv_sq_idx + sq_cos_rest_capacity\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": "Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item) ** 2\n # Calculate the final score\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed as the sum of the inverse of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (bins ** 2)\n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_sq_rest_capacity = np.sin(np.square(bins - item))\n # Multiply the three terms together\n scores = inv_diff * inv_sq_idx * sin_sq_rest_capacity\n return scores",
"objective": 0.03552,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by taking the ratio of its rest capacity to item size, subtracting the square root of its index, and adding the square root of the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size\n ratios = bins / item\n \n # Subtract the square root of the index of each bin\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n scores = ratios - sqrt_indices\n \n # Add the square root of the number of used bins\n num_used_bins = len(bins) - np.count_nonzero(bins > item)\n scores += np.sqrt(num_used_bins)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by dividing the item size by the product of the bin index and the square of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = (item / (bins * bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by dividing the sum of item size and rest capacity by their product, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins) / (item * bins) - (np.square(np.arange(len(bins))) / len(bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Assign each bin a score by subtracting the square root of the bin\u2019s index multiplied by the item size and the square root of half of the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(np.arange(len(bins)) * item) - np.sqrt(bins / 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score, calculated as the difference between the square root of the bin's index and the natural logarithm of the sum of the bin's rest capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the difference between the square root of the bin index and the natural logarithm of the sum of the bin rest capacity and the item size\n scores = np.sqrt(np.arange(len(bins))) - np.log(bins + item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the product of the square root of the difference between the bin's capacity and the item's size, and the inverse of the bin's index multiplied by the sine of the difference between the bin's capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the scores for each bin\n scores = np.sqrt((bins - item) / bins) * (1 / np.sin(bins - item))\n \n # Normalize the scores to ensure they sum to 1\n scores = scores / np.sum(scores)\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_2.json
================================================
[
{
"algorithm": "The new algorithm considers the rest capacity of each bin in relation to the item's size, calculates the ratio of the item's size to the bin's rest capacity, and normalizes the scores based on the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item's size to the bin's rest capacity\n ratios = item / (bins - item)\n \n # Normalize the scores based on the item's size\n scores = ratios / np.max(ratios)\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin based on the sum of the bin's rest capacity divided by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power of 2 raised to the index of each bin\n powers = np.power(2, np.arange(len(bins)))\n \n # Calculate the sum of the bin's rest capacity divided by the power of 2\n scores = (bins - item) / powers\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate scores based on a ratio between rest capacity and item size, penalized by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = bins / item\n \n # Penalize bins with higher indices\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the total score for each bin\n scores = ratios - penalties\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 4 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 4 for the indices of the bins\n powers_of_4 = np.power(4, np.arange(len(bins)))\n \n # Multiply the square root rest capacities by the powers of 4\n scores = sqrt_rest_capacities * powers_of_4\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate available capacity as the minimum of the remaining capacity or the item size, then score each bin as the available capacity times a penalty factor if the bin has less than 50% spare capacity, otherwise set the score to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate available capacity for each bin\n available_capacity = np.minimum(bins, item)\n \n # Penalize bins with less than 50% spare capacity\n penalties = np.where(available_capacity < 0.5 * bins, available_capacity, 0)\n \n # Score each bin based on available capacity and penalties\n scores = available_capacity - penalties\n \n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": "A new algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 2 raised to the indices of the bins\n powers_of_two = 2 ** np.arange(len(bins))\n \n # Multiply the square root rest capacities by the powers of two\n scores = sqrt_rest_capacities * powers_of_two\n \n # Return the scores for the bins\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Adjusted algorithm: Calculates bin scores as the weighted sum of the rest capacity to the power of 0.5, the proximity to the item size, and a penalty for exceeding the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity to the power of 0.5, the proximity to the item size, and a penalty for exceeding the maximum capacity\n scores = (bins / np.sqrt(bins)) * (np.abs(item - bins) ** 0.5) + (bins > item) * (bins - item)\n \n # Penalize bins that exceed the maximum capacity\n scores[bins > item] -= (bins[bins > item] - item) ** 2\n \n return scores",
"objective": 0.04568,
"other_inf": null
},
{
"algorithm": "The algorithm scores bins as a product of their rest capacity and the inverse of the maximum score of all bins, with bins at maximum capacity receiving a score of zero and prioritizing larger rest capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the maximum score for each bin\n max_scores = np.maximum(0, bins - item)\n \n # Calculate the inverse of the maximum score for each bin\n inv_max_scores = np.reciprocal(max_scores)\n \n # Calculate the product of the rest capacity and the inverse of the maximum score for each bin\n scores = np.multiply(bins, inv_max_scores)\n \n # Return the scores\n return scores",
"objective": 0.0492,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "New Algorithm: Instead of dividing the capacities by the item size, the new algorithm takes the absolute difference between the capacities and the item size, then divides by the maximum of that difference or 1, and penalizes bins with maximum capacity with a score of 0",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the capacities and the item size\n diff = np.abs(bins - item)\n \n # Divide the absolute difference by the maximum of that difference or 1\n norm_diff = diff / np.maximum(diff, 1)\n \n # Penalize bins with maximum capacity with a score of 0\n scores = norm_diff * (1 - (bins == bins.max()))\n \n return scores",
"objective": 0.05091,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the multiplication of the rest capacity, the inversly exponential decay of index and a power of the ratio of the item to the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the inverse exponential decay of the indices\n indices = np.arange(len(rest_capacities))\n decays = np.exp(-indices / len(rest_capacities))\n \n # Calculate the ratios of the item to the rest capacities\n ratios = item / rest_capacities\n \n # Calculate the scores for each bin\n scores = (rest_capacities * decays) ** ratios\n \n return scores",
"objective": 0.0655,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin based on the sum of the bin's rest capacity multiplied by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power of 2 raised to the index of each bin\n powers = np.power(2, np.arange(len(bins)))\n \n # Multiply the rest capacity of each bin by its corresponding power\n scores = powers * (bins - item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.07959,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_20.json
================================================
[
{
"algorithm": "Assigning item to the bin with highest score which is sum of square of inverse of rest capacity, logarithm of rest capacity divided by item size, and cube root of bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the logarithm of the rest capacity for each bin\n log_rest_capacity = np.log(inv_rest_capacity)\n \n # Calculate the cube root of the bin index for each bin\n cube_root_bin_index = np.cbrt(np.arange(len(bins)))\n \n # Calculate the score for each bin using the formula you provided\n scores = inv_rest_capacity * log_rest_capacity + cube_root_bin_index\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by taking the sum of the inverse of the difference between the bin's capacity and the item's size multiplied by the sine of the rest capacity divided by the item's size, and the square root of the inverse of the square of the bin's index multiplied by the cosine of the rest capacity divided by the item's size.\\",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the sine of the rest capacity divided by the item's size\n sin_rest = np.sin(inv_diff * item)\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_index = np.sqrt(inv_diff ** 2)\n \n # Compute the cosine of the rest capacity divided by the item's size\n cos_rest = np.cos(sqrt_index * item)\n \n # Compute the final score for each bin\n scores = inv_diff + sin_rest + cos_rest\n \n return scores",
"objective": 0.02636,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_inv_sq_idx = np.sqrt(inv_sq_diff)\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item)\n sq_cos_rest_capacity = np.square(cos_rest_capacity)\n \n # Compute the final score\n scores = inv_sq_diff + sqrt_inv_sq_idx + sq_cos_rest_capacity\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": "Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item) ** 2\n # Calculate the final score\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed as the sum of the inverse of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (bins ** 2)\n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_sq_rest_capacity = np.sin(np.square(bins - item))\n # Multiply the three terms together\n scores = inv_diff * inv_sq_idx * sin_sq_rest_capacity\n return scores",
"objective": 0.03552,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by dividing the sum of item size and rest capacity by their difference, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins) / (bins - item) - (np.arange(len(bins)) ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by taking the ratio of its rest capacity to item size, subtracting the square root of its index, and adding the square root of the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size\n ratios = bins / item\n \n # Subtract the square root of the index of each bin\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n scores = ratios - sqrt_indices\n \n # Add the square root of the number of used bins\n num_used_bins = len(bins) - np.count_nonzero(bins > item)\n scores += np.sqrt(num_used_bins)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by dividing the item size by the product of the bin index and the square of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = (item / (bins * bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by dividing the sum of item size and rest capacity by their product, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins) / (item * bins) - (np.square(np.arange(len(bins))) / len(bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Assign each bin a score by subtracting the square root of the bin\u2019s index multiplied by the item size and the square root of half of the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(np.arange(len(bins)) * item) - np.sqrt(bins / 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign each bin a score by subtracting the square root of the bin\u2019s index multiplied by the item size and the square root of the rest capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(np.arange(len(bins)) * item) - np.sqrt(bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04035,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_21.json
================================================
[
{
"algorithm": "Assigning item to the bin with highest score which is sum of square of inverse of rest capacity, logarithm of rest capacity divided by item size, and cube root of bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity for each bin\n inv_rest_capacity = 1 / (bins - item)\n \n # Calculate the logarithm of the rest capacity for each bin\n log_rest_capacity = np.log(inv_rest_capacity)\n \n # Calculate the cube root of the bin index for each bin\n cube_root_bin_index = np.cbrt(np.arange(len(bins)))\n \n # Calculate the score for each bin using the formula you provided\n scores = inv_rest_capacity * log_rest_capacity + cube_root_bin_index\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by taking the sum of the inverse of the difference between the bin's capacity and the item's size multiplied by the sine of the rest capacity divided by the item's size, and the square root of the inverse of the square of the bin's index multiplied by the cosine of the rest capacity divided by the item's size.\\",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the sine of the rest capacity divided by the item's size\n sin_rest = np.sin(inv_diff * item)\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_index = np.sqrt(inv_diff ** 2)\n \n # Compute the cosine of the rest capacity divided by the item's size\n cos_rest = np.cos(sqrt_index * item)\n \n # Compute the final score for each bin\n scores = inv_diff + sin_rest + cos_rest\n \n return scores",
"objective": 0.02636,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign item to the bin with the maximum score computed by finding the square of the sum of the square root of the bin's capacity divided by the item's size and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the square of the sum of the square root of the bin's capacity divided by the item's size\n sqrt_capacity = np.sqrt(bins)\n capacity_sum = np.sum(sqrt_capacity)\n capacity_sqr = capacity_sum ** 2\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cosine = np.cos(np.pi * (bins - item) / item)\n cosine_sqr = cosine ** 2\n \n # Compute the final score\n scores = capacity_sqr + cosine_sqr\n \n return scores",
"objective": 0.02666,
"other_inf": null
},
{
"algorithm": "Algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the sine of the rest capacity divided by the item's size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the sine of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(inv_rest_capacity * item) ** 2\n # Calculate the total score for each bin\n scores = inv_rest_capacity + sqrt_bin_index + sin_rest_capacity\n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_inv_sq_idx = np.sqrt(inv_sq_diff)\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item)\n sq_cos_rest_capacity = np.square(cos_rest_capacity)\n \n # Compute the final score\n scores = inv_sq_diff + sqrt_inv_sq_idx + sq_cos_rest_capacity\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": "Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item) ** 2\n # Calculate the final score\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed as the sum of the inverse of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (bins ** 2)\n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_sq_rest_capacity = np.sin(np.square(bins - item))\n # Multiply the three terms together\n scores = inv_diff * inv_sq_idx * sin_sq_rest_capacity\n return scores",
"objective": 0.03552,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by dividing the sum of item size and rest capacity by their difference, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins) / (bins - item) - (np.arange(len(bins)) ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by taking the ratio of its rest capacity to item size, subtracting the square root of its index, and adding the square root of the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size\n ratios = bins / item\n \n # Subtract the square root of the index of each bin\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n scores = ratios - sqrt_indices\n \n # Add the square root of the number of used bins\n num_used_bins = len(bins) - np.count_nonzero(bins > item)\n scores += np.sqrt(num_used_bins)\n \n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by dividing the item size by the product of the bin index and the square of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = (item / (bins * bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by dividing the sum of item size and rest capacity by their product, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins) / (item * bins) - (np.square(np.arange(len(bins))) / len(bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Assign each bin a score by subtracting the square root of the bin\u2019s index multiplied by the item size and the square root of half of the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(np.arange(len(bins)) * item) - np.sqrt(bins / 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_22.json
================================================
[
{
"algorithm": "New algorithm: Calculate bins scores by summing the hyperbolic tangent of the negative difference between the bin capacity and the item size, and the cube root of the positive difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the hyperbolic tangent of the negative difference between the bin capacity and the item size\n t = np.tanh(-(bins - item))\n \n # Calculate the cube root of the positive difference between the bin's index and the number of bins\n r = np.cbrt(bins - np.arange(len(bins)))\n \n # Sum the hyperbolic tangent and cube root\n scores = t + r\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by taking the sum of the inverse of the difference between the bin's capacity and the item's size multiplied by the sine of the rest capacity divided by the item's size, and the square root of the inverse of the square of the bin's index multiplied by the cosine of the rest capacity divided by the item's size.\\",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the sine of the rest capacity divided by the item's size\n sin_rest = np.sin(inv_diff * item)\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_index = np.sqrt(inv_diff ** 2)\n \n # Compute the cosine of the rest capacity divided by the item's size\n cos_rest = np.cos(sqrt_index * item)\n \n # Compute the final score for each bin\n scores = inv_diff + sin_rest + cos_rest\n \n return scores",
"objective": 0.02636,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign item to the bin with the maximum score computed by finding the square of the sum of the square root of the bin's capacity divided by the item's size and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the square of the sum of the square root of the bin's capacity divided by the item's size\n sqrt_capacity = np.sqrt(bins)\n capacity_sum = np.sum(sqrt_capacity)\n capacity_sqr = capacity_sum ** 2\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cosine = np.cos(np.pi * (bins - item) / item)\n cosine_sqr = cosine ** 2\n \n # Compute the final score\n scores = capacity_sqr + cosine_sqr\n \n return scores",
"objective": 0.02666,
"other_inf": null
},
{
"algorithm": "Algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the sine of the rest capacity divided by the item's size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the sine of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(inv_rest_capacity * item) ** 2\n # Calculate the total score for each bin\n scores = inv_rest_capacity + sqrt_bin_index + sin_rest_capacity\n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_inv_sq_idx = np.sqrt(inv_sq_diff)\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item)\n sq_cos_rest_capacity = np.square(cos_rest_capacity)\n \n # Compute the final score\n scores = inv_sq_diff + sqrt_inv_sq_idx + sq_cos_rest_capacity\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": "Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item) ** 2\n # Calculate the final score\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index multiplied by 0.5, and the square of the cosine of the rest capacity multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index multiplied by 0.5\n sqrt_bin_index = np.sqrt(np.arange(len(bins)) * 0.5)\n # Calculate the square of the cosine of the rest capacity multiplied by item size\n cos_rest_capacity = np.cos(np.deg2rad(bins) * item) ** 2\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed as the sum of the inverse of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (bins ** 2)\n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_sq_rest_capacity = np.sin(np.square(bins - item))\n # Multiply the three terms together\n scores = inv_diff * inv_sq_idx * sin_sq_rest_capacity\n return scores",
"objective": 0.03552,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Score each bin by dividing the sum of item size and half of rest capacity by their difference, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins / 2) / (bins - item)\n \n # Subtract the square of the bin index from the scores\n scores -= np.square(np.arange(len(bins)))\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by dividing the sum of item size and rest capacity by their difference, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins) / (bins - item) - (np.arange(len(bins)) ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed as the sum of the inverse of the difference between the bin's capacity and the item's size, and a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = np.divide(np.ones(len(bins)), np.subtract(bins, item))\n # Add a random number between 0 and 1 to the inverse of the difference\n rand = np.random.uniform(size=inv_diff.shape)\n scores = np.multiply(inv_diff, rand)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by dividing the item size by the product of the bin index and the square of its rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin\n scores = (item / (bins * bins))\n \n # Return the scores in descending order\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Score function for bins is calculated as the exponential decay of the difference between item size and rest capacity, multiplied with the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential decay of the difference between item size and rest capacity\n decay = np.exp(-(bins - item) / (bins * item))\n \n # Multiply the decay by the bin index\n scores = decay * np.arange(len(bins))\n \n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_23.json
================================================
[
{
"algorithm": "New algorithm: Calculate bins scores by summing the hyperbolic tangent of the negative difference between the bin capacity and the item size, and the cube root of the positive difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the hyperbolic tangent of the negative difference between the bin capacity and the item size\n t = np.tanh(-(bins - item))\n \n # Calculate the cube root of the positive difference between the bin's index and the number of bins\n r = np.cbrt(bins - np.arange(len(bins)))\n \n # Sum the hyperbolic tangent and cube root\n scores = t + r\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by taking the sum of the inverse of the difference between the bin's capacity and the item's size multiplied by the sine of the rest capacity divided by the item's size, and the square root of the inverse of the square of the bin's index multiplied by the cosine of the rest capacity divided by the item's size.\\",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the sine of the rest capacity divided by the item's size\n sin_rest = np.sin(inv_diff * item)\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_index = np.sqrt(inv_diff ** 2)\n \n # Compute the cosine of the rest capacity divided by the item's size\n cos_rest = np.cos(sqrt_index * item)\n \n # Compute the final score for each bin\n scores = inv_diff + sin_rest + cos_rest\n \n return scores",
"objective": 0.02636,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign item to the bin with the maximum score computed by finding the square of the sum of the square root of the bin's capacity divided by the item's size and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the square of the sum of the square root of the bin's capacity divided by the item's size\n sqrt_capacity = np.sqrt(bins)\n capacity_sum = np.sum(sqrt_capacity)\n capacity_sqr = capacity_sum ** 2\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cosine = np.cos(np.pi * (bins - item) / item)\n cosine_sqr = cosine ** 2\n \n # Compute the final score\n scores = capacity_sqr + cosine_sqr\n \n return scores",
"objective": 0.02666,
"other_inf": null
},
{
"algorithm": "Algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the sine of the rest capacity divided by the item's size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the sine of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(inv_rest_capacity * item) ** 2\n # Calculate the total score for each bin\n scores = inv_rest_capacity + sqrt_bin_index + sin_rest_capacity\n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_inv_sq_idx = np.sqrt(inv_sq_diff)\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item)\n sq_cos_rest_capacity = np.square(cos_rest_capacity)\n \n # Compute the final score\n scores = inv_sq_diff + sqrt_inv_sq_idx + sq_cos_rest_capacity\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": "Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item) ** 2\n # Calculate the final score\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n sq_cos_rest = np.square(np.cos(bins * item))\n \n # Compute the total score for each bin\n scores = inv_sq_diff + sq_cos_rest\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index multiplied by 0.5, and the square of the cosine of the rest capacity multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index multiplied by 0.5\n sqrt_bin_index = np.sqrt(np.arange(len(bins)) * 0.5)\n # Calculate the square of the cosine of the rest capacity multiplied by item size\n cos_rest_capacity = np.cos(np.deg2rad(bins) * item) ** 2\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the cube of the difference between the bin's capacity and the item's size, the cube root of the sum of the inverse of the square of the bin's index, and the square of the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the cube of the difference between the bin's capacity and the item's size\n inv_sq_cube_diff = 1 / (np.square(bins - item) ** 3)\n \n # Compute the cube root of the sum of the inverse of the square of the bin's index\n cube_root_sum = np.sqrt(np.sum(inv_sq_cube_diff))\n \n # Compute the square of the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item) ** 2\n \n # Compute the final score\n scores = inv_sq_cube_diff + cube_root_sum + cos_sq_rest_capacity\n \n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed as the sum of the inverse of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (bins ** 2)\n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_sq_rest_capacity = np.sin(np.square(bins - item))\n # Multiply the three terms together\n scores = inv_diff * inv_sq_idx * sin_sq_rest_capacity\n return scores",
"objective": 0.03552,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by multiplying the inverse of the sum of the square of the inverse of the difference between the bin's capacity and the item's size, and the cosine of the square of the rest capacity divided by the item's size, by the square root of the sum of the inverse of the square of the bin's index, and the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the sum of the square of the inverse of the difference between the bin's capacity and the item's size\n inv_sum_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.square(bins - item))\n \n # Compute the square root of the sum of the inverse of the square of the bin's index\n sqrt_inv_bin_index = np.sqrt(np.square(np.arange(len(bins))))\n \n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(np.square(bins - item))\n \n # Multiply the inverse of the sum of the square of the inverse of the difference between the bin's capacity and the item's size, and the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sum_sq_diff * cos_rest_capacity\n \n # Add the square root of the sum of the inverse of the square of the bin's index\n scores += sqrt_inv_bin_index\n \n # Add the sine of the square of the rest capacity divided by the item's size\n scores += sin_rest_capacity\n \n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Score each bin by dividing the sum of item size and half of rest capacity by their difference, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins / 2) / (bins - item)\n \n # Subtract the square of the bin index from the scores\n scores -= np.square(np.arange(len(bins)))\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by dividing the sum of item size and rest capacity by their difference, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins) / (bins - item) - (np.arange(len(bins)) ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed as the sum of the inverse of the difference between the bin's capacity and the item's size, and a random number between 0 and 1.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = np.divide(np.ones(len(bins)), np.subtract(bins, item))\n # Add a random number between 0 and 1 to the inverse of the difference\n rand = np.random.uniform(size=inv_diff.shape)\n scores = np.multiply(inv_diff, rand)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_24.json
================================================
[
{
"algorithm": "Compute the bin scores by multiplying the tanh of the negative difference between the bin capacity and the item size with the square root of the positive difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the tanh of the negative difference between the bin capacity and the item size\n diff = np.tanh(-(bins - item))\n \n # Compute the square root of the positive difference between the bin's index and the number of bins\n sqrt_diff = np.sqrt(np.abs(bins - np.arange(len(bins))))\n \n # Multiply the tanh and square root differences to get the final scores\n scores = diff * sqrt_diff\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bins scores by summing the hyperbolic tangent of the negative difference between the bin capacity and the item size, and the cube root of the positive difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the hyperbolic tangent of the negative difference between the bin capacity and the item size\n t = np.tanh(-(bins - item))\n \n # Calculate the cube root of the positive difference between the bin's index and the number of bins\n r = np.cbrt(bins - np.arange(len(bins)))\n \n # Sum the hyperbolic tangent and cube root\n scores = t + r\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by taking the sum of the inverse of the difference between the bin's capacity and the item's size multiplied by the sine of the rest capacity divided by the item's size, and the square root of the inverse of the square of the bin's index multiplied by the cosine of the rest capacity divided by the item's size.\\",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the sine of the rest capacity divided by the item's size\n sin_rest = np.sin(inv_diff * item)\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_index = np.sqrt(inv_diff ** 2)\n \n # Compute the cosine of the rest capacity divided by the item's size\n cos_rest = np.cos(sqrt_index * item)\n \n # Compute the final score for each bin\n scores = inv_diff + sin_rest + cos_rest\n \n return scores",
"objective": 0.02636,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign item to the bin with the maximum score computed by finding the square of the sum of the square root of the bin's capacity divided by the item's size and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the square of the sum of the square root of the bin's capacity divided by the item's size\n sqrt_capacity = np.sqrt(bins)\n capacity_sum = np.sum(sqrt_capacity)\n capacity_sqr = capacity_sum ** 2\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cosine = np.cos(np.pi * (bins - item) / item)\n cosine_sqr = cosine ** 2\n \n # Compute the final score\n scores = capacity_sqr + cosine_sqr\n \n return scores",
"objective": 0.02666,
"other_inf": null
},
{
"algorithm": "Algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the sine of the rest capacity divided by the item's size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the sine of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(inv_rest_capacity * item) ** 2\n # Calculate the total score for each bin\n scores = inv_rest_capacity + sqrt_bin_index + sin_rest_capacity\n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the natural logarithm of the bin index, and the sine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the natural logarithm of the bin index\n log_bin_index = np.log(np.arange(len(bins)))\n # Calculate the sine of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(inv_rest_capacity * item)\n \n # Combine the three components into a single score\n scores = inv_rest_capacity + log_bin_index + sin_rest_capacity\n \n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_inv_sq_idx = np.sqrt(inv_sq_diff)\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item)\n sq_cos_rest_capacity = np.square(cos_rest_capacity)\n \n # Compute the final score\n scores = inv_sq_diff + sqrt_inv_sq_idx + sq_cos_rest_capacity\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": "Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item) ** 2\n # Calculate the final score\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n sq_cos_rest = np.square(np.cos(bins * item))\n \n # Compute the total score for each bin\n scores = inv_sq_diff + sq_cos_rest\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index multiplied by 0.5, and the square of the cosine of the rest capacity multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index multiplied by 0.5\n sqrt_bin_index = np.sqrt(np.arange(len(bins)) * 0.5)\n # Calculate the square of the cosine of the rest capacity multiplied by item size\n cos_rest_capacity = np.cos(np.deg2rad(bins) * item) ** 2\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the cube of the difference between the bin's capacity and the item's size, the cube root of the sum of the inverse of the square of the bin's index, and the square of the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the cube of the difference between the bin's capacity and the item's size\n inv_sq_cube_diff = 1 / (np.square(bins - item) ** 3)\n \n # Compute the cube root of the sum of the inverse of the square of the bin's index\n cube_root_sum = np.sqrt(np.sum(inv_sq_cube_diff))\n \n # Compute the square of the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item) ** 2\n \n # Compute the final score\n scores = inv_sq_cube_diff + cube_root_sum + cos_sq_rest_capacity\n \n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed as the sum of the inverse of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (bins ** 2)\n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_sq_rest_capacity = np.sin(np.square(bins - item))\n # Multiply the three terms together\n scores = inv_diff * inv_sq_idx * sin_sq_rest_capacity\n return scores",
"objective": 0.03552,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score by multiplying the inverse square of the sum of the difference between the bin's capacity and the item's size, and the square of the cosine of the rest capacity divided by the item's size, by the square root of the sum of the inverse of the square of the bin's index and the sine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse square of the sum of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Calculate the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(bins * item)\n sq_cos_rest_capacity = np.square(cos_rest_capacity)\n \n # Calculate the square root of the sum of the inverse of the square of the bin's index and the sine of the rest capacity divided by the item's size\n sqrt_inv_sq_bin_index = np.sqrt(np.square(np.arange(len(bins))) + 1e-8)\n sin_rest_capacity = np.sin(bins * item)\n sq_sin_rest_capacity = np.square(sin_rest_capacity)\n \n # Multiply the inverse square of the sum of the difference between the bin's capacity and the item's size, and the square of the cosine of the rest capacity divided by the item's size\n scores = inv_sq_diff * sq_cos_rest_capacity\n \n # Add the square root of the sum of the inverse of the square of the bin's index and the sine of the rest capacity divided by the item's size\n scores += sqrt_inv_sq_bin_index * sq_sin_rest_capacity\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by multiplying the inverse of the sum of the square of the inverse of the difference between the bin's capacity and the item's size, and the cosine of the square of the rest capacity divided by the item's size, by the square root of the sum of the inverse of the square of the bin's index, and the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the sum of the square of the inverse of the difference between the bin's capacity and the item's size\n inv_sum_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.square(bins - item))\n \n # Compute the square root of the sum of the inverse of the square of the bin's index\n sqrt_inv_bin_index = np.sqrt(np.square(np.arange(len(bins))))\n \n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(np.square(bins - item))\n \n # Multiply the inverse of the sum of the square of the inverse of the difference between the bin's capacity and the item's size, and the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sum_sq_diff * cos_rest_capacity\n \n # Add the square root of the sum of the inverse of the square of the bin's index\n scores += sqrt_inv_bin_index\n \n # Add the sine of the square of the rest capacity divided by the item's size\n scores += sin_rest_capacity\n \n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed as the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the cube of the bin's index, multiplied by the sine of the cube of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the inverse of the cube of the bin's index\n inv_cube_idx = 1 / (np.power(np.arange(len(bins)), 3))\n \n # Compute the sine of the cube of the rest capacity divided by the item's size\n sin_cube_rest = np.sin(np.power(bins - item, 3) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the cube of the bin's index, by the sine of the cube of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_cube_idx * sin_cube_rest\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Score each bin by dividing the sum of item size and half of rest capacity by their difference, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins / 2) / (bins - item)\n \n # Subtract the square of the bin index from the scores\n scores -= np.square(np.arange(len(bins)))\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by dividing the sum of item size and rest capacity by their difference, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins) / (bins - item) - (np.arange(len(bins)) ** 2)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03874,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_25.json
================================================
[
{
"algorithm": "Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the bin index, and the tangent of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the bin index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the tangent of the rest capacity divided by the item size\n tan_rest_capacity = np.tan((bins - item) / item)\n \n # Calculate the final scores\n scores = inv_rest_capacity + sqrt_bin_index + tan_rest_capacity\n \n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "Compute the bin scores by multiplying the tanh of the negative difference between the bin capacity and the item size with the square root of the positive difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the tanh of the negative difference between the bin capacity and the item size\n diff = np.tanh(-(bins - item))\n \n # Compute the square root of the positive difference between the bin's index and the number of bins\n sqrt_diff = np.sqrt(np.abs(bins - np.arange(len(bins))))\n \n # Multiply the tanh and square root differences to get the final scores\n scores = diff * sqrt_diff\n \n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bins scores by summing the hyperbolic tangent of the negative difference between the bin capacity and the item size, and the cube root of the positive difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the hyperbolic tangent of the negative difference between the bin capacity and the item size\n t = np.tanh(-(bins - item))\n \n # Calculate the cube root of the positive difference between the bin's index and the number of bins\n r = np.cbrt(bins - np.arange(len(bins)))\n \n # Sum the hyperbolic tangent and cube root\n scores = t + r\n \n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by taking the sum of the inverse of the difference between the bin's capacity and the item's size multiplied by the sine of the rest capacity divided by the item's size, and the square root of the inverse of the square of the bin's index multiplied by the cosine of the rest capacity divided by the item's size.\\",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the sine of the rest capacity divided by the item's size\n sin_rest = np.sin(inv_diff * item)\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_index = np.sqrt(inv_diff ** 2)\n \n # Compute the cosine of the rest capacity divided by the item's size\n cos_rest = np.cos(sqrt_index * item)\n \n # Compute the final score for each bin\n scores = inv_diff + sin_rest + cos_rest\n \n return scores",
"objective": 0.02636,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign item to the bin with the maximum score computed by finding the square of the sum of the square root of the bin's capacity divided by the item's size and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the square of the sum of the square root of the bin's capacity divided by the item's size\n sqrt_capacity = np.sqrt(bins)\n capacity_sum = np.sum(sqrt_capacity)\n capacity_sqr = capacity_sum ** 2\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cosine = np.cos(np.pi * (bins - item) / item)\n cosine_sqr = cosine ** 2\n \n # Compute the final score\n scores = capacity_sqr + cosine_sqr\n \n return scores",
"objective": 0.02666,
"other_inf": null
},
{
"algorithm": "Algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the sine of the rest capacity divided by the item's size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the sine of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(inv_rest_capacity * item) ** 2\n # Calculate the total score for each bin\n scores = inv_rest_capacity + sqrt_bin_index + sin_rest_capacity\n return scores",
"objective": 0.02707,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the natural logarithm of the bin index, and the sine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the natural logarithm of the bin index\n log_bin_index = np.log(np.arange(len(bins)))\n # Calculate the sine of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(inv_rest_capacity * item)\n \n # Combine the three components into a single score\n scores = inv_rest_capacity + log_bin_index + sin_rest_capacity\n \n return scores",
"objective": 0.02908,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square root of the inverse of the square of the bin's index\n sqrt_inv_sq_idx = np.sqrt(inv_sq_diff)\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item)\n sq_cos_rest_capacity = np.square(cos_rest_capacity)\n \n # Compute the final score\n scores = inv_sq_diff + sqrt_inv_sq_idx + sq_cos_rest_capacity\n \n return scores",
"objective": 0.02998,
"other_inf": null
},
{
"algorithm": "Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)))\n # Calculate the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.pi * (bins - item) / item) ** 2\n # Calculate the final score\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n return scores",
"objective": 0.03008,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the square of the cosine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the square of the cosine of the rest capacity divided by the item's size\n sq_cos_rest = np.square(np.cos(bins * item))\n \n # Compute the total score for each bin\n scores = inv_sq_diff + sq_cos_rest\n \n return scores",
"objective": 0.03039,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by summing the inverse of the rest capacity divided by the item size, the square root of the inverse of the square of the bin's index multiplied by 0.5, and the square of the cosine of the rest capacity multiplied by item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity divided by the item size\n inv_rest_capacity = 1 / (bins - item)\n # Calculate the square root of the inverse of the square of the bin's index multiplied by 0.5\n sqrt_bin_index = np.sqrt(np.arange(len(bins)) * 0.5)\n # Calculate the square of the cosine of the rest capacity multiplied by item size\n cos_rest_capacity = np.cos(np.deg2rad(bins) * item) ** 2\n \n # Calculate the total score for each bin\n scores = inv_rest_capacity + sqrt_bin_index + cos_rest_capacity\n \n return scores",
"objective": 0.03391,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the difference between the bin's capacity and the item's size, and the bin's index multiplied by the cosine of the square of the rest capacity divided by the item's size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sqr = np.cos(np.square(bins * inv_diff))\n \n # Compute the sum of the inverse of the difference and the cosine\n scores = inv_diff + cos_sqr\n \n return scores",
"objective": 0.03431,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the cube of the difference between the bin's capacity and the item's size, the cube root of the sum of the inverse of the square of the bin's index, and the square of the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the cube of the difference between the bin's capacity and the item's size\n inv_sq_cube_diff = 1 / (np.square(bins - item) ** 3)\n \n # Compute the cube root of the sum of the inverse of the square of the bin's index\n cube_root_sum = np.sqrt(np.sum(inv_sq_cube_diff))\n \n # Compute the square of the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item) ** 2\n \n # Compute the final score\n scores = inv_sq_cube_diff + cube_root_sum + cos_sq_rest_capacity\n \n return scores",
"objective": 0.03481,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by finding the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (np.square(np.arange(len(bins))) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_sq_rest_capacity = np.cos(np.square(bins - item) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, by the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_sq_idx * cos_sq_rest_capacity\n \n return scores",
"objective": 0.03501,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed as the sum of the inverse of the difference between the bin's capacity and the item's size, and the inverse of the square of the bin's index, multiplied by the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the difference between the bin's capacity and the item's size\n inv_diff = 1 / (bins - item)\n # Compute the inverse of the square of the bin's index\n inv_sq_idx = 1 / (bins ** 2)\n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_sq_rest_capacity = np.sin(np.square(bins - item))\n # Multiply the three terms together\n scores = inv_diff * inv_sq_idx * sin_sq_rest_capacity\n return scores",
"objective": 0.03552,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score by multiplying the inverse square of the sum of the difference between the bin's capacity and the item's size, and the square of the cosine of the rest capacity divided by the item's size, by the square root of the sum of the inverse of the square of the bin's index and the sine of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse square of the sum of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Calculate the square of the cosine of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(bins * item)\n sq_cos_rest_capacity = np.square(cos_rest_capacity)\n \n # Calculate the square root of the sum of the inverse of the square of the bin's index and the sine of the rest capacity divided by the item's size\n sqrt_inv_sq_bin_index = np.sqrt(np.square(np.arange(len(bins))) + 1e-8)\n sin_rest_capacity = np.sin(bins * item)\n sq_sin_rest_capacity = np.square(sin_rest_capacity)\n \n # Multiply the inverse square of the sum of the difference between the bin's capacity and the item's size, and the square of the cosine of the rest capacity divided by the item's size\n scores = inv_sq_diff * sq_cos_rest_capacity\n \n # Add the square root of the sum of the inverse of the square of the bin's index and the sine of the rest capacity divided by the item's size\n scores += sqrt_inv_sq_bin_index * sq_sin_rest_capacity\n \n return scores",
"objective": 0.03733,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score computed by multiplying the inverse of the sum of the square of the inverse of the difference between the bin's capacity and the item's size, and the cosine of the square of the rest capacity divided by the item's size, by the square root of the sum of the inverse of the square of the bin's index, and the sine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the sum of the square of the inverse of the difference between the bin's capacity and the item's size\n inv_sum_sq_diff = 1 / (np.square(bins - item) + 1e-8)\n \n # Compute the cosine of the square of the rest capacity divided by the item's size\n cos_rest_capacity = np.cos(np.square(bins - item))\n \n # Compute the square root of the sum of the inverse of the square of the bin's index\n sqrt_inv_bin_index = np.sqrt(np.square(np.arange(len(bins))))\n \n # Compute the sine of the square of the rest capacity divided by the item's size\n sin_rest_capacity = np.sin(np.square(bins - item))\n \n # Multiply the inverse of the sum of the square of the inverse of the difference between the bin's capacity and the item's size, and the cosine of the square of the rest capacity divided by the item's size\n scores = inv_sum_sq_diff * cos_rest_capacity\n \n # Add the square root of the sum of the inverse of the square of the bin's index\n scores += sqrt_inv_bin_index\n \n # Add the sine of the square of the rest capacity divided by the item's size\n scores += sin_rest_capacity\n \n return scores",
"objective": 0.03743,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the maximum score computed as the sum of the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the cube of the bin's index, multiplied by the sine of the cube of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the inverse of the square of the difference between the bin's capacity and the item's size\n inv_sq_diff = 1 / (np.square(bins - item))\n \n # Compute the inverse of the cube of the bin's index\n inv_cube_idx = 1 / (np.power(np.arange(len(bins)), 3))\n \n # Compute the sine of the cube of the rest capacity divided by the item's size\n sin_cube_rest = np.sin(np.power(bins - item, 3) / item)\n \n # Multiply the inverse of the square of the difference between the bin's capacity and the item's size, and the inverse of the cube of the bin's index, by the sine of the cube of the rest capacity divided by the item's size\n scores = inv_sq_diff * inv_cube_idx * sin_cube_rest\n \n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "Calculate bins scores by summing the exponential of the negative difference between bin capacity and item size, and the logarithm of the negative difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the exponential of the negative difference between bin capacity and item size\n exp_diff = np.exp(-(bins - item))\n \n # Calculate the logarithm of the negative difference between the bin's index and the number of bins\n log_diff = np.log(-(np.arange(len(bins)) - len(bins)))\n \n # Sum the two terms to get the total score for each bin\n scores = exp_diff + log_diff\n \n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Score each bin by dividing the sum of item size and half of rest capacity by their difference, then subtracting the square of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (item + bins / 2) / (bins - item)\n \n # Subtract the square of the bin index from the scores\n scores -= np.square(np.arange(len(bins)))\n \n return scores",
"objective": 0.03864,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_3.json
================================================
[
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its reciprocal multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the reciprocal of each bin's rest capacity\n reciprocal_rest_capacity = 1 / (bins - item)\n \n # Calculate the score for each bin\n scores = reciprocal_rest_capacity * item\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The score for each bin is calculated as the multiplication of the ratio of the item to the rest capacity, the rest capacity and the exponential decay of the index. Score(bin) = (item / rest capacity) * rest capacity * exp(-index / number of bins).",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item to the rest capacity\n ratio = item / (bins - 1)\n \n # Calculate the exponential decay of the index\n decay = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Multiply the ratio and the exponential decay to get the scores\n scores = ratio * decay * bins\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin based on the sum of the bin's rest capacity divided by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power of 2 raised to the index of each bin\n powers = np.power(2, np.arange(len(bins)))\n \n # Calculate the sum of the bin's rest capacity divided by the power of 2\n scores = (bins - item) / powers\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The new algorithm will score the bins based on a combination of their rest capacities and the entropy of the distribution of rest capacities among the bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the entropy of the distribution of rest capacities\n entropy = np.sum(-rest_capacities * np.log(rest_capacities))\n \n # Calculate the scores for each bin based on its rest capacity and entropy\n scores = rest_capacities / (entropy + 1e-6)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate scores based on a ratio between rest capacity and item size, penalized by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = bins / item\n \n # Penalize bins with higher indices\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the total score for each bin\n scores = ratios - penalties\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 4 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 4 for the indices of the bins\n powers_of_4 = np.power(4, np.arange(len(bins)))\n \n # Multiply the square root rest capacities by the powers of 4\n scores = sqrt_rest_capacities * powers_of_4\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate available capacity as the minimum of the remaining capacity or the item size, then score each bin as the available capacity times a penalty factor if the bin has less than 50% spare capacity, otherwise set the score to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate available capacity for each bin\n available_capacity = np.minimum(bins, item)\n \n # Penalize bins with less than 50% spare capacity\n penalties = np.where(available_capacity < 0.5 * bins, available_capacity, 0)\n \n # Score each bin based on available capacity and penalties\n scores = available_capacity - penalties\n \n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": "Score each bin based on the ratio of the item size to the rest capacity, multiplied by the exponential of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity\n ratios = item / (bins - item)\n \n # Calculate the exponential of the bin indices\n exponents = np.exp(np.arange(len(bins)))\n \n # Multiply the ratios and exponents element-wise\n scores = ratios * exponents\n \n return scores",
"objective": 0.04326,
"other_inf": null
},
{
"algorithm": "A new algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 2 raised to the indices of the bins\n powers_of_two = 2 ** np.arange(len(bins))\n \n # Multiply the square root rest capacities by the powers of two\n scores = sqrt_rest_capacities * powers_of_two\n \n # Return the scores for the bins\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin as the natural logarithm of its rest capacity divided by the natural logarithm of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin\n scores = np.log(bins) - np.log(np.arange(len(bins)) + 1)\n \n # Normalize the scores to ensure consistency\n scores /= np.max(scores)\n \n # Return the normalized scores\n return scores",
"objective": 0.04387,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin based on the square root of the rest capacity divided by the sum of its index and number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacity divided by the sum of its index and number of used bins\n scores = np.sqrt(bins / (np.arange(len(bins)) + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin as the difference between the square root of its rest capacity and the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square roots of the rest capacities and indices\n sqrt_rest_capacities = np.sqrt(bins)\n sqrt_indices = np.arange(len(bins)) + 1\n \n # Calculate the scores for each bin\n scores = sqrt_rest_capacities - sqrt_indices\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04457,
"other_inf": null
},
{
"algorithm": "Modified algorithm scores each bin based on the product of the square root of the bin's rest capacity multiplied by the exponential of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = np.sqrt(bins) * np.exp(np.arange(len(bins)))\n \n # Normalize the scores to ensure they sum to 1\n scores /= np.sum(scores)\n \n # Return the scores for the bins\n return scores",
"objective": 0.04548,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Adjusted algorithm: Calculates bin scores as the weighted sum of the rest capacity to the power of 0.5, the proximity to the item size, and a penalty for exceeding the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted sum of the rest capacity to the power of 0.5, the proximity to the item size, and a penalty for exceeding the maximum capacity\n scores = (bins / np.sqrt(bins)) * (np.abs(item - bins) ** 0.5) + (bins > item) * (bins - item)\n \n # Penalize bins that exceed the maximum capacity\n scores[bins > item] -= (bins[bins > item] - item) ** 2\n \n return scores",
"objective": 0.04568,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_4.json
================================================
[
{
"algorithm": "`New algorithm: Calculate scores based on a ratio between item size and rest capacity, penalized by the index of the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of item size to rest capacity\n ratios = item / (bins - item)\n \n # Penalize the index of the bin\n penalties = np.arange(len(bins)) * 0.5\n \n # Combine the ratios and penalties into a single score vector\n scores = ratios + penalties\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin by multiplying the ratio of the item size to the rest capacity with a function of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin by multiplying the ratio of the item size to the rest capacity with a function of the bin's index\n scores = (item / (bins - item)) * np.arange(len(bins))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The score for each bin is calculated as the multiplication of the ratio of the item to the rest capacity, the rest capacity and the exponential decay of the index. Score(bin) = (item / rest capacity) * rest capacity * exp(-index / number of bins).",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item to the rest capacity\n ratio = item / (bins - 1)\n \n # Calculate the exponential decay of the index\n decay = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Multiply the ratio and the exponential decay to get the scores\n scores = ratio * decay * bins\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin based on the sum of the bin's rest capacity divided by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power of 2 raised to the index of each bin\n powers = np.power(2, np.arange(len(bins)))\n \n # Calculate the sum of the bin's rest capacity divided by the power of 2\n scores = (bins - item) / powers\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate scores based on a ratio between rest capacity and item size, penalized by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = bins / item\n \n # Penalize bins with higher indices\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the total score for each bin\n scores = ratios - penalties\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: penalty formula, capacity ratio calculation. New algorithm: Calculate scores by adding the item's size to the rest capacity and dividing by the maximum capacity, multiplied by the penalty of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the penalty for each bin based on its index\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the capacity ratio for each bin\n capacities = bins / (penalties * item)\n \n # Calculate the scores for each bin\n scores = capacities - penalties\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 4 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 4 for the indices of the bins\n powers_of_4 = np.power(4, np.arange(len(bins)))\n \n # Multiply the square root rest capacities by the powers of 4\n scores = sqrt_rest_capacities * powers_of_4\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate available capacity as the minimum of the remaining capacity or the item size, then score each bin as the available capacity times a penalty factor if the bin has less than 50% spare capacity, otherwise set the score to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate available capacity for each bin\n available_capacity = np.minimum(bins, item)\n \n # Penalize bins with less than 50% spare capacity\n penalties = np.where(available_capacity < 0.5 * bins, available_capacity, 0)\n \n # Score each bin based on available capacity and penalties\n scores = available_capacity - penalties\n \n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": "Score each bin based on the ratio of the item size to the rest capacity, multiplied by the exponential of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity\n ratios = item / (bins - item)\n \n # Calculate the exponential of the bin indices\n exponents = np.exp(np.arange(len(bins)))\n \n # Multiply the ratios and exponents element-wise\n scores = ratios * exponents\n \n return scores",
"objective": 0.04326,
"other_inf": null
},
{
"algorithm": "A new algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 2 raised to the indices of the bins\n powers_of_two = 2 ** np.arange(len(bins))\n \n # Multiply the square root rest capacities by the powers of two\n scores = sqrt_rest_capacities * powers_of_two\n \n # Return the scores for the bins\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin as the natural logarithm of its rest capacity divided by the natural logarithm of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic scores for each bin\n scores = np.log(bins) - np.log(np.arange(len(bins)) + 1)\n \n # Normalize the scores to ensure consistency\n scores /= np.max(scores)\n \n # Return the normalized scores\n return scores",
"objective": 0.04387,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin based on the square root of the rest capacity divided by the sum of its index and number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacity divided by the sum of its index and number of used bins\n scores = np.sqrt(bins / (np.arange(len(bins)) + 1))\n \n # Return the scores for the bins\n return scores",
"objective": 0.04407,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_5.json
================================================
[
{
"algorithm": "`New algorithm: Calculate scores based on a ratio between item size and rest capacity, penalized by the index of the bin.`",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of item size to rest capacity\n ratios = item / (bins - item)\n \n # Penalize the index of the bin\n penalties = np.arange(len(bins)) * 0.5\n \n # Combine the ratios and penalties into a single score vector\n scores = ratios + penalties\n \n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "Alternative Algorithm: Calculate scores for each bin by subtracting the bin's capacity from the item's value and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from the item's value\n scores = np.subtract(item, bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The score for each bin is calculated as the multiplication of the ratio of the item to the rest capacity, the rest capacity and the exponential decay of the index. Score(bin) = (item / rest capacity) * rest capacity * exp(-index / number of bins).",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item to the rest capacity\n ratio = item / (bins - 1)\n \n # Calculate the exponential decay of the index\n decay = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Multiply the ratio and the exponential decay to get the scores\n scores = ratio * decay * bins\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin based on the sum of the bin's rest capacity divided by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power of 2 raised to the index of each bin\n powers = np.power(2, np.arange(len(bins)))\n \n # Calculate the sum of the bin's rest capacity divided by the power of 2\n scores = (bins - item) / powers\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate scores based on a ratio between rest capacity and item size, penalized by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = bins / item\n \n # Penalize bins with higher indices\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the total score for each bin\n scores = ratios - penalties\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by calculating the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity\n scores = (bins / (np.arange(len(bins)) + 1) ** 2) * item\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: penalty formula, capacity ratio calculation. New algorithm: Calculate scores by adding the item's size to the rest capacity and dividing by the maximum capacity, multiplied by the penalty of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the penalty for each bin based on its index\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the capacity ratio for each bin\n capacities = bins / (penalties * item)\n \n # Calculate the scores for each bin\n scores = capacities - penalties\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 4 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 4 for the indices of the bins\n powers_of_4 = np.power(4, np.arange(len(bins)))\n \n # Multiply the square root rest capacities by the powers of 4\n scores = sqrt_rest_capacities * powers_of_4\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate available capacity as the minimum of the remaining capacity or the item size, then score each bin as the available capacity times a penalty factor if the bin has less than 50% spare capacity, otherwise set the score to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate available capacity for each bin\n available_capacity = np.minimum(bins, item)\n \n # Penalize bins with less than 50% spare capacity\n penalties = np.where(available_capacity < 0.5 * bins, available_capacity, 0)\n \n # Score each bin based on available capacity and penalties\n scores = available_capacity - penalties\n \n return scores",
"objective": 0.04316,
"other_inf": null
},
{
"algorithm": "Score each bin based on the ratio of the item size to the rest capacity, multiplied by the exponential of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item size to the rest capacity\n ratios = item / (bins - item)\n \n # Calculate the exponential of the bin indices\n exponents = np.exp(np.arange(len(bins)))\n \n # Multiply the ratios and exponents element-wise\n scores = ratios * exponents\n \n return scores",
"objective": 0.04326,
"other_inf": null
},
{
"algorithm": "A new algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 2 raised to the indices of the bins\n powers_of_two = 2 ** np.arange(len(bins))\n \n # Multiply the square root rest capacities by the powers of two\n scores = sqrt_rest_capacities * powers_of_two\n \n # Return the scores for the bins\n return scores",
"objective": 0.04367,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_6.json
================================================
[
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "Alternative Algorithm: Calculate scores for each bin by subtracting the bin's capacity from the item's value and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from the item's value\n scores = np.subtract(item, bins)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The score for each bin is calculated as the multiplication of the ratio of the item to the rest capacity, the rest capacity and the exponential decay of the index. Score(bin) = (item / rest capacity) * rest capacity * exp(-index / number of bins).",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item to the rest capacity\n ratio = item / (bins - 1)\n \n # Calculate the exponential decay of the index\n decay = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Multiply the ratio and the exponential decay to get the scores\n scores = ratio * decay * bins\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin based on the sum of the bin's rest capacity divided by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power of 2 raised to the index of each bin\n powers = np.power(2, np.arange(len(bins)))\n \n # Calculate the sum of the bin's rest capacity divided by the power of 2\n scores = (bins - item) / powers\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by dividing their capacity by a weight and adding their index to the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted capacity of each bin\n weights = np.array([bin_capacity / item for bin_capacity in bins])\n \n # Add the index of each bin to the weighted capacity\n scores = np.array([weight + i for i, weight in enumerate(weights)])\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate scores based on a ratio between rest capacity and item size, penalized by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = bins / item\n \n # Penalize bins with higher indices\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the total score for each bin\n scores = ratios - penalties\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by calculating the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity\n scores = (bins / (np.arange(len(bins)) + 1) ** 2) * item\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: penalty formula, capacity ratio calculation. New algorithm: Calculate scores by adding the item's size to the rest capacity and dividing by the maximum capacity, multiplied by the penalty of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the penalty for each bin based on its index\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the capacity ratio for each bin\n capacities = bins / (penalties * item)\n \n # Calculate the scores for each bin\n scores = capacities - penalties\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 4 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 4 for the indices of the bins\n powers_of_4 = np.power(4, np.arange(len(bins)))\n \n # Multiply the square root rest capacities by the powers of 4\n scores = sqrt_rest_capacities * powers_of_4\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate available capacity as the minimum of the remaining capacity or the item size, then score each bin as the available capacity times a penalty factor if the bin has less than 50% spare capacity, otherwise set the score to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate available capacity for each bin\n available_capacity = np.minimum(bins, item)\n \n # Penalize bins with less than 50% spare capacity\n penalties = np.where(available_capacity < 0.5 * bins, available_capacity, 0)\n \n # Score each bin based on available capacity and penalties\n scores = available_capacity - penalties\n \n return scores",
"objective": 0.04316,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_7.json
================================================
[
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": " New algorithm: Score bins as the inverse of the sum of rest capacity and the maximum capacity increment. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the sum of rest capacity and maximum capacity increment\n scores = 1 / (bins + item)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The score for each bin is calculated as the multiplication of the ratio of the item to the rest capacity, the rest capacity and the exponential decay of the index. Score(bin) = (item / rest capacity) * rest capacity * exp(-index / number of bins).",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item to the rest capacity\n ratio = item / (bins - 1)\n \n # Calculate the exponential decay of the index\n decay = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Multiply the ratio and the exponential decay to get the scores\n scores = ratio * decay * bins\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will take into account the difference between the bin's rest capacity and the item's value, and a penalty for using bins with a rest capacity smaller than item's value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = item - bins\n \n # Penalize bins with a rest capacity smaller than the item's value\n penalties = np.where(diff < 0, diff**2, 0)\n \n # Calculate the scores for each bin\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin based on the sum of the bin's rest capacity divided by the power of 2 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the power of 2 raised to the index of each bin\n powers = np.power(2, np.arange(len(bins)))\n \n # Calculate the sum of the bin's rest capacity divided by the power of 2\n scores = (bins - item) / powers\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by dividing their capacity by a weight and adding their index to the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted capacity of each bin\n weights = np.array([bin_capacity / item for bin_capacity in bins])\n \n # Add the index of each bin to the weighted capacity\n scores = np.array([weight + i for i, weight in enumerate(weights)])\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate scores based on a ratio between rest capacity and item size, penalized by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = bins / item\n \n # Penalize bins with higher indices\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the total score for each bin\n scores = ratios - penalties\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by calculating the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity\n scores = (bins / (np.arange(len(bins)) + 1) ** 2) * item\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: penalty formula, capacity ratio calculation. New algorithm: Calculate scores by adding the item's size to the rest capacity and dividing by the maximum capacity, multiplied by the penalty of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the penalty for each bin based on its index\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the capacity ratio for each bin\n capacities = bins / (penalties * item)\n \n # Calculate the scores for each bin\n scores = capacities - penalties\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 4 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 4 for the indices of the bins\n powers_of_4 = np.power(4, np.arange(len(bins)))\n \n # Multiply the square root rest capacities by the powers of 4\n scores = sqrt_rest_capacities * powers_of_4\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_8.json
================================================
[
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by subtracting the item's size divided by the rest capacity multiplied by bin's capacity and rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / (bins * (1 - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The score for each bin is calculated as the multiplication of the ratio of the item to the rest capacity, the rest capacity and the exponential decay of the index. Score(bin) = (item / rest capacity) * rest capacity * exp(-index / number of bins).",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item to the rest capacity\n ratio = item / (bins - 1)\n \n # Calculate the exponential decay of the index\n decay = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Multiply the ratio and the exponential decay to get the scores\n scores = ratio * decay * bins\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will take into account the difference between the bin's rest capacity and the item's value, and a penalty for using bins with a rest capacity smaller than item's value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = item - bins\n \n # Penalize bins with a rest capacity smaller than the item's value\n penalties = np.where(diff < 0, diff**2, 0)\n \n # Calculate the scores for each bin\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the sum of the rest capacity and the product of the item and the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities * (1 / np.exp(-np.arange(len(rest_capacities)) ** 2))\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by dividing their capacity by a weight and adding their index to the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the weighted capacity of each bin\n weights = np.array([bin_capacity / item for bin_capacity in bins])\n \n # Add the index of each bin to the weighted capacity\n scores = np.array([weight + i for i, weight in enumerate(weights)])\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Calculate scores based on a ratio between rest capacity and item size, penalized by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = bins / item\n \n # Penalize bins with higher indices\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the total score for each bin\n scores = ratios - penalties\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by calculating the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity\n scores = (bins / (np.arange(len(bins)) + 1) ** 2) * item\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "Main algorithm parameters: penalty formula, capacity ratio calculation. New algorithm: Calculate scores by adding the item's size to the rest capacity and dividing by the maximum capacity, multiplied by the penalty of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the penalty for each bin based on its index\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the capacity ratio for each bin\n capacities = bins / (penalties * item)\n \n # Calculate the scores for each bin\n scores = capacities - penalties\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "New algorithm scores each bin based on the sum of the square root of the bin's rest capacity multiplied by the power of 4 raised to its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the rest capacities of the bins\n sqrt_rest_capacities = np.sqrt(bins)\n \n # Calculate the powers of 4 for the indices of the bins\n powers_of_4 = np.power(4, np.arange(len(bins)))\n \n # Multiply the square root rest capacities by the powers of 4\n scores = sqrt_rest_capacities * powers_of_4\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+codellama7b/Run3/population_generation_9.json
================================================
[
{
"algorithm": "New Algorithm: Assign bin scores by subtracting the bin capacity from the item capacity and multiplying the result by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on the item size and bin capacity\n scores = (item - bins) * (np.arange(len(bins)) + 1)\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin by subtracting its square root multiplied by its index and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square root of the indices of the bins\n sqrt_indices = np.sqrt(np.arange(len(bins)))\n \n # Subtract the square root multiplied by the item size from the rest capacities\n scores = bins - (sqrt_indices * item)\n \n # Return the scores\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Score each bin by taking the ratio of its rest capacity to item size and subtracting the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratios of rest capacity to item size for each bin\n ratios = bins / item\n \n # Subtract the square root of the index from the ratios\n scores = ratios - np.sqrt(np.arange(len(ratios)))\n \n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the difference between the bin's rest capacity and the item's value, with a penalty for bins with a rest capacity smaller than a threshold.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = np.abs(item - bins)\n \n # Apply a penalty for bins with a rest capacity smaller than a threshold\n penalties = np.where(diff < 50, 10 * (50 - diff), 0)\n \n # Calculate the scores for each bin\n scores = diff + penalties\n \n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by subtracting the item's size divided by the rest capacity multiplied by bin's capacity and rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins - item) / (bins * (1 - item))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm: The score for each bin is calculated as the multiplication of the ratio of the item to the rest capacity, the rest capacity and the exponential decay of the index. Score(bin) = (item / rest capacity) * rest capacity * exp(-index / number of bins).",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of the item to the rest capacity\n ratio = item / (bins - 1)\n \n # Calculate the exponential decay of the index\n decay = np.exp(-np.arange(len(bins)) / len(bins))\n \n # Multiply the ratio and the exponential decay to get the scores\n scores = ratio * decay * bins\n \n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": " New score function: Calculating the score as the difference between the logarithm of rest capacity and the bin index, multiplied by the ratio of item size to average bin size. ",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic rest capacity of each bin\n log_rest_capacity = np.log(bins)\n \n # Calculate the ratio of item size to average bin size\n item_size_ratio = item / np.mean(bins)\n \n # Calculate the score for each bin\n scores = log_rest_capacity - item_size_ratio * (bins - item)\n \n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will take into account the difference between the bin's rest capacity and the item's value, and a penalty for using bins with a rest capacity smaller than item's value.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between the item's value and the bin's rest capacity\n diff = item - bins\n \n # Penalize bins with a rest capacity smaller than the item's value\n penalties = np.where(diff < 0, diff**2, 0)\n \n # Calculate the scores for each bin\n scores = bins - penalties\n \n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The item will be assigned to the bin with the maximum score by computing the difference between the bin's capacity and the item's size, and adding to the result the inverse of the square of the bin's index, multiplied by the cosine of the square of the rest capacity divided by the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Compute the difference between the bin's capacity and the item's size\n diff = np.abs(bins - item)\n \n # Add the inverse of the square of the bin's index to the result\n scores = diff + (np.arange(len(bins)) ** 2) / (item ** 2)\n \n # Multiply the scores by the cosine of the square of the rest capacity divided by the item's size\n scores *= np.cos((bins - item) ** 2 / item)\n \n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Calculate scores for each bin by subtracting the bin's capacity from its index and returning a Numpy array of these scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin by subtracting the bin's capacity from its index\n scores = np.subtract(np.arange(len(bins)), bins)\n \n # Return the scores for assignment\n return scores",
"objective": 0.04075,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the sum of the rest capacity and the product of the item and the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity for each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities * (1 / np.exp(-np.arange(len(rest_capacities)) ** 2))\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the rest capacity and the power of the item to the inverse exponential decay of the index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacities of the bins\n rest_capacities = bins - item\n \n # Calculate the scores for each bin\n scores = (rest_capacities ** (-np.arange(len(bins)) / len(bins))) * item\n \n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "Score bins as the logarithm of the sum of rest capacity and the inverse of minimum capacity increment.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the logarithmic score for each bin\n scores = np.log(bins + item) / np.log(bins)\n \n # Add the inverse of the minimum capacity increment to the scores\n scores += 1 / (np.min(bins) - item)\n \n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the sum of the rest capacity and an increasing linear function of the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity of each bin\n rest_capacities = bins - item\n \n # Calculate the score for each bin\n scores = rest_capacities + (np.arange(len(rest_capacities)) + 1) * item\n \n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Score bins by multiplying their index by a weight and subtracting their capacity from the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin based on its index and weight\n scores = (np.arange(len(bins)) * item) - bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assign a score to each bin by multiplying its capacity by its index, and then dividing the result by the item's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the scores for each bin\n scores = (bins * item) / bins\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Score bins by dividing the item size by the percentage of the bin's capacity that is greater than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the score for each bin based on the item size and bin capacity\n scores = (bins - item) / (bins * (1 - item / bins))\n \n # Return the scores as a NumPy array\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Calculate scores based on a ratio between rest capacity and item size, penalized by the index of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the ratio of rest capacity to item size for each bin\n ratios = bins / item\n \n # Penalize bins with higher indices\n penalties = np.arange(len(bins)) + 1\n \n # Calculate the total score for each bin\n scores = ratios - penalties\n \n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by calculating the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the bin's rest capacity divided by the product of the bin's index and the square of the item capacity\n scores = (bins / (np.arange(len(bins)) + 1) ** 2) * item\n \n # Return the scores for the bins for assignment\n return scores",
"objective": 0.04256,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_1.json
================================================
[
{
"algorithm": "The new algorithm will calculate the score of each bin based on a weighted sum of the inverse of the available capacity, the inverse of the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of each bin based on a weighted sum of the inverse of the available capacity, the inverse of the bin number, and the normalized item size.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of the available capacity.\n inv_cap = 1 / (bins - item)\n\n # Calculate the inverse of the bin number.\n inv_num = 1 / np.arange(1, len(bins) + 1)\n\n # Calculate the normalized item size.\n norm_item = item / np.max(bins)\n\n # Calculate the weighted sum of the inverse of the available capacity, the inverse of the bin number, and the normalized item size.\n scores = inv_cap * inv_num * norm_item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin based on the exponential of the sum of the bin index and the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-(bins - item))\n scores[bins <= 0] = -np.inf\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, but it penalizes the score of bins with a rest capacity less than the item size. The penalized modification is calculated as (bins - item) / (1 + np.arange(len(bins))) * (1 - min(bins / item, 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (1 + np.arange(len(bins))) * (1 - np.minimum(bins / item, 1))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: assigns an item to the bin with the best score, calculated as the sum of the inverse of the bin number and the product of the normalized capacity and the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1)\n scores = 1 / bin_nums + (bins / bins.max()) * (item / item.max())\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "The new algorithm calculate the score for each feasible bin as the product of using the bin and a weighted sum of the normalized capacity, the normalized item size, and the inverse of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the normalized capacity and item size.\n cap_norm = bins / np.max(bins)\n item_norm = item / np.max(bins)\n\n # Calculate the score as the product of using the bin, normalized capacity, normalized item size, and inverse of bin number.\n scores = cap_norm * item_norm / (np.arange(len(bins)) + 1)\n\n # Adjust scores for bins with zero capacity.\n scores[bins == 0] = -np.inf\n\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the rest capacity and the normalized size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the multiplication of the rest capacity and the normalized size of the item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the normalized size of the item.\n item_size_normalized = item / bins\n\n # Calculate the score for each bin.\n scores = item_size_normalized * bins\n\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The score for each bin will be calculated based on a weighted sum of the current capacity and the difference between the maximum capacity and the current capacity, with a penalty for bins that reach the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * (1 - (bins - item).astype(bool)) - 1e9 * (bins <= item)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the difference between the square root of its rest capacity and the square root of its index, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins - item) - np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.06711,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "Modified algorithm: The algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, but it multiplies the score by a penalty factor that is inversely proportional to the rest capacity to the power of a positive value (alpha) (1 + bins - item) * (bins - item) / (1 + np.arange(len(bins)))^alpha",
"code": "def score(item, bins):\n rest_capacity = np.array(bins) - item\n pos_rest_cap = rest_capacity[rest_capacity > 0]\n normalized_pos_rest_cap = pos_rest_cap / (1 + np.arange(len(pos_rest_cap)))\n scores = (1 + pos_rest_cap) * normalized_pos_rest_cap ** 0.5\n return scores",
"objective": 0.08804,
"other_inf": null
},
{
"algorithm": "New algorithm score function: Divide the rest capacity of each bin by the size of the current item, subtract 2 if the rest capacity equals the maximum capacity, and set the score to 0 if the rest capacity is less than 2 times the item size.",
"code": "def score(item, bins):\n scores = (bins - item) / item\n scores -= 2 * (bins == bins.max())\n scores[bins < 2 * item] = 0\n return scores",
"objective": 0.10414,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the product of its available capacity and a weight that decreases as the bin number increases.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of its available capacity and a weight that decreases as the bin number increases.\n\n Args:\n item (int): The size of the current item.\n bins (np.ndarray): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the available capacity of each bin.\n available_capacities = bins - item\n\n # Calculate the weight for each bin.\n weights = 1 / np.arange(1, len(bins) + 1)\n\n # Calculate the score for each bin.\n scores = available_capacities * weights\n\n return scores",
"objective": 0.10746,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_10.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a bonus for bins that reach half of the maximum capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a bonus for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the score for each bin as the inverse of the difference.\n scores = 1 / diff\n\n # Add a bonus for bins that reach half of the maximum capacity.\n max_capacity = np.max(bins)\n half_max_capacity = max_capacity / 2\n bonus = np.where(bins >= half_max_capacity, 1, 0)\n scores += bonus\n\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "The score for a bin is computed as the product of the inverse of the square root of the rest capacity and the inverse of the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for a bin.\n\n The score is computed as the product of the inverse of the square root of the\n rest capacity and the inverse of the square root of the bin number.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n The scores for the bins.\n \"\"\"\n\n rest_capacities = np.maximum(bins - item, 0)\n bin_numbers = np.arange(len(bins)) + 1\n scores = rest_capacities / np.sqrt(rest_capacities) * 1 / np.sqrt(bin_numbers)\n return scores",
"objective": 0.02495,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities at most three times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n # Penalize bins with remaining capacity less than half of the item size\n scores[bins - item <= 0.5 * item] -= 0.5\n # Mask out invalid bins (remaining capacity less than the item size)\n scores[bins - item < 0] = -np.inf\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have smaller differences between their capacity and the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)\n scores[bins - item <= 0] = -np.inf\n return scores",
"objective": 0.02747,
"other_inf": null
},
{
"algorithm": "The proposed algorithm computes a score for each bin based on the reciprocal of the difference between the bin capacity and the item size, and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.1 * (bins - item < 0.5 * item)\n \n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 5 times the item size, penalized if the remaining capacity is less than one third of the item size: scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= 1.0 / 3 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Scores a set of bins to assign an item. In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used. The final goal is to minimize the number of\n used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the score for each bin.\n scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= 1.0 / 3 * item)\n\n # Handle the case where all bins have the same capacity.\n if np.all(scores == scores[0]):\n scores = np.ones(len(scores))\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 1.5 times the item size, penalized if the remaining capacity is less than 1/4 of the item size: scores = 1.0 / (bins - item) * (bins <= 1.5 * item) - 0.25 * (bins - item <= 0.25 * item)",
"code": "import numpy as np\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score. \n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are \n larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n # Prioritize bins that have capacities 1.5 times the item size, penalized\n # if the remaining capacity is less than 1/4 of the item size.\n scores = 1.0 / (bins - item) * (bins <= 1.5 * item) - 0.25 * (bins - item <= 0.25 * item)\n if np.max(scores) >= 0 and scores.size > 0:\n # Normalize scores to [0, 1].\n scores = scores / np.max(scores)\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its remaining percentage capacity, with the weights determined by the square of the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Compute the score for each bin to assign an item.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n if len(bins) == 0:\n return np.array([0])\n\n max_capacity = np.max(bins)\n if max_capacity == item:\n return np.zeros_like(bins)\n\n weights = np.square(bins - max_capacity)\n rest_capacity = bins - item\n remaining_percentage_capacity = rest_capacity / max_capacity\n scores = weights * rest_capacity + 1 / remaining_percentage_capacity\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities within 30% of the item size, penalized if the remaining capacity is less than 10% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.3 * item) - 0.1 * (bins - item <= 0.1 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (np.abs(bins - item) <= 0.3 * item) - 0.1 * (bins - item <= 0.1 * item)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities within 15% of the item size, penalized if the remaining capacity is less than 5% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.15 * item) - 0.05 * (bins - item <= 0.05 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Prioritize bins that have capacities within 15% of the item size, penalized if the remaining capacity is less than 5% of the item size.\n \n Args:\n item: Size of the current item to be assigned. (int)\n bins: Rest capacities of feasible bins, which are larger than the item size. (np.ndarray)\n \n Returns:\n Scores for the bins for assignment. (np.ndarray)\n \"\"\"\n\n # Penalize bins with less than 5% remaining capacity\n penalty = np.where(bins - item <= 0.05 * item, -0.05, 0.0)\n\n # Calculate scores\n scores = 1.0 / (bins - item) * np.where(np.abs(bins - item) <= 0.15 * item, 1.0, 0.0) + penalty\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "Prioritize bins that are at most n times the size of the item and penalize bins with less than k times the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Prioritize bins that are at most n times the size of the item\n n = 2\n scores = np.where(bins <= n * item, bins / item, 0)\n\n # Penalize bins with less than k times the remaining capacity\n k = 0.5\n remaining_capacity = bins - item\n scores = np.where(remaining_capacity >= k * bins, scores, scores / remaining_capacity)\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities within 20% of the item size, penalized if the remaining capacity is less than 10% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.2 * item) - 0.1 * (bins - item <= 0.1 * item)",
"code": "def score(item: int, bins: np.array) -> np.array:\n \"\"\"Prioritize bins that have capacities within 20% of the item size, penalized if the remaining capacity is less than 10% of the item size:\n scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.2 * item) - 0.1 * (bins - item <= 0.1 * item)\n \"\"\"\n assert np.all(bins >= item), \"Bins must have sufficient capacity to accommodate the item\"\n scores = 1.0 / (bins - item) * (np.abs(bins - item) <= 0.2 * item) - 0.1 * (bins - item <= 0.1 * item)\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "**Combine the idea of using the inverse of the difference between the bin capacity and the item size with the idea of prioritizing bins that have capacities within 20% of the item size.**",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the difference between the bin capacity and the item size\n inv_diffs = 1 / np.maximum(bins - item, 1)\n \n # Calculate the priority factor for bins within 20% of the item size\n priorities = np.where(np.abs(bins - item) <= (item * 0.2), 1, 0)\n \n # Combine the inverse differences and priorities\n scores = inv_diffs * priorities\n \n # Normalize the scores to avoid overflow\n scores = scores / np.max(scores)\n \n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm assigning an item to the bin with the maximum score, computed as the sum of the inverse of the remaining capacity, the square of the inverse of the bin number, and a constant \"k\". Scores are multiplied by k if the bin's remaining capacity is less than the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Compute the score for each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the inverse of the remaining capacity.\n inv_cap = 1.0 / bins\n\n # Compute the square of the inverse of the bin number.\n inv_bin_num_sq = 1.0 / np.arange(1, len(bins) + 1) ** 2\n\n # Compute the score for each bin.\n scores = inv_cap + inv_bin_num_sq + np.log(bins/(bins-item))\n\n # Multiply the score by a constant if the bin's remaining capacity is less than the item's size.\n scores[bins < item] *= 100\n\n return scores",
"objective": 0.03874,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_11.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a bonus for bins that reach half of the maximum capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a bonus for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the score for each bin as the inverse of the difference.\n scores = 1 / diff\n\n # Add a bonus for bins that reach half of the maximum capacity.\n max_capacity = np.max(bins)\n half_max_capacity = max_capacity / 2\n bonus = np.where(bins >= half_max_capacity, 1, 0)\n scores += bonus\n\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "The score for a bin is computed as the product of the inverse of the square root of the rest capacity and the inverse of the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for a bin.\n\n The score is computed as the product of the inverse of the square root of the\n rest capacity and the inverse of the square root of the bin number.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n The scores for the bins.\n \"\"\"\n\n rest_capacities = np.maximum(bins - item, 0)\n bin_numbers = np.arange(len(bins)) + 1\n scores = rest_capacities / np.sqrt(rest_capacities) * 1 / np.sqrt(bin_numbers)\n return scores",
"objective": 0.02495,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities at most three times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n # Penalize bins with remaining capacity less than half of the item size\n scores[bins - item <= 0.5 * item] -= 0.5\n # Mask out invalid bins (remaining capacity less than the item size)\n scores[bins - item < 0] = -np.inf\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have smaller differences between their capacity and the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)\n scores[bins - item <= 0] = -np.inf\n return scores",
"objective": 0.02747,
"other_inf": null
},
{
"algorithm": "The proposed algorithm computes a score for each bin based on the reciprocal of the difference between the bin capacity and the item size, and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.1 * (bins - item < 0.5 * item)\n \n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 1.5 times the item size, penalized if the remaining capacity is less than a third of the item size: scores = 1.0 / (bins - item) * (bins <= 1.5 * item) - 0.3 * (bins - item <= 0.33 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins for assigning an item.\n\n Args:\n item: Size of the item to be assigned.\n bins: Remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n \n scores = 1.0 / (bins - item)\n scores *= bins <= 1.5 * item\n scores -= 0.3 * (bins - item <= 0.33 * item)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 5 times the item size, penalized if the remaining capacity is less than one third of the item size: scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= 1.0 / 3 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Scores a set of bins to assign an item. In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used. The final goal is to minimize the number of\n used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the score for each bin.\n scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= 1.0 / 3 * item)\n\n # Handle the case where all bins have the same capacity.\n if np.all(scores == scores[0]):\n scores = np.ones(len(scores))\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities within 30% of the item size, penalized if the remaining capacity is less than 20% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.3 * item) - 0.2 * (bins - item <= 0.2 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (np.abs(bins - item) <= 0.3 * item) - 0.2 * (bins - item <= 0.2 * item)\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 1.5 times the item size, penalized if the remaining capacity is less than 1/4 of the item size: scores = 1.0 / (bins - item) * (bins <= 1.5 * item) - 0.25 * (bins - item <= 0.25 * item)",
"code": "import numpy as np\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score. \n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are \n larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n # Prioritize bins that have capacities 1.5 times the item size, penalized\n # if the remaining capacity is less than 1/4 of the item size.\n scores = 1.0 / (bins - item) * (bins <= 1.5 * item) - 0.25 * (bins - item <= 0.25 * item)\n if np.max(scores) >= 0 and scores.size > 0:\n # Normalize scores to [0, 1].\n scores = scores / np.max(scores)\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its remaining percentage capacity, with the weights determined by the square of the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Compute the score for each bin to assign an item.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n if len(bins) == 0:\n return np.array([0])\n\n max_capacity = np.max(bins)\n if max_capacity == item:\n return np.zeros_like(bins)\n\n weights = np.square(bins - max_capacity)\n rest_capacity = bins - item\n remaining_percentage_capacity = rest_capacity / max_capacity\n scores = weights * rest_capacity + 1 / remaining_percentage_capacity\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities within 30% of the item size, penalized if the remaining capacity is less than 10% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.3 * item) - 0.1 * (bins - item <= 0.1 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (np.abs(bins - item) <= 0.3 * item) - 0.1 * (bins - item <= 0.1 * item)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities within 15% of the item size, penalized if the remaining capacity is less than 5% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.15 * item) - 0.05 * (bins - item <= 0.05 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Prioritize bins that have capacities within 15% of the item size, penalized if the remaining capacity is less than 5% of the item size.\n \n Args:\n item: Size of the current item to be assigned. (int)\n bins: Rest capacities of feasible bins, which are larger than the item size. (np.ndarray)\n \n Returns:\n Scores for the bins for assignment. (np.ndarray)\n \"\"\"\n\n # Penalize bins with less than 5% remaining capacity\n penalty = np.where(bins - item <= 0.05 * item, -0.05, 0.0)\n\n # Calculate scores\n scores = 1.0 / (bins - item) * np.where(np.abs(bins - item) <= 0.15 * item, 1.0, 0.0) + penalty\n\n return scores",
"objective": 0.03813,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_12.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a bonus for bins that reach half of the maximum capacity. ",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a bonus for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the score for each bin as the inverse of the difference.\n scores = 1 / diff\n\n # Add a bonus for bins that reach half of the maximum capacity.\n max_capacity = np.max(bins)\n half_max_capacity = max_capacity / 2\n bonus = np.where(bins >= half_max_capacity, 1, 0)\n scores += bonus\n\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "The score for a bin is computed as the product of the inverse of the square root of the rest capacity and the inverse of the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for a bin.\n\n The score is computed as the product of the inverse of the square root of the\n rest capacity and the inverse of the square root of the bin number.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n The scores for the bins.\n \"\"\"\n\n rest_capacities = np.maximum(bins - item, 0)\n bin_numbers = np.arange(len(bins)) + 1\n scores = rest_capacities / np.sqrt(rest_capacities) * 1 / np.sqrt(bin_numbers)\n return scores",
"objective": 0.02495,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities at most three times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n # Penalize bins with remaining capacity less than half of the item size\n scores[bins - item <= 0.5 * item] -= 0.5\n # Mask out invalid bins (remaining capacity less than the item size)\n scores[bins - item < 0] = -np.inf\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.02596,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have smaller differences between their capacity and the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)\n scores[bins - item <= 0] = -np.inf\n return scores",
"objective": 0.02747,
"other_inf": null
},
{
"algorithm": "The proposed algorithm computes a score for each bin based on the reciprocal of the difference between the bin capacity and the item size, and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.1 * (bins - item < 0.5 * item)\n \n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 1.5 times the item size, penalized if the remaining capacity is less than a third of the item size: scores = 1.0 / (bins - item) * (bins <= 1.5 * item) - 0.3 * (bins - item <= 0.33 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins for assigning an item.\n\n Args:\n item: Size of the item to be assigned.\n bins: Remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n \n scores = 1.0 / (bins - item)\n scores *= bins <= 1.5 * item\n scores -= 0.3 * (bins - item <= 0.33 * item)\n return scores",
"objective": 0.0329,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 5 times the item size, penalized if the remaining capacity is less than one third of the item size: scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= 1.0 / 3 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Scores a set of bins to assign an item. In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used. The final goal is to minimize the number of\n used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the score for each bin.\n scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= 1.0 / 3 * item)\n\n # Handle the case where all bins have the same capacity.\n if np.all(scores == scores[0]):\n scores = np.ones(len(scores))\n\n return scores",
"objective": 0.03461,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities within 30% of the item size, penalized if the remaining capacity is less than 20% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.3 * item) - 0.2 * (bins - item <= 0.2 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (np.abs(bins - item) <= 0.3 * item) - 0.2 * (bins - item <= 0.2 * item)\n return scores",
"objective": 0.03693,
"other_inf": null
},
{
"algorithm": "The common backbone is prioritizing bins based on their remaining capacity relative to the item size, with penalties for bins with smaller remaining capacity. New algorithm: Prioritize bins that have capacities 1.5 times the item size, penalized if the remaining capacity is less than one quarter of the item size: scores = 1.0 / (bins - item) * (bins <= 1.5 * item) - 0.25 * (bins - item <= 0.25 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 1.5 * item) - 0.25 * (bins - item <= 0.25 * item)\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its remaining percentage capacity, with the weights determined by the square of the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Compute the score for each bin to assign an item.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n if len(bins) == 0:\n return np.array([0])\n\n max_capacity = np.max(bins)\n if max_capacity == item:\n return np.zeros_like(bins)\n\n weights = np.square(bins - max_capacity)\n rest_capacity = bins - item\n remaining_percentage_capacity = rest_capacity / max_capacity\n scores = weights * rest_capacity + 1 / remaining_percentage_capacity\n return scores",
"objective": 0.03793,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_13.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Score bins by dividing the square root of the item size by the difference between the bin size and the item size and penalize if the remaining capacity is less than one half of the item size and bonus if the remaining capacity is larger than three times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n '''\n Score bins by dividing the square root of the item size by the difference between the bin size and the item size and penalize if the remaining capacity is less than one half of the item size and bonus if the remaining capacity is larger than three times the item size.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n '''\n\n scores = np.sqrt(item) / (bins - item)\n scores[bins - item < item / 2] -= 1\n scores[bins - item > item * 3] += 1\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "Algorithm: Score bins based on the sum of the square of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item)**2 + 1.0 / item - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins based on the sum of the square of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n scores = 1.0 / (bins - item)**2 + 1.0 / item - 0.2 * (bins - item < 0.5 * item)\n\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 4 times the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)\n return scores",
"objective": 0.02032,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities twice the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)\n scores = np.where(bins < item, -np.inf, scores) # Penalize bins that are too small\n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by dividing the square root of the item size by the difference between the bin size and the item size and penalize if the remaining capacity is less than one fourth of the item size and bonus if the remaining capacity is larger than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item) / (bins - item)\n scores[bins - item < item / 4] -= 1\n scores[bins - item > item * 2] += 1\n return scores",
"objective": 0.02314,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins that have capacities twice the item size and penalize if the remaining capacity is less than one half of the item size and bonus if the remaining capacity is larger than five times the item size: \nscores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 1.0 / 2 * item) + 0.5 * (bins - item >= 5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Score bins that have capacities twice the item size and penalize if the remaining capacity is less than one half of the item size and bonus if the remaining capacity is larger than five times the item size: \n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 1.0 / 2 * item) + 0.5 * (bins - item >= 5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item) + 0.5 * (bins - item >= 5 * item)\n return scores",
"objective": 0.02374,
"other_inf": null
},
{
"algorithm": "The score for a bin is computed as the product of the inverse of the square root of the rest capacity and the inverse of the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for a bin.\n\n The score is computed as the product of the inverse of the square root of the\n rest capacity and the inverse of the square root of the bin number.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n The scores for the bins.\n \"\"\"\n\n rest_capacities = np.maximum(bins - item, 0)\n bin_numbers = np.arange(len(bins)) + 1\n scores = rest_capacities / np.sqrt(rest_capacities) * 1 / np.sqrt(bin_numbers)\n return scores",
"objective": 0.02495,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities at most three times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n # Penalize bins with remaining capacity less than half of the item size\n scores[bins - item <= 0.5 * item] -= 0.5\n # Mask out invalid bins (remaining capacity less than the item size)\n scores[bins - item < 0] = -np.inf\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with an item size larger than half of the remaining capacity: scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (item > 0.5 * bins)",
"code": "import numpy as np\n\ndef score(item, bins):\n bins = bins[bins >= item]\n scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (item > 0.5 * bins)\n return scores",
"objective": 0.02586,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.02596,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_14.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "Algorithm: Score bins based on the sum of the square of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item)**2 + 1.0 / item - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins based on the sum of the square of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n scores = 1.0 / (bins - item)**2 + 1.0 / item - 0.2 * (bins - item < 0.5 * item)\n\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 4 times the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)\n return scores",
"objective": 0.02032,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities twice the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)\n scores = np.where(bins < item, -np.inf, scores) # Penalize bins that are too small\n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by dividing the square root of the item size by the difference between the bin size and the item size and penalize if the remaining capacity is less than one fourth of the item size and bonus if the remaining capacity is larger than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item) / (bins - item)\n scores[bins - item < item / 4] -= 1\n scores[bins - item > item * 2] += 1\n return scores",
"objective": 0.02314,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins that have capacities twice the item size and penalize if the remaining capacity is less than one half of the item size and bonus if the remaining capacity is larger than five times the item size: \nscores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 1.0 / 2 * item) + 0.5 * (bins - item >= 5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Score bins that have capacities twice the item size and penalize if the remaining capacity is less than one half of the item size and bonus if the remaining capacity is larger than five times the item size: \n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 1.0 / 2 * item) + 0.5 * (bins - item >= 5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item) + 0.5 * (bins - item >= 5 * item)\n return scores",
"objective": 0.02374,
"other_inf": null
},
{
"algorithm": "The score for a bin is computed as the product of the inverse of the square root of the rest capacity and the inverse of the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for a bin.\n\n The score is computed as the product of the inverse of the square root of the\n rest capacity and the inverse of the square root of the bin number.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n The scores for the bins.\n \"\"\"\n\n rest_capacities = np.maximum(bins - item, 0)\n bin_numbers = np.arange(len(bins)) + 1\n scores = rest_capacities / np.sqrt(rest_capacities) * 1 / np.sqrt(bin_numbers)\n return scores",
"objective": 0.02495,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities at most three times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n # Penalize bins with remaining capacity less than half of the item size\n scores[bins - item <= 0.5 * item] -= 0.5\n # Mask out invalid bins (remaining capacity less than the item size)\n scores[bins - item < 0] = -np.inf\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with an item size larger than half of the remaining capacity: scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (item > 0.5 * bins)",
"code": "import numpy as np\n\ndef score(item, bins):\n bins = bins[bins >= item]\n scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (item > 0.5 * bins)\n return scores",
"objective": 0.02586,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_15.json
================================================
[
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "Algorithm: Score bins based on the sum of the square of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item)**2 + 1.0 / item - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins based on the sum of the square of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n scores = 1.0 / (bins - item)**2 + 1.0 / item - 0.2 * (bins - item < 0.5 * item)\n\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 4 times the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)\n return scores",
"objective": 0.02032,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities twice the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)\n scores = np.where(bins < item, -np.inf, scores) # Penalize bins that are too small\n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 5 times the item size, with a minimum score of 0.3 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Prioritize bins that have capacities 5 times the item size, with a minimum score of 0.3 if the remaining capacity is less than the item size:\n scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= item)\n return scores",
"objective": 0.02254,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by dividing the square root of the item size by the difference between the bin size and the item size and penalize if the remaining capacity is less than one fourth of the item size and bonus if the remaining capacity is larger than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item) / (bins - item)\n scores[bins - item < item / 4] -= 1\n scores[bins - item > item * 2] += 1\n return scores",
"objective": 0.02314,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins that have capacities twice the item size and penalize if the remaining capacity is less than one half of the item size and bonus if the remaining capacity is larger than five times the item size: \nscores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 1.0 / 2 * item) + 0.5 * (bins - item >= 5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Score bins that have capacities twice the item size and penalize if the remaining capacity is less than one half of the item size and bonus if the remaining capacity is larger than five times the item size: \n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 1.0 / 2 * item) + 0.5 * (bins - item >= 5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item) + 0.5 * (bins - item >= 5 * item)\n return scores",
"objective": 0.02374,
"other_inf": null
},
{
"algorithm": "The score for a bin is computed as the product of the inverse of the square root of the rest capacity and the inverse of the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for a bin.\n\n The score is computed as the product of the inverse of the square root of the\n rest capacity and the inverse of the square root of the bin number.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n The scores for the bins.\n \"\"\"\n\n rest_capacities = np.maximum(bins - item, 0)\n bin_numbers = np.arange(len(bins)) + 1\n scores = rest_capacities / np.sqrt(rest_capacities) * 1 / np.sqrt(bin_numbers)\n return scores",
"objective": 0.02495,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_16.json
================================================
[
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "{New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the square of the inverse of the remaining capacity and the square of the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculate the score of each bin for assigning an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize the capacity to be full, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.35 * (bins - item > 0) + 0.45 * (bins - item > (item / 2))\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 4 times the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)\n return scores",
"objective": 0.02032,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities twice the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)\n scores = np.where(bins < item, -np.inf, scores) # Penalize bins that are too small\n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 5 times the item size, with a minimum score of 0.3 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Prioritize bins that have capacities 5 times the item size, with a minimum score of 0.3 if the remaining capacity is less than the item size:\n scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 5 * item) - 0.3 * (bins - item <= item)\n return scores",
"objective": 0.02254,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by dividing the square root of the item size by the difference between the bin size and the item size and penalize if the remaining capacity is less than one fourth of the item size and bonus if the remaining capacity is larger than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item) / (bins - item)\n scores[bins - item < item / 4] -= 1\n scores[bins - item > item * 2] += 1\n return scores",
"objective": 0.02314,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_17.json
================================================
[
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities equal to the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins == item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Prioritize bins that have capacities equal to the item size.\n scores = 1.0 / (bins - item) * (bins == item)\n\n # Penalize bins that have less remaining capacity than the item size.\n scores -= 0.5 * (bins - item <= item)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "{New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the square of the inverse of the remaining capacity and the square of the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculate the score of each bin for assigning an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize the capacity to be full, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.35 * (bins - item > 0) + 0.45 * (bins - item > (item / 2))\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 4 times the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)\n return scores",
"objective": 0.02032,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities twice the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)\n scores = np.where(bins < item, -np.inf, scores) # Penalize bins that are too small\n return scores",
"objective": 0.02073,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size, and have a sigmoid penalty for bins with capacity smaller than the item size: scores = ((1 + np.exp(-(bins - item) / 5)) + np.exp(-(bins - item) / 2) - 1) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))",
"code": "def score(item, bins):\n scores = ((1 + np.exp(-(bins - item) / 5)) + np.exp(-(bins - item) / 2) - 1) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))\n return scores",
"objective": 0.02173,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_18.json
================================================
[
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities equal to the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins == item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Prioritize bins that have capacities equal to the item size.\n scores = 1.0 / (bins - item) * (bins == item)\n\n # Penalize bins that have less remaining capacity than the item size.\n scores -= 0.5 * (bins - item <= item)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have zero remaining capacity after placing the item, penalized if the bin capacity is less than 2 times the item size: Score = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between a given factor a and b times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (item <= bins) - 0.4 * (bins - item <= 0.5 * item)\n scores[bins < item] = -1e10\n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "{New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the square of the inverse of the remaining capacity and the square of the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculate the score of each bin for assigning an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize the capacity to be full, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.35 * (bins - item > 0) + 0.45 * (bins - item > (item / 2))\n return scores",
"objective": 0.01992,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 4 times the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 4 * item) - 0.5 * (bins - item <= item)\n return scores",
"objective": 0.02032,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities twice the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.5 * (bins - item <= 0.5 * item)\n scores = np.where(bins < item, -np.inf, scores) # Penalize bins that are too small\n return scores",
"objective": 0.02073,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_19.json
================================================
[
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity but also with a higher weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.maximum(bins - item, 1e-9) # Inverse difference between capacity and item size\n penalty = (bins < 0.5 * np.max(bins)) & (bins > 0) # Penalty for bins with less than half capacity\n weight = np.log10(np.maximum(bins - item, 1e-9))\n scores[penalty] -= weight[penalty]\n return scores",
"objective": 0.01378,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities equal to the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins == item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Prioritize bins that have capacities equal to the item size.\n scores = 1.0 / (bins - item) * (bins == item)\n\n # Penalize bins that have less remaining capacity than the item size.\n scores -= 0.5 * (bins - item <= item)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have zero remaining capacity after placing the item, penalized if the bin capacity is less than 2 times the item size: Score = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between a given factor a and b times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (item <= bins) - 0.4 * (bins - item <= 0.5 * item)\n scores[bins < item] = -1e10\n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "{New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the square of the inverse of the remaining capacity and the square of the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculate the score of each bin for assigning an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize the capacity to be full, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.35 * (bins - item > 0) + 0.45 * (bins - item > (item / 2))\n return scores",
"objective": 0.01992,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_2.json
================================================
[
{
"algorithm": "The score is computed as the exponential of the sum of the bin's index and the difference between the bin capacity and the item size multiplied by the difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin, given an item and a list of bins.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diffs = bins - item\n\n # Calculate the difference between the bin's index and the number of bins.\n idx_diffs = np.arange(len(bins)) - len(bins)\n\n # Compute the exponential of the sum of the bin's index and the difference between the bin capacity and the item size.\n scores = np.exp(idx_diffs * diffs)\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score of each bin based on a weighted sum of the inverse of the available capacity, the inverse of the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of each bin based on a weighted sum of the inverse of the available capacity, the inverse of the bin number, and the normalized item size.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of the available capacity.\n inv_cap = 1 / (bins - item)\n\n # Calculate the inverse of the bin number.\n inv_num = 1 / np.arange(1, len(bins) + 1)\n\n # Calculate the normalized item size.\n norm_item = item / np.max(bins)\n\n # Calculate the weighted sum of the inverse of the available capacity, the inverse of the bin number, and the normalized item size.\n scores = inv_cap * inv_num * norm_item\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights for the rest capacity and the inverse of the index.\n weights = np.where(diff >= 0, 1 / diff, 0)\n\n # Compute the score for each bin.\n scores = weights * bins + (1 - weights) / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin based on the exponential of the sum of the bin index and the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-(bins - item))\n scores[bins <= 0] = -np.inf\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "A variant form of the provided algorithm, where the score is computed as the sum of the inverse of the bin number and the inverse of the bin's remaining capacity.",
"code": "def score(item, bins):\n scores = 1 / np.arange(1, bins.size + 1) + 1 / (bins - item)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the bin's index with the exponential of the rest capacity, then add the item size to the result.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the multiplication of the bin's index with the exponential of the rest capacity, then add the item size to the result.\n\n Args:\n item: the size of current item\n bins: the rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n scores: the scores for the bins for assignment\n \"\"\"\n scores = bins * np.exp(-bins) + item\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, but it penalizes the score of bins with a rest capacity less than the item size. The penalized modification is calculated as (bins - item) / (1 + np.arange(len(bins))) * (1 - min(bins / item, 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (1 + np.arange(len(bins))) * (1 - np.minimum(bins / item, 1))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "{New Algorithm: Adjust the score function by weight the score based on rest capacity of bins. The score is calculated as scores = (bins + weight) / np.maximum((bins - item), 1)}",
"code": "def score(item, bins):\n scores = (bins + (1 + bins - item) / 2) / np.maximum((bins - item), 1)\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score of a bin based on the rest capacity divided by the bin index, with a penalty added for bins with a rest capacity less than twice the item size.",
"code": "def score(item, bins):\n scores = 1.0 * bins / np.arange(1, len(bins) + 1)\n # Penalize for nearly full bins\n nearly_full_bins = (bins <= 2 * item)\n full_penalty = 0.001\n scores[nearly_full_bins] -= full_penalty\n return scores",
"objective": 0.04347,
"other_inf": null
},
{
"algorithm": "New algorithm: assigns an item to the bin with the best score, calculated as the sum of the inverse of the bin number and the product of the normalized capacity and the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1)\n scores = 1 / bin_nums + (bins / bins.max()) * (item / item.max())\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score of each bin based on the product of the normalized available capacity and the inverse of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n if bins.min() < item:\n return np.zeros_like(bins)\n \n normalized_available_capacity = bins / bins.max()\n inverse_bin_number = 1.0 / np.arange(1, bins.size + 1)\n scores = normalized_available_capacity * inverse_bin_number\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the multiplication of the rest capacity and the normalized size of the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the multiplication of the rest capacity and the normalized size of the item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the normalized size of the item.\n item_size_normalized = item / bins\n\n # Calculate the score for each bin.\n scores = item_size_normalized * bins\n\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item)\n scores[bins <= item] = -np.inf\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "The score for each bin will be calculated based on a weighted sum of the current capacity and the difference between the maximum capacity and the current capacity, with a penalty for bins that reach the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * (1 - (bins - item).astype(bool)) - 1e9 * (bins <= item)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins by the product of the available capacity and its reciprocal, and set the score to -1 if the bin is full.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (1 / bins)\n scores[bins == 0] = -1\n return scores",
"objective": 0.05695,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the difference between the square root of its rest capacity and the square root of its index, and returns the scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins - item) - np.sqrt(np.arange(len(bins)))\n return scores",
"objective": 0.06711,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_20.json
================================================
[
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity but also with a higher weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.maximum(bins - item, 1e-9) # Inverse difference between capacity and item size\n penalty = (bins < 0.5 * np.max(bins)) & (bins > 0) # Penalty for bins with less than half capacity\n weight = np.log10(np.maximum(bins - item, 1e-9))\n scores[penalty] -= weight[penalty]\n return scores",
"objective": 0.01378,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities equal to the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins == item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Prioritize bins that have capacities equal to the item size.\n scores = 1.0 / (bins - item) * (bins == item)\n\n # Penalize bins that have less remaining capacity than the item size.\n scores -= 0.5 * (bins - item <= item)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the difference between the remaining capacity and the item size (with a higher penalty for bins with a smaller remaining capacity): scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have zero remaining capacity after placing the item, penalized if the bin capacity is less than 2 times the item size: Score = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between a given factor a and b times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (item <= bins) - 0.4 * (bins - item <= 0.5 * item)\n scores[bins < item] = -1e10\n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "{New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New Algorithm: Prioritize bins that have capacities between 2.5 and 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (2.5 * item <= bins <= 3 * item) - 0.5 * (bins - item <= 0.5 * item) ",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * ((2.5 * item <= bins) & (bins <= 3 * item)) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01871,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the square of the inverse of the remaining capacity and the square of the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculate the score of each bin for assigning an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n scores = 1.0 / (bins - item)**2 + 1.0 / item**2 - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.01922,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_21.json
================================================
[
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Modified algorithm with a focus on penalizing bins with remaining capacities under a certain threshold: score = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritize bins with capacities between a given factor a and b times the item size, and penalize bins if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.8 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score a set of bins to assign an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n a = 0.7\n b = 1.3\n scores = 1.0 / (bins - item) * (a * item <= bins) * (bins <= b * item) - 0.8 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity but also with a higher weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.maximum(bins - item, 1e-9) # Inverse difference between capacity and item size\n penalty = (bins < 0.5 * np.max(bins)) & (bins > 0) # Penalty for bins with less than half capacity\n weight = np.log10(np.maximum(bins - item, 1e-9))\n scores[penalty] -= weight[penalty]\n return scores",
"objective": 0.01378,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities equal to the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins == item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Prioritize bins that have capacities equal to the item size.\n scores = 1.0 / (bins - item) * (bins == item)\n\n # Penalize bins that have less remaining capacity than the item size.\n scores -= 0.5 * (bins - item <= item)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the difference between the remaining capacity and the item size (with a higher penalty for bins with a smaller remaining capacity): scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have zero remaining capacity after placing the item, penalized if the bin capacity is less than 2 times the item size: Score = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between a given factor a and b times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (item <= bins) - 0.4 * (bins - item <= 0.5 * item)\n scores[bins < item] = -1e10\n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "{New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Computes a score for each bin based on the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the difference.\n reciprocal = 1.0 / diff\n\n # Calculate the penalty for bins with smaller remaining capacity.\n penalty = np.where(diff <= 0.5 * bins, 1.0, 0.0)\n\n # Calculate the score for each bin.\n scores = reciprocal - penalty\n\n return scores",
"objective": 0.01861,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_22.json
================================================
[
{
"algorithm": "New algorithm: Prioritize bins that have capacities at least 3 times the item size, with a minimum score of 0.5 if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins >= 3 * item) - 0.5 * (bins - item <= item/2)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins >= 3 * item) - 0.5 * (bins - item <= item/2)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Modified algorithm with a focus on penalizing bins with remaining capacities under a certain threshold: score = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritize bins with capacities between a given factor a and b times the item size, and penalize bins if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.8 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score a set of bins to assign an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n a = 0.7\n b = 1.3\n scores = 1.0 / (bins - item) * (a * item <= bins) * (bins <= b * item) - 0.8 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity but also with a higher weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.maximum(bins - item, 1e-9) # Inverse difference between capacity and item size\n penalty = (bins < 0.5 * np.max(bins)) & (bins > 0) # Penalty for bins with less than half capacity\n weight = np.log10(np.maximum(bins - item, 1e-9))\n scores[penalty] -= weight[penalty]\n return scores",
"objective": 0.01378,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities equal to the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins == item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Prioritize bins that have capacities equal to the item size.\n scores = 1.0 / (bins - item) * (bins == item)\n\n # Penalize bins that have less remaining capacity than the item size.\n scores -= 0.5 * (bins - item <= item)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the difference between the remaining capacity and the item size (with a higher penalty for bins with a smaller remaining capacity): scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have zero remaining capacity after placing the item, penalized if the bin capacity is less than 2 times the item size: Score = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between a given factor a and b times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (item <= bins) - 0.4 * (bins - item <= 0.5 * item)\n scores[bins < item] = -1e10\n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
},
{
"algorithm": "{New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item > 0) + 0.35 * (bins - item > (item / 2))\n return scores",
"objective": 0.01821,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_23.json
================================================
[
{
"algorithm": "New algorithm: Prioritize bins that have capacities at least 3 times the item size, with a minimum score of 0.5 if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins >= 3 * item) - 0.5 * (bins - item <= item/2)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins >= 3 * item) - 0.5 * (bins - item <= item/2)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Modified algorithm with a focus on penalizing bins with remaining capacities under a certain threshold: score = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": " New algorithm: Prioritize bins that have capacities less than 1.5 times the item size, penalized if the remaining capacity is less than 0.5 times the item size: scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item < 0.5 * item) ",
"code": "def score(item, bins):\n item = float(item)\n bins = bins[bins >= item].copy() # Remove bins that cannot accommodate the item\n scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.01077,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritize bins with capacities between a given factor a and b times the item size, and penalize bins if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.8 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score a set of bins to assign an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n a = 0.7\n b = 1.3\n scores = 1.0 / (bins - item) * (a * item <= bins) * (bins <= b * item) - 0.8 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity but also with a higher weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.maximum(bins - item, 1e-9) # Inverse difference between capacity and item size\n penalty = (bins < 0.5 * np.max(bins)) & (bins > 0) # Penalty for bins with less than half capacity\n weight = np.log10(np.maximum(bins - item, 1e-9))\n scores[penalty] -= weight[penalty]\n return scores",
"objective": 0.01378,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities equal to the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins == item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Prioritize bins that have capacities equal to the item size.\n scores = 1.0 / (bins - item) * (bins == item)\n\n # Penalize bins that have less remaining capacity than the item size.\n scores -= 0.5 * (bins - item <= item)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the difference between the remaining capacity and the item size (with a higher penalty for bins with a smaller remaining capacity): scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have zero remaining capacity after placing the item, penalized if the bin capacity is less than 2 times the item size: Score = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between a given factor a and b times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (item <= bins) - 0.4 * (bins - item <= 0.5 * item)\n scores[bins < item] = -1e10\n return scores",
"objective": 0.01781,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities less than twice the item size, penalized if the remaining capacity is less than half of the item size and penalized if the remaining capacity is more than 0.25 times the item size: score = 1.0 / (bins - item) * (bins < 2 * item) - 0.4 * (bins - item <= 0.5 * item) + 0.2 * (0.25 * item <= bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n\n feas_bins = bins[bins >= item]\n \n score1 = 1.0 / (feas_bins - item)\n score1[feas_bins >= 2*item] = 0\n\n score2 = -0.4 * (feas_bins - item <= 0.5*item)\n\n score3 = 0.2 * (0.25*item <= feas_bins - item) * (feas_bins - item <= 0.5*item)\n\n scores = score1 + score2 + score3\n\n return scores",
"objective": 0.01791,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_24.json
================================================
[
{
"algorithm": "New algorithm: Prioritize bins that have capacities at least 3 times the item size, with a minimum score of 0.5 if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins >= 3 * item) - 0.5 * (bins - item <= item/2)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins >= 3 * item) - 0.5 * (bins - item <= item/2)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with remaining capacities under a threshold (0.75) : score = 1.0 / (bins - item) * (bins < 1.6 * item) - 0.75 * (bins - item <= 0.75 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / (bins - item) * (bins < 1.6 * item) - 0.75 * (bins - item <= 0.75 * item)\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Modified algorithm with a focus on penalizing bins with remaining capacities under a certain threshold: score = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": " New algorithm: Prioritize bins that have capacities less than 1.5 times the item size, penalized if the remaining capacity is less than 0.5 times the item size: scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item < 0.5 * item) ",
"code": "def score(item, bins):\n item = float(item)\n bins = bins[bins >= item].copy() # Remove bins that cannot accommodate the item\n scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.01077,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have their maximal capacity less than the given factor a times the item size, penalized if the remaining capacity is less than half the item size: score = 1.0 / (bin - item) * (bin <= a * item) - 0.4 * (bin - item <= 0.5 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= item*1.2) - 0.4 * (bins - item <= 0.5 * item)\n if item > bins.max():\n scores[:] = -float('inf')\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "Prioritize bins with capacities between a given factor a and b times the item size, and penalize bins if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (a * item <= bins <= b * item) - 0.8 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score a set of bins to assign an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n a = 0.7\n b = 1.3\n scores = 1.0 / (bins - item) * (a * item <= bins) * (bins <= b * item) - 0.8 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity but also with a higher weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.maximum(bins - item, 1e-9) # Inverse difference between capacity and item size\n penalty = (bins < 0.5 * np.max(bins)) & (bins > 0) # Penalty for bins with less than half capacity\n weight = np.log10(np.maximum(bins - item, 1e-9))\n scores[penalty] -= weight[penalty]\n return scores",
"objective": 0.01378,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities equal to the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins == item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Prioritize bins that have capacities equal to the item size.\n scores = 1.0 / (bins - item) * (bins == item)\n\n # Penalize bins that have less remaining capacity than the item size.\n scores -= 0.5 * (bins - item <= item)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the difference between the remaining capacity and the item size (with a higher penalty for bins with a smaller remaining capacity): scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have zero remaining capacity after placing the item, penalized if the bin capacity is less than 2 times the item size: Score = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins - item == 0) - 0.2 * (bins < 2 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_25.json
================================================
[
{
"algorithm": "New algorithm: Prioritize bins that have capacities at least 3 times the item size, with a minimum score of 0.5 if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins >= 3 * item) - 0.5 * (bins - item <= item/2)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins >= 3 * item) - 0.5 * (bins - item <= item/2)\n return scores",
"objective": 0.00755,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with remaining capacities under a threshold (0.75) : score = 1.0 / (bins - item) * (bins < 1.6 * item) - 0.75 * (bins - item <= 0.75 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / (bins - item) * (bins < 1.6 * item) - 0.75 * (bins - item <= 0.75 * item)\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the reciprocal of the difference between the bin capacity and the item size and a penalty for bins that have reached half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n zeros = np.zeros_like(bins)\n penalties = np.where(bins > (bins.max() // 2), zeros, 10000)\n scores = 1.0 / np.maximum(bins - item, zeros) - penalties\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "Modified algorithm with a focus on penalizing bins with remaining capacities under a certain threshold: score = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01056,
"other_inf": null
},
{
"algorithm": " New algorithm: Prioritize bins that have capacities less than 1.5 times the item size, penalized if the remaining capacity is less than 0.5 times the item size: scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item < 0.5 * item) ",
"code": "def score(item, bins):\n item = float(item)\n bins = bins[bins >= item].copy() # Remove bins that cannot accommodate the item\n scores = 1.0 / (bins - item) * (bins < 1.5 * item) - 0.5 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.01077,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity.",
"code": "def score(item, bins):\n scores = 1 / (bins - item)\n penalty = (bins < bins.max() / 2)\n scores[penalty] -= 1000\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have their maximal capacity less than the given factor a times the item size, penalized if the remaining capacity is less than half the item size: score = 1.0 / (bin - item) * (bin <= a * item) - 0.4 * (bin - item <= 0.5 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= item*1.2) - 0.4 * (bins - item <= 0.5 * item)\n if item > bins.max():\n scores[:] = -float('inf')\n return scores",
"objective": 0.01097,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, with a minimum score of 0.75 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.75 * (bins - item <= item)\n scores[bins < item] = -1e9\n return scores",
"objective": 0.01187,
"other_inf": null
},
{
"algorithm": "New algorithm penalizes bins with remaining capacities under a threshold (0.5) : score = 1.0 / (bins - item) * (bins < 1.3 * item) - 0.75 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = 1.0 / (bins - item)\n threshold = 0.5 * item\n scores *= (bins < 1.3 * item)\n scores -= 0.75 * (bins - item <= threshold)\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, and then apply a penalty to bins that have a rest capacity that is less than half of the maximum capacity but also with a higher weight.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.maximum(bins - item, 1e-9) # Inverse difference between capacity and item size\n penalty = (bins < 0.5 * np.max(bins)) & (bins > 0) # Penalty for bins with less than half capacity\n weight = np.log10(np.maximum(bins - item, 1e-9))\n scores[penalty] -= weight[penalty]\n return scores",
"objective": 0.01378,
"other_inf": null
},
{
"algorithm": "New Algorithm: Prioritize bins that have capacities equal to the item size, with a minimum score of 0.5 if the remaining capacity is less than the item size: scores = 1.0 / (bins - item) * (bins == item) - 0.5 * (bins - item <= item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Prioritize bins that have capacities equal to the item size.\n scores = 1.0 / (bins - item) * (bins == item)\n\n # Penalize bins that have less remaining capacity than the item size.\n scores -= 0.5 * (bins - item <= item)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New algorithm: Penalize a bin's capacity to be full, but have a lower penalty than the first algorithm, prioritize bins with capacity greater than the item size: scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.1 * (bins - item > 0) + 0.3 * (bins - item > (item / 2))\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the difference between the remaining capacity and the item size (with a higher penalty for bins with a smaller remaining capacity): scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)",
"code": "def score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item) - 0.1 * (bins - item < 0.25 * item)\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities greater than the item size and penalized if the remaining capacity is less than half of the item size: score = 2.0 / (bin - item) * (bin > item) - 0.5 * (bin - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 2.0 / (bins - item) * (bins > item) - 0.5 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 7 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 7 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "def score(item, bins):\n \"\"\"Calculate the score for each bin for item assignment.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of feasible bins.\n\n Returns:\n scores: A numpy array of the scores for each bin.\n \"\"\"\n\n # Prioritize bins with enough capacity to fit the item.\n scores = np.where(bins >= item, 1.0 / (bins - item), 0.0)\n\n # Penalize bins that are nearly full.\n scores -= 0.2 * np.where(bins - item <= 0.5 * item, 1.0, 0.0)\n\n # Penalize bins that are too big.\n scores *= np.where(bins <= 7 * item, 1.0, 0.0)\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with larger remaining capacity: scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) + 0.2 * (bins - item > 0.5 * item)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities 3 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities between half and 2 times the item size, penalized if the remaining capacity is less than half of the item size: score = 1.0 / (bins - item) * (0.5 * item <= bins <= 2 * item) - 0.4 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin factor\n bins_factor = 1.0 / (bins - item)\n\n # Calculate the bin capacity range\n lower_capacity_bound = 0.5 * item\n upper_capacity_bound = 2 * item\n\n # Calculate the bin capacity range score\n capacity_range_score = (0.5 * item <= bins) * (bins <= 2 * item)\n\n # Calculate the bin remaining capacity score\n remaining_capacity_score = -0.4 * (bins - item <= 0.5 * item)\n\n # Calculate the final score\n scores = bins_factor * capacity_range_score + remaining_capacity_score\n\n return scores",
"objective": 0.01741,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_3.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "The score function will calculate the score as a normalized linear function of the bin index plus the rest capacity divided by the normalized bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for each bin.\n \"\"\"\n\n # Normalize the bin indices and the remaining capacities.\n normalized_bin_indices = (bins - item) / bins\n normalized_remaining_capacities = bins / (bins - item)\n\n # Calculate the score for each bin.\n scores = normalized_bin_indices * normalized_remaining_capacities\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The score is computed as the exponential of the sum of the bin's index and the difference between the bin capacity and the item size multiplied by the difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin, given an item and a list of bins.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diffs = bins - item\n\n # Calculate the difference between the bin's index and the number of bins.\n idx_diffs = np.arange(len(bins)) - len(bins)\n\n # Compute the exponential of the sum of the bin's index and the difference between the bin capacity and the item size.\n scores = np.exp(idx_diffs * diffs)\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score of each bin based on a product of the inverse of the available capacity, the inverse of the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score of each bin for assignment.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n available_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n normalized_item_size = item / np.max(bins)\n scores = 1 / available_capacity * 1 / bin_number * normalized_item_size\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights for the rest capacity and the inverse of the index.\n weights = np.where(diff >= 0, 1 / diff, 0)\n\n # Compute the score for each bin.\n scores = weights * bins + (1 - weights) / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Use the inverse of available capacity, the square root of the inverse of the bin number, and the square root of normalized item size, all multiplied together to score bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n item_size = item / bins\n scores = (1 / available_capacity) * np.sqrt(1 / bin_number) * np.sqrt(item_size)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin as the sum of the multiplication of the inverse of the available capacity and the bin number, and the subtraction of the available capacity and the item size.",
"code": "def score(item, bins):\n scores = (bins - item)**2 / bins - bins + item \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "A variant form of the provided algorithm, where the score is computed as the sum of the inverse of the bin number and the inverse of the bin's remaining capacity.",
"code": "def score(item, bins):\n scores = 1 / np.arange(1, bins.size + 1) + 1 / (bins - item)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New Algorithm: The new algorithm will calculate the score of each bin based on a product of the inverse of the available capacity, the square of the inverse of the bin number, and the square of the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the available capacity\n inv_cap = 1.0 / (bins - item)\n\n # Calculate the square of the inverse of the bin number\n inv_bin_num_sq = np.square(1.0 / np.arange(1, len(bins) + 1))\n\n # Calculate the square of the normalized item size\n norm_item_size_sq = np.square(item / bins)\n\n # Calculate the scores\n scores = inv_cap * inv_bin_num_sq * norm_item_size_sq\n\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score for each bin as the sum of the inverse of the available capacity, the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Modified algorithm: Calculate the score for each bin as the sum of the inverse of the available capacity, the bin number, and the normalized item size.\n\n Args:\n item (int): The size of current item.\n bins (np.ndarray): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: The scores for the bins for assignment.\n \"\"\"\n # Inverse of the available capacity\n inv_cap = 1 / (bins - item)\n\n # Bin number\n bin_num = np.arange(len(bins)) + 1\n\n # Normalized item size\n norm_item = item / bins\n\n # Calculate the scores\n scores = inv_cap + bin_num + norm_item\n\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The score is computed as the difference between the maximum capacity and the available capacity, divided by the difference between the item size and the available capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.zeros_like(bins, dtype=np.float64)\n feasible = bins >= item\n scores[feasible] = (bins[feasible] - item) / (bins[feasible] - item)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, but it penalizes the score of bins with a rest capacity less than the item size. The penalized modification is calculated as (bins - item) / (1 + np.arange(len(bins))) * (1 - min(bins / item, 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (1 + np.arange(len(bins))) * (1 - np.minimum(bins / item, 1))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n rest_capacity = max_capacity - bins\n bin_number = np.arange(len(rest_capacity)) + 1\n scores = 0.8 * rest_capacity / max_capacity + 0.2 / bin_number\n scores[rest_capacity < item] = -1\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the product of the inverse of the available capacity, the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n bins_suit = bins[bins >= item]\n if len(bins_suit) <= 0:\n return np.zeros(len(bins))\n item_normalized = item / np.max(bins_suit)\n scores = 1 / bins_suit * bins_suit + item_normalized\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "New Algorithm: Adjust the score function by weight the score based on the square root of the rest capacity of bins. The score is calculated as scores = (bins + sqrt(bins)) / np.maximum((bins - item), 1)",
"code": "def score(item, bins):\n scores = (bins + np.sqrt(bins)) / np.maximum((bins - item), 1)\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score of a bin based on the rest capacity divided by the bin index, with a penalty added for bins with a rest capacity less than twice the item size.",
"code": "def score(item, bins):\n scores = 1.0 * bins / np.arange(1, len(bins) + 1)\n # Penalize for nearly full bins\n nearly_full_bins = (bins <= 2 * item)\n full_penalty = 0.001\n scores[nearly_full_bins] -= full_penalty\n return scores",
"objective": 0.04347,
"other_inf": null
},
{
"algorithm": "New algorithm: assigns an item to the bin with the best score, calculated as the sum of the inverse of the bin number and the product of the normalized capacity and the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n bin_nums = np.arange(1, len(bins) + 1)\n scores = 1 / bin_nums + (bins / bins.max()) * (item / item.max())\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score of each bin based on the product of the normalized available capacity and the inverse of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n if bins.min() < item:\n return np.zeros_like(bins)\n \n normalized_available_capacity = bins / bins.max()\n inverse_bin_number = 1.0 / np.arange(1, bins.size + 1)\n scores = normalized_available_capacity * inverse_bin_number\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The score function will calculate the scores for each bin based on the bin index divided by the square root of the difference between the bin capacity and the item size, with a penalty if the bin is full.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins.astype(np.float64) / np.sqrt(bins - item)) * (bins != 0)\n return scores",
"objective": 0.04417,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_4.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "The proposed algorithm computes a score for each bin based on the reciprocal of the difference between the bin capacity and the item size, and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.1 * (bins - item < 0.5 * item)\n \n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": "The score function will calculate the score as a normalized linear function of the bin index plus the rest capacity divided by the normalized bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for each bin.\n \"\"\"\n\n # Normalize the bin indices and the remaining capacities.\n normalized_bin_indices = (bins - item) / bins\n normalized_remaining_capacities = bins / (bins - item)\n\n # Calculate the score for each bin.\n scores = normalized_bin_indices * normalized_remaining_capacities\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The score is computed as the exponential of the sum of the bin's index and the difference between the bin capacity and the item size multiplied by the difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin, given an item and a list of bins.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diffs = bins - item\n\n # Calculate the difference between the bin's index and the number of bins.\n idx_diffs = np.arange(len(bins)) - len(bins)\n\n # Compute the exponential of the sum of the bin's index and the difference between the bin capacity and the item size.\n scores = np.exp(idx_diffs * diffs)\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm assigning an item to the bin with the maximum score, computed as the sum of the inverse of the remaining capacity, the square of the inverse of the bin number, and a constant \"k\". Scores are multiplied by k if the bin's remaining capacity is less than the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Compute the score for each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the inverse of the remaining capacity.\n inv_cap = 1.0 / bins\n\n # Compute the square of the inverse of the bin number.\n inv_bin_num_sq = 1.0 / np.arange(1, len(bins) + 1) ** 2\n\n # Compute the score for each bin.\n scores = inv_cap + inv_bin_num_sq + np.log(bins/(bins-item))\n\n # Multiply the score by a constant if the bin's remaining capacity is less than the item's size.\n scores[bins < item] *= 100\n\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score of each bin based on a product of the inverse of the available capacity, the inverse of the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score of each bin for assignment.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n available_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n normalized_item_size = item / np.max(bins)\n scores = 1 / available_capacity * 1 / bin_number * normalized_item_size\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights for the rest capacity and the inverse of the index.\n weights = np.where(diff >= 0, 1 / diff, 0)\n\n # Compute the score for each bin.\n scores = weights * bins + (1 - weights) / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Use the inverse of available capacity, the square root of the inverse of the bin number, and the square root of normalized item size, all multiplied together to score bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n item_size = item / bins\n scores = (1 / available_capacity) * np.sqrt(1 / bin_number) * np.sqrt(item_size)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin as the sum of the multiplication of the inverse of the available capacity and the bin number, and the subtraction of the available capacity and the item size.",
"code": "def score(item, bins):\n scores = (bins - item)**2 / bins - bins + item \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "A variant form of the provided algorithm, where the score is computed as the sum of the inverse of the bin number and the inverse of the bin's remaining capacity.",
"code": "def score(item, bins):\n scores = 1 / np.arange(1, bins.size + 1) + 1 / (bins - item)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New Algorithm: The new algorithm will calculate the score of each bin based on a product of the inverse of the available capacity, the square of the inverse of the bin number, and the square of the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the available capacity\n inv_cap = 1.0 / (bins - item)\n\n # Calculate the square of the inverse of the bin number\n inv_bin_num_sq = np.square(1.0 / np.arange(1, len(bins) + 1))\n\n # Calculate the square of the normalized item size\n norm_item_size_sq = np.square(item / bins)\n\n # Calculate the scores\n scores = inv_cap * inv_bin_num_sq * norm_item_size_sq\n\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as a product of a normalized inverse of the difference between the bin capacity and the item size, and a normalized index of the bin.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): A numpy array of rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n # Calculate the normalized inverse of the difference between the bin capacity and the item size.\n inv_diff = 1.0 / np.maximum(bins - item, 1)\n\n # Calculate the normalized index of the bin.\n idx = np.arange(len(bins)) / len(bins)\n\n # Calculate the score for each bin as a product of the normalized inverse of the difference and the normalized index.\n scores = inv_diff * idx\n\n # Return the scores.\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score for each bin as the sum of the inverse of the available capacity, the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Modified algorithm: Calculate the score for each bin as the sum of the inverse of the available capacity, the bin number, and the normalized item size.\n\n Args:\n item (int): The size of current item.\n bins (np.ndarray): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: The scores for the bins for assignment.\n \"\"\"\n # Inverse of the available capacity\n inv_cap = 1 / (bins - item)\n\n # Bin number\n bin_num = np.arange(len(bins)) + 1\n\n # Normalized item size\n norm_item = item / bins\n\n # Calculate the scores\n scores = inv_cap + bin_num + norm_item\n\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Adds the square of the difference between the item size and the available capacity to the previous algorithm's formula.",
"code": "import numpy as np\n\ndef score(item, bins, k=0):\n scores = (3 - 2 * (bins - item).clip(0, 1) - (bins < item)) / 2 # new algorithm\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, but it penalizes the score of bins with a rest capacity less than the item size. The penalized modification is calculated as (bins - item) / (1 + np.arange(len(bins))) * (1 - min(bins / item, 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (1 + np.arange(len(bins))) * (1 - np.minimum(bins / item, 1))\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the sum of the inverse of the remaining capacity and the logarithm of the bin number, weighted by the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n\n capacity_ratio = bins / item\n bin_num = np.arange(len(bins)) + 1\n\n scores = capacity_ratio / bin_num + np.log(bin_num)\n scores[capacity_ratio == 0] = 0\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = bins.max()\n rest_capacity = max_capacity - bins\n bin_number = np.arange(len(rest_capacity)) + 1\n scores = 0.8 * rest_capacity / max_capacity + 0.2 / bin_number\n scores[rest_capacity < item] = -1\n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the product of the inverse of the available capacity, the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n bins_suit = bins[bins >= item]\n if len(bins_suit) <= 0:\n return np.zeros(len(bins))\n item_normalized = item / np.max(bins_suit)\n scores = 1 / bins_suit * bins_suit + item_normalized\n return scores",
"objective": 0.04276,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_5.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the reciprocal of the difference between the bin capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The proposed algorithm computes a score for each bin based on the reciprocal of the difference between the bin capacity and the item size, and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.1 * (bins - item < 0.5 * item)\n \n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its remaining percentage capacity, with the weights determined by the square of the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Compute the score for each bin to assign an item.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n if len(bins) == 0:\n return np.array([0])\n\n max_capacity = np.max(bins)\n if max_capacity == item:\n return np.zeros_like(bins)\n\n weights = np.square(bins - max_capacity)\n rest_capacity = bins - item\n remaining_percentage_capacity = rest_capacity / max_capacity\n scores = weights * rest_capacity + 1 / remaining_percentage_capacity\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "The score function will calculate the score as a normalized linear function of the bin index plus the rest capacity divided by the normalized bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for each bin.\n \"\"\"\n\n # Normalize the bin indices and the remaining capacities.\n normalized_bin_indices = (bins - item) / bins\n normalized_remaining_capacities = bins / (bins - item)\n\n # Calculate the score for each bin.\n scores = normalized_bin_indices * normalized_remaining_capacities\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The score is computed as the exponential of the sum of the bin's index and the difference between the bin capacity and the item size multiplied by the difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin, given an item and a list of bins.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diffs = bins - item\n\n # Calculate the difference between the bin's index and the number of bins.\n idx_diffs = np.arange(len(bins)) - len(bins)\n\n # Compute the exponential of the sum of the bin's index and the difference between the bin capacity and the item size.\n scores = np.exp(idx_diffs * diffs)\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm assigning an item to the bin with the maximum score, computed as the sum of the inverse of the remaining capacity, the square of the inverse of the bin number, and a constant \"k\". Scores are multiplied by k if the bin's remaining capacity is less than the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Compute the score for each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the inverse of the remaining capacity.\n inv_cap = 1.0 / bins\n\n # Compute the square of the inverse of the bin number.\n inv_bin_num_sq = 1.0 / np.arange(1, len(bins) + 1) ** 2\n\n # Compute the score for each bin.\n scores = inv_cap + inv_bin_num_sq + np.log(bins/(bins-item))\n\n # Multiply the score by a constant if the bin's remaining capacity is less than the item's size.\n scores[bins < item] *= 100\n\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the score for each bin as the inverse of the product of the bin's index and the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Compute the product of the bin's index and the difference between the bin capacity and the item size\n products = np.multiply(np.arange(1, len(bins) + 1), bins - item)\n # Compute the inverse of the products\n scores = 1 / products\n # Mask out scores for bins with insufficient capacity\n scores[bins < item] = np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights for the rest capacity and the inverse of the index.\n weights = np.where(diff >= 0, 1 / diff, 0)\n\n # Compute the score for each bin.\n scores = weights * bins + (1 - weights) / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Use the inverse of available capacity, the square root of the inverse of the bin number, and the square root of normalized item size, all multiplied together to score bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n item_size = item / bins\n scores = (1 / available_capacity) * np.sqrt(1 / bin_number) * np.sqrt(item_size)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: the score for a bin is computed as the product of the inverse of the rest capacity, the inverse of the bin number, and an indicator function that checks if the remaining capacity is less than half the bin's capacity multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for a bin.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n rest_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n indicator = np.where(rest_capacity < item * 0.5, 1, 0)\n scores = 1 / rest_capacity * 1 / bin_number * indicator\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin as the sum of the multiplication of the inverse of the available capacity and the bin number, and the subtraction of the available capacity and the item size.",
"code": "def score(item, bins):\n scores = (bins - item)**2 / bins - bins + item \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "A variant form of the provided algorithm, where the score is computed as the sum of the inverse of the bin number and the inverse of the bin's remaining capacity.",
"code": "def score(item, bins):\n scores = 1 / np.arange(1, bins.size + 1) + 1 / (bins - item)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New Algorithm: The new algorithm will calculate the score of each bin based on a product of the inverse of the available capacity, the square of the inverse of the bin number, and the square of the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the available capacity\n inv_cap = 1.0 / (bins - item)\n\n # Calculate the square of the inverse of the bin number\n inv_bin_num_sq = np.square(1.0 / np.arange(1, len(bins) + 1))\n\n # Calculate the square of the normalized item size\n norm_item_size_sq = np.square(item / bins)\n\n # Calculate the scores\n scores = inv_cap * inv_bin_num_sq * norm_item_size_sq\n\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as a product of a normalized inverse of the difference between the bin capacity and the item size, and a normalized index of the bin.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): A numpy array of rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n # Calculate the normalized inverse of the difference between the bin capacity and the item size.\n inv_diff = 1.0 / np.maximum(bins - item, 1)\n\n # Calculate the normalized index of the bin.\n idx = np.arange(len(bins)) / len(bins)\n\n # Calculate the score for each bin as a product of the normalized inverse of the difference and the normalized index.\n scores = inv_diff * idx\n\n # Return the scores.\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score for each bin as the sum of the inverse of the available capacity, the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Modified algorithm: Calculate the score for each bin as the sum of the inverse of the available capacity, the bin number, and the normalized item size.\n\n Args:\n item (int): The size of current item.\n bins (np.ndarray): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: The scores for the bins for assignment.\n \"\"\"\n # Inverse of the available capacity\n inv_cap = 1 / (bins - item)\n\n # Bin number\n bin_num = np.arange(len(bins)) + 1\n\n # Normalized item size\n norm_item = item / bins\n\n # Calculate the scores\n scores = inv_cap + bin_num + norm_item\n\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Adds the square of the difference between the item size and the available capacity to the previous algorithm's formula.",
"code": "import numpy as np\n\ndef score(item, bins, k=0):\n scores = (3 - 2 * (bins - item).clip(0, 1) - (bins < item)) / 2 # new algorithm\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: The algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, but it penalizes the score of bins with a rest capacity less than the item size. The penalized modification is calculated as (bins - item) / (1 + np.arange(len(bins))) * (1 - min(bins / item, 1))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / (1 + np.arange(len(bins))) * (1 - np.minimum(bins / item, 1))\n return scores",
"objective": 0.04226,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_6.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the reciprocal of the difference between the bin capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "The proposed algorithm computes a score for each bin based on the reciprocal of the difference between the bin capacity and the item size, and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.1 * (bins - item < 0.5 * item)\n \n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its remaining percentage capacity, with the weights determined by the square of the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Compute the score for each bin to assign an item.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n if len(bins) == 0:\n return np.array([0])\n\n max_capacity = np.max(bins)\n if max_capacity == item:\n return np.zeros_like(bins)\n\n weights = np.square(bins - max_capacity)\n rest_capacity = bins - item\n remaining_percentage_capacity = rest_capacity / max_capacity\n scores = weights * rest_capacity + 1 / remaining_percentage_capacity\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "The score function will calculate the score as a normalized linear function of the bin index plus the rest capacity divided by the normalized bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for each bin.\n \"\"\"\n\n # Normalize the bin indices and the remaining capacities.\n normalized_bin_indices = (bins - item) / bins\n normalized_remaining_capacities = bins / (bins - item)\n\n # Calculate the score for each bin.\n scores = normalized_bin_indices * normalized_remaining_capacities\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The score is computed as the exponential of the sum of the bin's index and the difference between the bin capacity and the item size multiplied by the difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin, given an item and a list of bins.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diffs = bins - item\n\n # Calculate the difference between the bin's index and the number of bins.\n idx_diffs = np.arange(len(bins)) - len(bins)\n\n # Compute the exponential of the sum of the bin's index and the difference between the bin capacity and the item size.\n scores = np.exp(idx_diffs * diffs)\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm assigning an item to the bin with the maximum score, computed as the sum of the inverse of the remaining capacity, the square of the inverse of the bin number, and a constant \"k\". Scores are multiplied by k if the bin's remaining capacity is less than the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Compute the score for each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the inverse of the remaining capacity.\n inv_cap = 1.0 / bins\n\n # Compute the square of the inverse of the bin number.\n inv_bin_num_sq = 1.0 / np.arange(1, len(bins) + 1) ** 2\n\n # Compute the score for each bin.\n scores = inv_cap + inv_bin_num_sq + np.log(bins/(bins-item))\n\n # Multiply the score by a constant if the bin's remaining capacity is less than the item's size.\n scores[bins < item] *= 100\n\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the score for each bin as the inverse of the product of the bin's index and the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Compute the product of the bin's index and the difference between the bin capacity and the item size\n products = np.multiply(np.arange(1, len(bins) + 1), bins - item)\n # Compute the inverse of the products\n scores = 1 / products\n # Mask out scores for bins with insufficient capacity\n scores[bins < item] = np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights for the rest capacity and the inverse of the index.\n weights = np.where(diff >= 0, 1 / diff, 0)\n\n # Compute the score for each bin.\n scores = weights * bins + (1 - weights) / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Use the inverse of available capacity, the square root of the inverse of the bin number, and the square root of normalized item size, all multiplied together to score bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n item_size = item / bins\n scores = (1 / available_capacity) * np.sqrt(1 / bin_number) * np.sqrt(item_size)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: the score for a bin is computed as the product of the inverse of the rest capacity, the inverse of the bin number, and an indicator function that checks if the remaining capacity is less than half the bin's capacity multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for a bin.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n rest_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n indicator = np.where(rest_capacity < item * 0.5, 1, 0)\n scores = 1 / rest_capacity * 1 / bin_number * indicator\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin as the sum of the multiplication of the inverse of the available capacity and the bin number, and the subtraction of the available capacity and the item size.",
"code": "def score(item, bins):\n scores = (bins - item)**2 / bins - bins + item \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as a weighted sum of the inverse of the available capacity, the bin number, and the normalized item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin as a weighted sum of the inverse of the available capacity, the bin number, and the normalized item size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of the available capacity.\n inv_cap = 1.0 / np.maximum(bins - item, 1e-6)\n\n # Calculate the bin number.\n bin_num = np.arange(len(bins)) + 1\n\n # Calculate the normalized item size.\n norm_item = item / np.max(bins)\n\n # Calculate the weights.\n weights = np.array([0.5, 0.3, 0.2])\n\n # Calculate the scores.\n scores = weights[0] * inv_cap + weights[1] * bin_num + weights[2] * norm_item\n\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "A variant form of the provided algorithm, where the score is computed as the sum of the inverse of the bin number and the inverse of the bin's remaining capacity.",
"code": "def score(item, bins):\n scores = 1 / np.arange(1, bins.size + 1) + 1 / (bins - item)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New Algorithm: The new algorithm will calculate the score of each bin based on a product of the inverse of the available capacity, the square of the inverse of the bin number, and the square of the normalized item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the available capacity\n inv_cap = 1.0 / (bins - item)\n\n # Calculate the square of the inverse of the bin number\n inv_bin_num_sq = np.square(1.0 / np.arange(1, len(bins) + 1))\n\n # Calculate the square of the normalized item size\n norm_item_size_sq = np.square(item / bins)\n\n # Calculate the scores\n scores = inv_cap * inv_bin_num_sq * norm_item_size_sq\n\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as a product of a normalized inverse of the difference between the bin capacity and the item size, and a normalized index of the bin.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): A numpy array of rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n # Calculate the normalized inverse of the difference between the bin capacity and the item size.\n inv_diff = 1.0 / np.maximum(bins - item, 1)\n\n # Calculate the normalized index of the bin.\n idx = np.arange(len(bins)) / len(bins)\n\n # Calculate the score for each bin as a product of the normalized inverse of the difference and the normalized index.\n scores = inv_diff * idx\n\n # Return the scores.\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score for each bin as the sum of the inverse of the available capacity, the bin number, and the normalized item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Modified algorithm: Calculate the score for each bin as the sum of the inverse of the available capacity, the bin number, and the normalized item size.\n\n Args:\n item (int): The size of current item.\n bins (np.ndarray): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: The scores for the bins for assignment.\n \"\"\"\n # Inverse of the available capacity\n inv_cap = 1 / (bins - item)\n\n # Bin number\n bin_num = np.arange(len(bins)) + 1\n\n # Normalized item size\n norm_item = item / bins\n\n # Calculate the scores\n scores = inv_cap + bin_num + norm_item\n\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm: Adds the square of the difference between the item size and the available capacity to the previous algorithm's formula.",
"code": "import numpy as np\n\ndef score(item, bins, k=0):\n scores = (3 - 2 * (bins - item).clip(0, 1) - (bins < item)) / 2 # new algorithm\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_7.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have smaller differences between their capacity and the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)\n scores[bins - item <= 0] = -np.inf\n return scores",
"objective": 0.02747,
"other_inf": null
},
{
"algorithm": "The proposed algorithm computes a score for each bin based on the reciprocal of the difference between the bin capacity and the item size, and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.1 * (bins - item < 0.5 * item)\n \n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its remaining percentage capacity, with the weights determined by the square of the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Compute the score for each bin to assign an item.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n if len(bins) == 0:\n return np.array([0])\n\n max_capacity = np.max(bins)\n if max_capacity == item:\n return np.zeros_like(bins)\n\n weights = np.square(bins - max_capacity)\n rest_capacity = bins - item\n remaining_percentage_capacity = rest_capacity / max_capacity\n scores = weights * rest_capacity + 1 / remaining_percentage_capacity\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "The score function will calculate the score as a normalized linear function of the bin index plus the rest capacity divided by the normalized bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for each bin.\n \"\"\"\n\n # Normalize the bin indices and the remaining capacities.\n normalized_bin_indices = (bins - item) / bins\n normalized_remaining_capacities = bins / (bins - item)\n\n # Calculate the score for each bin.\n scores = normalized_bin_indices * normalized_remaining_capacities\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "The score is computed as the exponential of the sum of the bin's index and the difference between the bin capacity and the item size multiplied by the difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin, given an item and a list of bins.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diffs = bins - item\n\n # Calculate the difference between the bin's index and the number of bins.\n idx_diffs = np.arange(len(bins)) - len(bins)\n\n # Compute the exponential of the sum of the bin's index and the difference between the bin capacity and the item size.\n scores = np.exp(idx_diffs * diffs)\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm assigning an item to the bin with the maximum score, computed as the sum of the inverse of the remaining capacity, the square of the inverse of the bin number, and a constant \"k\". Scores are multiplied by k if the bin's remaining capacity is less than the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Compute the score for each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the inverse of the remaining capacity.\n inv_cap = 1.0 / bins\n\n # Compute the square of the inverse of the bin number.\n inv_bin_num_sq = 1.0 / np.arange(1, len(bins) + 1) ** 2\n\n # Compute the score for each bin.\n scores = inv_cap + inv_bin_num_sq + np.log(bins/(bins-item))\n\n # Multiply the score by a constant if the bin's remaining capacity is less than the item's size.\n scores[bins < item] *= 100\n\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the score for each bin as the inverse of the product of the bin's index and the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Compute the product of the bin's index and the difference between the bin capacity and the item size\n products = np.multiply(np.arange(1, len(bins) + 1), bins - item)\n # Compute the inverse of the products\n scores = 1 / products\n # Mask out scores for bins with insufficient capacity\n scores[bins < item] = np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights for the rest capacity and the inverse of the index.\n weights = np.where(diff >= 0, 1 / diff, 0)\n\n # Compute the score for each bin.\n scores = weights * bins + (1 - weights) / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New Algorithm: Compute the score for each bin as the weighted sum of the bin's rest capacity and the reciprocal of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Compute the score for each bin as the weighted sum of the bin's rest capacity and the reciprocal of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights as the reciprocal of the difference.\n weights = 1 / diff\n\n # Compute the scores as the weighted sum of the bin's rest capacity and the reciprocal of its index.\n scores = weights * bins + 1 / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm scores a bin as the sum of the multiplication of the inverse of the bin number, the inverse of the bin's remaining capacity, and an indicator function that checks if the remaining capacity is less than half the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n \n remaining_capacities = bins - item\n \n inverse_bin_numbers = 1 / np.array(range(1, len(bins) + 1))\n \n inverse_remaining_capacities = 1 / remaining_capacities\n \n half_capacities = bins / 2\n \n low_capacity_indicator = np.where(remaining_capacities < half_capacities, 1, 0)\n \n scores = inverse_bin_numbers * inverse_remaining_capacities * low_capacity_indicator\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Use the inverse of available capacity, the square root of the inverse of the bin number, and the square root of normalized item size, all multiplied together to score bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n item_size = item / bins\n scores = (1 / available_capacity) * np.sqrt(1 / bin_number) * np.sqrt(item_size)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: the score for a bin is computed as the product of the inverse of the rest capacity, the inverse of the bin number, and an indicator function that checks if the remaining capacity is less than half the bin's capacity multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for a bin.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n rest_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n indicator = np.where(rest_capacity < item * 0.5, 1, 0)\n scores = 1 / rest_capacity * 1 / bin_number * indicator\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin as the sum of the square root of the inverse of the bin number and the square root of the inverse of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores each bin as the sum of the square root of the inverse of the bin number and the square root of the inverse of the bin's remaining capacity.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n bin_nums = np.arange(len(bins)) + 1\n bin_capacities = bins - item\n scores = np.sqrt(1 / bin_nums) + np.sqrt(1 / bin_capacities)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin as the sum of the multiplication of the inverse of the available capacity and the bin number, and the subtraction of the available capacity and the item size.",
"code": "def score(item, bins):\n scores = (bins - item)**2 / bins - bins + item \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "New algorithm assigns an item to the bin with the maximum score, computed as the sum of the inverse of the remaining capacity, the square root of the inverse of the bin number, and a constant \"k\".",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Compute the inverse of the remaining capacity.\n inv_cap = 1.0 / (bins - item)\n\n # Compute the square root of the inverse of the bin number.\n inv_bin = 1.0 / np.sqrt(np.arange(1, len(bins) + 1))\n\n # Compute the scores.\n scores = inv_cap + inv_bin + 0.5\n\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as a weighted sum of the inverse of the available capacity, the bin number, and the normalized item size, where the weights are learned from data.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin as a weighted sum of the inverse of the available capacity, the bin number, and the normalized item size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of the available capacity.\n inv_cap = 1.0 / np.maximum(bins - item, 1e-6)\n\n # Calculate the bin number.\n bin_num = np.arange(len(bins)) + 1\n\n # Calculate the normalized item size.\n norm_item = item / np.max(bins)\n\n # Calculate the weights.\n weights = np.array([0.5, 0.3, 0.2])\n\n # Calculate the scores.\n scores = weights[0] * inv_cap + weights[1] * bin_num + weights[2] * norm_item\n\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "A variant form of the provided algorithm, where the score is computed as the sum of the inverse of the bin number and the inverse of the bin's remaining capacity.",
"code": "def score(item, bins):\n scores = 1 / np.arange(1, bins.size + 1) + 1 / (bins - item)\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_8.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities at most three times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n # Penalize bins with remaining capacity less than half of the item size\n scores[bins - item <= 0.5 * item] -= 0.5\n # Mask out invalid bins (remaining capacity less than the item size)\n scores[bins - item < 0] = -np.inf\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have smaller differences between their capacity and the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)\n scores[bins - item <= 0] = -np.inf\n return scores",
"objective": 0.02747,
"other_inf": null
},
{
"algorithm": "The proposed algorithm computes a score for each bin based on the reciprocal of the difference between the bin capacity and the item size, and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.1 * (bins - item < 0.5 * item)\n \n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its remaining percentage capacity, with the weights determined by the square of the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Compute the score for each bin to assign an item.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n if len(bins) == 0:\n return np.array([0])\n\n max_capacity = np.max(bins)\n if max_capacity == item:\n return np.zeros_like(bins)\n\n weights = np.square(bins - max_capacity)\n rest_capacity = bins - item\n remaining_percentage_capacity = rest_capacity / max_capacity\n scores = weights * rest_capacity + 1 / remaining_percentage_capacity\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "The score function will calculate the score as a normalized linear function of the bin index plus the rest capacity divided by the normalized bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for each bin.\n \"\"\"\n\n # Normalize the bin indices and the remaining capacities.\n normalized_bin_indices = (bins - item) / bins\n normalized_remaining_capacities = bins / (bins - item)\n\n # Calculate the score for each bin.\n scores = normalized_bin_indices * normalized_remaining_capacities\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities within 20% of the item size, penalized if the remaining capacity is less than 10% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.2 * item) - 0.1 * (bins - item <= 0.1 * item)",
"code": "def score(item: int, bins: np.array) -> np.array:\n \"\"\"Prioritize bins that have capacities within 20% of the item size, penalized if the remaining capacity is less than 10% of the item size:\n scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.2 * item) - 0.1 * (bins - item <= 0.1 * item)\n \"\"\"\n assert np.all(bins >= item), \"Bins must have sufficient capacity to accommodate the item\"\n scores = 1.0 / (bins - item) * (np.abs(bins - item) <= 0.2 * item) - 0.1 * (bins - item <= 0.1 * item)\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The score is computed as the exponential of the sum of the bin's index and the difference between the bin capacity and the item size multiplied by the difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin, given an item and a list of bins.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diffs = bins - item\n\n # Calculate the difference between the bin's index and the number of bins.\n idx_diffs = np.arange(len(bins)) - len(bins)\n\n # Compute the exponential of the sum of the bin's index and the difference between the bin capacity and the item size.\n scores = np.exp(idx_diffs * diffs)\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm assigning an item to the bin with the maximum score, computed as the sum of the inverse of the remaining capacity, the square of the inverse of the bin number, and a constant \"k\". Scores are multiplied by k if the bin's remaining capacity is less than the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Compute the score for each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the inverse of the remaining capacity.\n inv_cap = 1.0 / bins\n\n # Compute the square of the inverse of the bin number.\n inv_bin_num_sq = 1.0 / np.arange(1, len(bins) + 1) ** 2\n\n # Compute the score for each bin.\n scores = inv_cap + inv_bin_num_sq + np.log(bins/(bins-item))\n\n # Multiply the score by a constant if the bin's remaining capacity is less than the item's size.\n scores[bins < item] *= 100\n\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the score for each bin as the inverse of the product of the bin's index and the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Compute the product of the bin's index and the difference between the bin capacity and the item size\n products = np.multiply(np.arange(1, len(bins) + 1), bins - item)\n # Compute the inverse of the products\n scores = 1 / products\n # Mask out scores for bins with insufficient capacity\n scores[bins < item] = np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights for the rest capacity and the inverse of the index.\n weights = np.where(diff >= 0, 1 / diff, 0)\n\n # Compute the score for each bin.\n scores = weights * bins + (1 - weights) / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New Algorithm: Compute the score for each bin as the weighted sum of the bin's rest capacity and the reciprocal of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Compute the score for each bin as the weighted sum of the bin's rest capacity and the reciprocal of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights as the reciprocal of the difference.\n weights = 1 / diff\n\n # Compute the scores as the weighted sum of the bin's rest capacity and the reciprocal of its index.\n scores = weights * bins + 1 / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm scores a bin as the sum of the multiplication of the inverse of the bin number, the inverse of the bin's remaining capacity, and an indicator function that checks if the remaining capacity is less than half the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n \n remaining_capacities = bins - item\n \n inverse_bin_numbers = 1 / np.array(range(1, len(bins) + 1))\n \n inverse_remaining_capacities = 1 / remaining_capacities\n \n half_capacities = bins / 2\n \n low_capacity_indicator = np.where(remaining_capacities < half_capacities, 1, 0)\n \n scores = inverse_bin_numbers * inverse_remaining_capacities * low_capacity_indicator\n \n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Use the inverse of available capacity, the square root of the inverse of the bin number, and the square root of normalized item size, all multiplied together to score bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n item_size = item / bins\n scores = (1 / available_capacity) * np.sqrt(1 / bin_number) * np.sqrt(item_size)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: the score for a bin is computed as the product of the inverse of the rest capacity, the inverse of the bin number, and an indicator function that checks if the remaining capacity is less than half the bin's capacity multiplied by the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for a bin.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n rest_capacity = bins - item\n bin_number = np.arange(len(bins)) + 1\n indicator = np.where(rest_capacity < item * 0.5, 1, 0)\n scores = 1 / rest_capacity * 1 / bin_number * indicator\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin as the sum of the square root of the inverse of the bin number and the square root of the inverse of the bin's remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores each bin as the sum of the square root of the inverse of the bin number and the square root of the inverse of the bin's remaining capacity.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n bin_nums = np.arange(len(bins)) + 1\n bin_capacities = bins - item\n scores = np.sqrt(1 / bin_nums) + np.sqrt(1 / bin_capacities)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "New algorithm assigns an item to the bin with the maximum score calculated as the harmonic mean of the remaining capacity and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (2 * bins - item)\n return scores",
"objective": 0.03984,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run1/population_generation_9.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin as the inverse of the difference between the bin capacity and the item size, with a penalty for bins that reach half of the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n half_capacity = max_capacity / 2\n scores = 1 / (bins - item)\n scores[bins <= half_capacity] -= 1\n return scores",
"objective": 0.00986,
"other_inf": null
},
{
"algorithm": "New algorithm: the score function will calculate the score of a bin based on an indicator function that checks if the rest capacity is more than twice the item size, and then takes the difference between the bin index and the number of feasible bins.",
"code": "def score(item, bins):\n indicator = np.where(bins > 2 * item, 1, 0)\n num_feasible = np.count_nonzero(indicator)\n scores = indicator * (bins - item) - (bins - num_feasible)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins based on the sum of the inverse of the remaining capacity and the inverse of the item size, with a higher penalty for bins with smaller remaining capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n scores = 1.0 / (bins - item) + 1.0 / item - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Score bins based on the sum of the inverse of the remaining capacity and the item size, with a higher penalty for bins with smaller remaining capacity: scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item < 0.5 * item)\n return scores",
"objective": 0.0166,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Prioritize bins that have capacities 2 times the item size, penalized if the remaining capacity is less than half of the item size:\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n \"\"\"\n scores = 1.0 / (bins - item) * (bins <= 2 * item) - 0.2 * (bins - item <= 0.5 * item)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "The score for a bin is computed as the product of the inverse of the square root of the rest capacity and the inverse of the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for a bin.\n\n The score is computed as the product of the inverse of the square root of the\n rest capacity and the inverse of the square root of the bin number.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n The scores for the bins.\n \"\"\"\n\n rest_capacities = np.maximum(bins - item, 0)\n bin_numbers = np.arange(len(bins)) + 1\n scores = rest_capacities / np.sqrt(rest_capacities) * 1 / np.sqrt(bin_numbers)\n return scores",
"objective": 0.02495,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities at most three times the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = 1.0 / (bins - item) * (bins <= 3 * item) - 0.2 * (bins - item <= 0.5 * item)\n # Penalize bins with remaining capacity less than half of the item size\n scores[bins - item <= 0.5 * item] -= 0.5\n # Mask out invalid bins (remaining capacity less than the item size)\n scores[bins - item < 0] = -np.inf\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have smaller differences between their capacity and the item size, penalized if the remaining capacity is less than half of the item size: scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)",
"code": "import numpy as np\ndef score(item, bins):\n scores = 1.0 / (bins - item) - 0.2 * (bins - item <= 0.5 * item)\n scores[bins - item <= 0] = -np.inf\n return scores",
"objective": 0.02747,
"other_inf": null
},
{
"algorithm": "The proposed algorithm computes a score for each bin based on the reciprocal of the difference between the bin capacity and the item size, and a penalty for bins with smaller remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \n scores = 1.0 / np.maximum((bins - item), 1e-12) - 0.1 * (bins - item < 0.5 * item)\n \n return scores",
"objective": 0.02847,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score for each bin as the weighted sum of the bin's rest capacity and the inverse of its remaining percentage capacity, with the weights determined by the square of the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Compute the score for each bin to assign an item.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n if len(bins) == 0:\n return np.array([0])\n\n max_capacity = np.max(bins)\n if max_capacity == item:\n return np.zeros_like(bins)\n\n weights = np.square(bins - max_capacity)\n rest_capacity = bins - item\n remaining_percentage_capacity = rest_capacity / max_capacity\n scores = weights * rest_capacity + 1 / remaining_percentage_capacity\n return scores",
"objective": 0.03793,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities within 30% of the item size, penalized if the remaining capacity is less than 10% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.3 * item) - 0.1 * (bins - item <= 0.1 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins - item) * (np.abs(bins - item) <= 0.3 * item) - 0.1 * (bins - item <= 0.1 * item)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins that have capacities within 15% of the item size, penalized if the remaining capacity is less than 5% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.15 * item) - 0.05 * (bins - item <= 0.05 * item)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Prioritize bins that have capacities within 15% of the item size, penalized if the remaining capacity is less than 5% of the item size.\n \n Args:\n item: Size of the current item to be assigned. (int)\n bins: Rest capacities of feasible bins, which are larger than the item size. (np.ndarray)\n \n Returns:\n Scores for the bins for assignment. (np.ndarray)\n \"\"\"\n\n # Penalize bins with less than 5% remaining capacity\n penalty = np.where(bins - item <= 0.05 * item, -0.05, 0.0)\n\n # Calculate scores\n scores = 1.0 / (bins - item) * np.where(np.abs(bins - item) <= 0.15 * item, 1.0, 0.0) + penalty\n\n return scores",
"objective": 0.03813,
"other_inf": null
},
{
"algorithm": "The score function will calculate the score as a normalized linear function of the bin index plus the rest capacity divided by the normalized bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for each bin.\n \"\"\"\n\n # Normalize the bin indices and the remaining capacities.\n normalized_bin_indices = (bins - item) / bins\n normalized_remaining_capacities = bins / (bins - item)\n\n # Calculate the score for each bin.\n scores = normalized_bin_indices * normalized_remaining_capacities\n\n return scores",
"objective": 0.03833,
"other_inf": null
},
{
"algorithm": "Prioritize bins that have capacities within 20% of the item size, penalized if the remaining capacity is less than 10% of the item size: scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.2 * item) - 0.1 * (bins - item <= 0.1 * item)",
"code": "def score(item: int, bins: np.array) -> np.array:\n \"\"\"Prioritize bins that have capacities within 20% of the item size, penalized if the remaining capacity is less than 10% of the item size:\n scores = 1.0 / (bins - item) * (abs(bins - item) <= 0.2 * item) - 0.1 * (bins - item <= 0.1 * item)\n \"\"\"\n assert np.all(bins >= item), \"Bins must have sufficient capacity to accommodate the item\"\n scores = 1.0 / (bins - item) * (np.abs(bins - item) <= 0.2 * item) - 0.1 * (bins - item <= 0.1 * item)\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The score is computed as the exponential of the sum of the bin's index and the difference between the bin capacity and the item size multiplied by the difference between the bin's index and the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin, given an item and a list of bins.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diffs = bins - item\n\n # Calculate the difference between the bin's index and the number of bins.\n idx_diffs = np.arange(len(bins)) - len(bins)\n\n # Compute the exponential of the sum of the bin's index and the difference between the bin capacity and the item size.\n scores = np.exp(idx_diffs * diffs)\n\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm assigning an item to the bin with the maximum score, computed as the sum of the inverse of the remaining capacity, the square of the inverse of the bin number, and a constant \"k\". Scores are multiplied by k if the bin's remaining capacity is less than the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Compute the score for each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Compute the inverse of the remaining capacity.\n inv_cap = 1.0 / bins\n\n # Compute the square of the inverse of the bin number.\n inv_bin_num_sq = 1.0 / np.arange(1, len(bins) + 1) ** 2\n\n # Compute the score for each bin.\n scores = inv_cap + inv_bin_num_sq + np.log(bins/(bins-item))\n\n # Multiply the score by a constant if the bin's remaining capacity is less than the item's size.\n scores[bins < item] *= 100\n\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Compute the score for each bin as the inverse of the product of the bin's index and the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Compute the product of the bin's index and the difference between the bin capacity and the item size\n products = np.multiply(np.arange(1, len(bins) + 1), bins - item)\n # Compute the inverse of the products\n scores = 1 / products\n # Mask out scores for bins with insufficient capacity\n scores[bins < item] = np.inf\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "Algorithm with a different parameter setting: score = weights * bins + (1 - weights) / np.arange(1, len(bins) + 1), where weights = np.where(diff >= 0, 1 / diff, 0)",
"code": "import numpy as np\n\ndef score(item, bins):\n weights = np.where(bins >= item, 1 / (bins - item), 0)\n scores = weights * bins + (1 - weights) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New Algorithm: Compute the score for each bin as the weighted sum of the bin's rest capacity and the reciprocal of its index, with the weights determined by the difference between the bin's and item's maximum capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Compute the score for each bin as the weighted sum of the bin's rest capacity and the reciprocal of its index, with the weights determined by the difference between the bin's and item's maximum capacities.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n # Compute the difference between the bin's and item's maximum capacities.\n diff = bins - item\n\n # Compute the weights as the reciprocal of the difference.\n weights = 1 / diff\n\n # Compute the scores as the weighted sum of the bin's rest capacity and the reciprocal of its index.\n scores = weights * bins + 1 / np.arange(1, len(bins) + 1)\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The new algorithm scores a bin as the sum of the multiplication of the inverse of the bin number, the inverse of the bin's remaining capacity, and an indicator function that checks if the remaining capacity is less than half the bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n \n remaining_capacities = bins - item\n \n inverse_bin_numbers = 1 / np.array(range(1, len(bins) + 1))\n \n inverse_remaining_capacities = 1 / remaining_capacities\n \n half_capacities = bins / 2\n \n low_capacity_indicator = np.where(remaining_capacities < half_capacities, 1, 0)\n \n scores = inverse_bin_numbers * inverse_remaining_capacities * low_capacity_indicator\n \n return scores",
"objective": 0.03924,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_1.json
================================================
[
{
"algorithm": "New algorithm: Calculate the reciprocal of the remaining capacity for each bin, with a penalty for bins at maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.maximum(bins - item, 0) - np.maximum(bins - item, 0) / np.maximum(bins, 1)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the minimum rest capacity, avoiding bins with rest capacity equal to the item size; If multiple bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score of assigning an item to each bin.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Check if any bins have a rest capacity equal to the item size.\n if np.any(bins == item):\n return np.zeros_like(bins)\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin. Avoid bins with rest capacity equal to the item size.\n scores = rest_capacities/bins\n scores[rest_capacities == 0] = -np.inf\n \n # If any bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.\n max_capacity = np.max(bins[rest_capacities == np.min(rest_capacities)])\n scores[bins == max_capacity] = np.inf\n\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score for each bin as the maximum between the available capacity and the item size, and set the score to -1 if the rest capacity equals the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.min((bins - item, np.zeros_like(bins)), axis=0)\n scores[bins == bins.max()] = -1\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the average rest capacities of the bins whose rest capacities are smaller than the item size and subtracts minimum rest capacity from all of them to calculate the final score, then assigns the item to the bin with the maximum score.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculates the scores for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for assigning the item to each bin.\n \"\"\"\n # Find the bins with sufficient capacity.\n feasible_bins = bins[bins >= item]\n\n # Calculate the average remaining capacity of the feasible bins.\n avg_capacity = np.mean(feasible_bins)\n\n # Subtract the minimum remaining capacity from all feasible bins.\n scores = feasible_bins - np.min(feasible_bins)\n\n # Calculate the final score for each bin.\n scores = scores + (avg_capacity - scores) * (feasible_bins < avg_capacity)\n\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Assign a score for each bin based on the ratio of the item size to the remaining capacity, with a bias towards larger capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function takes two inputs:\n \n 1. item: The size of the current item to be assigned.\n 2. bins: A Numpy array containing the remaining capacities of feasible bins, which are larger than the item size.\n\n It returns a Numpy array named 'scores', where each element represents the score for assigning the item to the corresponding bin. The goal is to minimize the number of used bins.\n\n The scoring function is based on the ratio of the item size to the remaining capacity, with a bias towards larger capacities.\n \"\"\"\n\n # Calculate the score for each bin as the ratio of the item size to the remaining capacity\n scores = item / bins\n\n # Add a bias towards larger capacities by multiplying the score by the remaining capacity\n scores *= bins\n\n # Return the scores\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate bin scores as the product of normalized capacity and the inverse square root of the bin number, then scale scores relative to the maximum value.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculate bin scores as the product of normalized capacity and the inverse square root of the bin number, then scale scores relative to the maximum value.\n\n Args:\n item (int): Size of current item\n bins (np.ndarray): Rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n np.ndarray: Scores for the bins for assignment\n \"\"\"\n\n normalized_capacities = bins / np.max(bins)\n inverse_sqrt_bin_numbers = 1 / np.sqrt(np.arange(1, len(bins) + 1))\n scores = normalized_capacities * inverse_sqrt_bin_numbers\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": "Assign a score for each bin based on the ratio of the item size to the remaining capacity, with a bias towards smaller capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) ** 2\n # Penalize bins that are almost full\n scores[bins <= item] = 0\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate scores as rest capacity divided by maximum capacity, penalizing bins at maximum capacity and assigning the item to the bin with the highest score, reducing the need for new bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates scores for bins to assign an item.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n\n # Calculate scores as rest capacity divided by maximum capacity.\n scores = bins / np.max(bins)\n\n # Penalize bins at maximum capacity.\n scores[bins == np.max(bins)] = 0\n\n # Reduce the need for new bins.\n scores = scores - (bins - item) / np.max(bins)\n\n return scores",
"objective": 0.05232,
"other_inf": null
},
{
"algorithm": "Compute the ratio between item size and remaining capacity in each bin, penalize maximum capacity bins and normalize the scores by dividing by the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n :param item: the size of the current item\n :type item: int\n :param bins: the rest capacities of the feasible bins\n :type bins: numpy.ndarray\n :return: the scores for the bins for assignment\n :rtype: numpy.ndarray\n \"\"\"\n\n # Compute the ratio between item size and remaining capacity in each bin\n ratios = item / bins\n\n # Penalize bins that are at maximum capacity\n penalties = np.where(bins == item, 1, 0)\n\n # Normalize the scores by dividing by the number of bins\n scores = ratios / penalties / len(bins)\n\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "New algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the scores for each bin based on the rest capacity,\n prioritizing bins with higher rest capacity and lower index.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin after adding the item.\n rest_capacities = bins - item\n\n scores = rest_capacities / bins\n # incrementally penalize bins with larger index\n scores = scores - np.arange(len(bins)) / 10\n\n # Return the scores.\n return scores",
"objective": 0.06208,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": " The score function will assign a score to each bin based on its remaining capacity and a penalty for maximum capacity bins, and then prioritize bins with higher remaining capacity and lower indices for item assignment. ",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score bins for assignment.\n\n Args:\n item: Size of the item to be assigned.\n bins: Remaining capacities of feasible bins.\n\n Returns:\n Scores for the bins.\n \"\"\"\n\n # Check if any bin has remaining capacity equal to the item size. If so,\n # return a score of -1 for that bin. This will prevent it from being used.\n max_bin_capacity = np.max(bins)\n if max_bin_capacity == item:\n scores = -np.ones_like(bins)\n else:\n # Calculate the remaining capacity of each bin as a percentage of the\n # maximum capacity.\n remaining_capacity = bins / max_bin_capacity\n\n # Calculate the penalty for bins with maximum capacity.\n penalty = (bins <= 0)\n\n # Calculate the score for each bin.\n scores = remaining_capacity - penalty\n\n # Prioritize bins with higher remaining capacity and lower indices.\n scores = scores / bins\n\n return scores",
"objective": 0.08794,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_10.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)^2 * (1-((bins - item) > 1 * item)) * (-1e6) ",
"code": "import numpy as np\nnp.seterr(invalid='ignore')\n\ndef score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 1 * item)) * (-1e6)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "The score is the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number, penalized if the rest capacity is less than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the maximum bin capacity.\n max_capacity = np.max(bins)\n\n # Calculate the difference between the bin rest capacity and the item size.\n diff = bins - item\n\n # Calculate the bin number.\n bin_num = np.arange(len(bins)) + 1\n\n # Calculate the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.\n scores = 1 / (max_capacity * diff * bin_num)\n\n # Penalize if the rest capacity is less than twice the item size.\n scores[diff < 2 * item] -= 1\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "{New algorithm: Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the inverse of the ratio of the item size to the maximum capacity, divided by the product of the square root of the bin's number and the ratio of the item size to the maximum capacity.}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Calculate the ratio of the item size to the bin's remaining capacity\n ratio1 = item / (bins - item)\n\n # Calculate the inverse of the ratio of the item size to the maximum capacity\n ratio2 = 1 / (item / bins)\n\n # Calculate the square root of the bin's number\n sqrt_bin_num = np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the ratio of the item size to the maximum capacity\n ratio3 = item / bins\n\n # Calculate the score of each bin\n scores = (ratio1 + ratio2) / (sqrt_bin_num * ratio3)\n\n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^3 * (1-((bins - item) > 3 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**3 * (1-((bins - item) > 3 * item)) * (-1e6)\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Bin score increases with the ratio of item size to the square root of rest capacity plus the bin number, penalizing bins with smaller rest capacity more heavily.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Novel score function for assigning an item to a bin.\n\n The score function increases with the ratio of item size to the square root of rest capacity plus the bin number, penalizing bins with smaller rest capacity more heavily.\n\n :param item: Size of the current item.\n :param bins: Rest capacities of feasible bins, which are larger than the item size.\n :return: Scores for the bins for assignment.\n \"\"\"\n scores = item / np.sqrt(np.maximum(bins - item, 0)) + np.arange(len(bins))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by the reciprocal of the product of its index and the difference between its rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate scores for a set of bins.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: Scores for the bins.\n \"\"\"\n\n # Calculate the difference between the bin rest capacities and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the product of the bin index and the difference.\n scores = 1 / (np.arange(len(bins)) + 1) / diff\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins * (bins - item) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity minus the bin number, favoring bins with larger rest capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / np.maximum(bins - item, 1)) - np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity plus the bin number divided by the maximum capacity, penalizing bins with smaller rest capacity and larger size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item) + bins / bins.max())\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (1 - alpha) * (1 / remaining_capacity) + alpha * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n scores = (1 - alpha) * (1 / (bins - item)) + alpha * np.power(np.arange(len(bins)) + 1, 1 / 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign score as 1e6 divided by the remaining capacity, penalizing bins with a capacity less than half the item size.",
"code": "def score(item, bins):\n scores = 1e6 / (bins - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The backbone idea is to penalize bins with large remaining capacities and/or small item sizes. The new algorithm scores each bin as the ratio of its remaining capacity to the sum of its index and the item size, exponentially penalized by the difference between the remaining capacity and the item size.",
"code": "def score(item, bins):\n remaining_capacities = bins - item\n index_arr = np.arange(len(bins))\n scores = np.exp(-np.abs(remaining_capacities)) / (remaining_capacities + index_arr + 1)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n max_capacity = np.max(bins)\n scores = (item / bins + np.sqrt(np.arange(len(bins)) + 1)) - (item / max_capacity)\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The algorithm calculates each bin's score as the sum of the square root of item size divided by the bin's capacity, square root of the bin's number, and square root of 1 divided by the bin's number, subtracting the bin's capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / bins) + np.sqrt(np.arange(1, len(bins) + 1)) + np.sqrt(1 / np.arange(1, len(bins) + 1)) - bins / np.max(bins)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the square root of the bin's number, divided by the ratio of the item size to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the square root of the bin's number, divided by the ratio of the item size to the maximum capacity.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the ratio of the item size to the bin's remaining capacity.\n ratios = item / bins\n\n # Calculate the square root of the bin's number.\n sqrt_bins = np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score of each bin.\n scores = ratios + sqrt_bins / (item / np.max(bins))\n\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n # Calculate the sum of rest capacity and bin number for each bin.\n denom = bins + np.arange(1, len(bins) + 1)\n\n # Calculate the score for each bin.\n scores = np.sqrt(1.0 / denom) - bins / np.max(bins)\n\n return scores",
"objective": 0.04035,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_11.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)^2 * (1-((bins - item) > 1 * item)) * (-1e6) ",
"code": "import numpy as np\nnp.seterr(invalid='ignore')\n\ndef score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 1 * item)) * (-1e6)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: 1/(square root(bins - item)) + (5000 * (1-((bins - item) > item))) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (np.sqrt(bins - item)) + (5000 * (1 - ((bins - item) > item))) * (-1e6)\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.5 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Compute the score for each bin for assigning an item.\n\n Args:\n item (int): The size of the current item.\n bins (np.ndarray): A Numpy array of integer values representing the remaining capacities of feasible bins.\n\n Returns:\n scores (np.ndarray): A Numpy array of scores for each bin.\n \"\"\"\n \n scores = (bins - item) ** 2 * (1 - ((bins - item) > 0.5 * item)) * (-1e6)\n return scores",
"objective": 0.02757,
"other_inf": null
},
{
"algorithm": "The score is the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number, penalized if the rest capacity is less than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the maximum bin capacity.\n max_capacity = np.max(bins)\n\n # Calculate the difference between the bin rest capacity and the item size.\n diff = bins - item\n\n # Calculate the bin number.\n bin_num = np.arange(len(bins)) + 1\n\n # Calculate the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.\n scores = 1 / (max_capacity * diff * bin_num)\n\n # Penalize if the rest capacity is less than twice the item size.\n scores[diff < 2 * item] -= 1\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "{New algorithm: Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the inverse of the ratio of the item size to the maximum capacity, divided by the product of the square root of the bin's number and the ratio of the item size to the maximum capacity.}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Calculate the ratio of the item size to the bin's remaining capacity\n ratio1 = item / (bins - item)\n\n # Calculate the inverse of the ratio of the item size to the maximum capacity\n ratio2 = 1 / (item / bins)\n\n # Calculate the square root of the bin's number\n sqrt_bin_num = np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the ratio of the item size to the maximum capacity\n ratio3 = item / bins\n\n # Calculate the score of each bin\n scores = (ratio1 + ratio2) / (sqrt_bin_num * ratio3)\n\n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^3 * (1-((bins - item) > 3 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**3 * (1-((bins - item) > 3 * item)) * (-1e6)\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Bin score increases with the ratio of item size to the square root of rest capacity plus the bin number, penalizing bins with smaller rest capacity more heavily.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Novel score function for assigning an item to a bin.\n\n The score function increases with the ratio of item size to the square root of rest capacity plus the bin number, penalizing bins with smaller rest capacity more heavily.\n\n :param item: Size of the current item.\n :param bins: Rest capacities of feasible bins, which are larger than the item size.\n :return: Scores for the bins for assignment.\n \"\"\"\n scores = item / np.sqrt(np.maximum(bins - item, 0)) + np.arange(len(bins))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Modified algorithm: (bins - item)^2 * exp(-(bins - item)/(item * 0.8)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**2 * np.exp(-(bins - item)/(item * 0.8)) * (-1e6)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins * (bins - item) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity minus the bin number, favoring bins with larger rest capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / np.maximum(bins - item, 1)) - np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity plus the bin number divided by the maximum capacity, penalizing bins with smaller rest capacity and larger size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item) + bins / bins.max())\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (1 - alpha) * (1 / remaining_capacity) + alpha * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n scores = (1 - alpha) * (1 / (bins - item)) + alpha * np.power(np.arange(len(bins)) + 1, 1 / 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign score as 1e6 divided by the remaining capacity, penalizing bins with a capacity less than half the item size.",
"code": "def score(item, bins):\n scores = 1e6 / (bins - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The backbone idea is to penalize bins with large remaining capacities and/or small item sizes. The new algorithm scores each bin as the ratio of its remaining capacity to the sum of its index and the item size, exponentially penalized by the difference between the remaining capacity and the item size.",
"code": "def score(item, bins):\n remaining_capacities = bins - item\n index_arr = np.arange(len(bins))\n scores = np.exp(-np.abs(remaining_capacities)) / (remaining_capacities + index_arr + 1)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n max_capacity = np.max(bins)\n scores = (item / bins + np.sqrt(np.arange(len(bins)) + 1)) - (item / max_capacity)\n return scores",
"objective": 0.04004,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_12.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)^2 * (1-((bins - item) > 1 * item)) * (-1e6) ",
"code": "import numpy as np\nnp.seterr(invalid='ignore')\n\ndef score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 1 * item)) * (-1e6)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: 1/(square root(bins - item)) + (5000 * (1-((bins - item) > item))) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (np.sqrt(bins - item)) + (5000 * (1 - ((bins - item) > item))) * (-1e6)\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^1.5 * (1-((bins - item) > 0.7 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**1.5 * (1-((bins - item) > 0.7 * item)) * (-1e6)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.5 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Compute the score for each bin for assigning an item.\n\n Args:\n item (int): The size of the current item.\n bins (np.ndarray): A Numpy array of integer values representing the remaining capacities of feasible bins.\n\n Returns:\n scores (np.ndarray): A Numpy array of scores for each bin.\n \"\"\"\n \n scores = (bins - item) ** 2 * (1 - ((bins - item) > 0.5 * item)) * (-1e6)\n return scores",
"objective": 0.02757,
"other_inf": null
},
{
"algorithm": "The score is the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number, penalized if the rest capacity is less than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the maximum bin capacity.\n max_capacity = np.max(bins)\n\n # Calculate the difference between the bin rest capacity and the item size.\n diff = bins - item\n\n # Calculate the bin number.\n bin_num = np.arange(len(bins)) + 1\n\n # Calculate the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.\n scores = 1 / (max_capacity * diff * bin_num)\n\n # Penalize if the rest capacity is less than twice the item size.\n scores[diff < 2 * item] -= 1\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "{New algorithm: Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the inverse of the ratio of the item size to the maximum capacity, divided by the product of the square root of the bin's number and the ratio of the item size to the maximum capacity.}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Calculate the ratio of the item size to the bin's remaining capacity\n ratio1 = item / (bins - item)\n\n # Calculate the inverse of the ratio of the item size to the maximum capacity\n ratio2 = 1 / (item / bins)\n\n # Calculate the square root of the bin's number\n sqrt_bin_num = np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the ratio of the item size to the maximum capacity\n ratio3 = item / bins\n\n # Calculate the score of each bin\n scores = (ratio1 + ratio2) / (sqrt_bin_num * ratio3)\n\n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^3 * (1-((bins - item) > 3 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**3 * (1-((bins - item) > 3 * item)) * (-1e6)\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "Bin score increases with the ratio of item size to the square root of rest capacity plus the bin number, penalizing bins with smaller rest capacity more heavily.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Novel score function for assigning an item to a bin.\n\n The score function increases with the ratio of item size to the square root of rest capacity plus the bin number, penalizing bins with smaller rest capacity more heavily.\n\n :param item: Size of the current item.\n :param bins: Rest capacities of feasible bins, which are larger than the item size.\n :return: Scores for the bins for assignment.\n \"\"\"\n scores = item / np.sqrt(np.maximum(bins - item, 0)) + np.arange(len(bins))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Modified algorithm: (bins - item)^2 * exp(-(bins - item)/(item * 0.8)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**2 * np.exp(-(bins - item)/(item * 0.8)) * (-1e6)\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins * (bins - item) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity minus the bin number, favoring bins with larger rest capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / np.maximum(bins - item, 1)) - np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity plus the bin number divided by the maximum capacity, penalizing bins with smaller rest capacity and larger size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item) + bins / bins.max())\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (1 - alpha) * (1 / remaining_capacity) + alpha * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n scores = (1 - alpha) * (1 / (bins - item)) + alpha * np.power(np.arange(len(bins)) + 1, 1 / 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign score as 1e6 divided by the remaining capacity, penalizing bins with a capacity less than half the item size.",
"code": "def score(item, bins):\n scores = 1e6 / (bins - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The backbone idea is to penalize bins with large remaining capacities and/or small item sizes. The new algorithm scores each bin as the ratio of its remaining capacity to the sum of its index and the item size, exponentially penalized by the difference between the remaining capacity and the item size.",
"code": "def score(item, bins):\n remaining_capacities = bins - item\n index_arr = np.arange(len(bins))\n scores = np.exp(-np.abs(remaining_capacities)) / (remaining_capacities + index_arr + 1)\n return scores",
"objective": 0.03994,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_13.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)^2 * (1-((bins - item) > 1 * item)) * (-1e6) ",
"code": "import numpy as np\nnp.seterr(invalid='ignore')\n\ndef score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 1 * item)) * (-1e6)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Algorithm: Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)\n\n Args:\n item (int): size of current item\n bins (np.ndarray): rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: scores for the bins for assignment.\n \"\"\"\n\n scores = 1. / np.power((bins - item) / item, 1 / (bins - item)) * (bins - item)\n scores *= (1 - (bins > 2 * item)) * (-1e6)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^2 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (((bins - item) / item)**2) * (bins-item) * (1 - (bins > (2*item))) * (-1e6)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item) ** 2 * (1 - ((bins - item) > threshold * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) ** 2 * (1 - ((bins - item) > item * 0.9)) * (-1e6)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: 1/(square root(bins - item)) + (5000 * (1-((bins - item) > item))) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (np.sqrt(bins - item)) + (5000 * (1 - ((bins - item) > item))) * (-1e6)\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^4 * (1-((bins - item) > 0.95 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**4 * (1-((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^1.5 * (1-((bins - item) > 0.7 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**1.5 * (1-((bins - item) > 0.7 * item)) * (-1e6)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)^2.5 * (1-((bins - item) > 0.5 * item)) * (-1e6) ",
"code": "def score(item, bins):\n scores = (bins - item)**2.5 * (1 - ((bins - item) > 0.5 * item)) * (-1e6)\n return scores",
"objective": 0.02757,
"other_inf": null
},
{
"algorithm": "The score is the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number, penalized if the rest capacity is less than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the maximum bin capacity.\n max_capacity = np.max(bins)\n\n # Calculate the difference between the bin rest capacity and the item size.\n diff = bins - item\n\n # Calculate the bin number.\n bin_num = np.arange(len(bins)) + 1\n\n # Calculate the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.\n scores = 1 / (max_capacity * diff * bin_num)\n\n # Penalize if the rest capacity is less than twice the item size.\n scores[diff < 2 * item] -= 1\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)**2.5 * (1-((bins - item) > 2.5 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n # Calculate the difference between the bin capacity and item size\n diff = bins - item\n\n # Calculate the score using the formula\n scores = (diff**2.5) * (1 - (diff > 2.5 * item)) * (-1e6)\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": "{New algorithm: Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the inverse of the ratio of the item size to the maximum capacity, divided by the product of the square root of the bin's number and the ratio of the item size to the maximum capacity.}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Calculate the ratio of the item size to the bin's remaining capacity\n ratio1 = item / (bins - item)\n\n # Calculate the inverse of the ratio of the item size to the maximum capacity\n ratio2 = 1 / (item / bins)\n\n # Calculate the square root of the bin's number\n sqrt_bin_num = np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the ratio of the item size to the maximum capacity\n ratio3 = item / bins\n\n # Calculate the score of each bin\n scores = (ratio1 + ratio2) / (sqrt_bin_num * ratio3)\n\n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^3 * (1-((bins - item) > 3 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**3 * (1-((bins - item) > 3 * item)) * (-1e6)\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "New algorithm: Score is the ratio of item size to the rest capacity minus the bin number, penalizing bins with larger rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) - np.arange(len(bins))\n return scores",
"objective": 0.03854,
"other_inf": null
},
{
"algorithm": "Bin score increases with the ratio of item size to the square root of rest capacity plus the bin number, penalizing bins with smaller rest capacity more heavily.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Novel score function for assigning an item to a bin.\n\n The score function increases with the ratio of item size to the square root of rest capacity plus the bin number, penalizing bins with smaller rest capacity more heavily.\n\n :param item: Size of the current item.\n :param bins: Rest capacities of feasible bins, which are larger than the item size.\n :return: Scores for the bins for assignment.\n \"\"\"\n scores = item / np.sqrt(np.maximum(bins - item, 0)) + np.arange(len(bins))\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Modified algorithm: (bins - item)^2 * exp(-(bins - item)/(item * 0.8)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**2 * np.exp(-(bins - item)/(item * 0.8)) * (-1e6)\n return scores",
"objective": 0.03884,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_14.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign score as (bins - item)**(item/bins) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**(item/bins) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Modified version: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin in 'bins' for the item of size 'item'.\n The score is computed as follows:\n score = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6))\n The bin with the maximum score is selected for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n # Compute the scores for each bin.\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2 * item)) * (-1e6))\n\n # Return the scores.\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score as the product of the difference between the bin rest capacity and the item size, the ratio of the item size to the bin rest capacity, and a penalty if the rest capacity is less than the sum of the item size and a margin value.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculates the score for each bin in bins for assigning an item of size item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of scores for each bin in bins.\n \"\"\"\n # Calculate the difference between the bin rest capacity and the item size\n diff = bins - item\n\n # Calculate the ratio of the item size to the bin rest capacity\n ratio = item / bins\n\n # Calculate a penalty if the rest capacity is less than the sum of the item size and a margin value\n penalty = np.where(diff < item, diff - item, 0)\n\n # Calculate the score as the product of the difference, ratio, and penalty\n scores = diff * ratio * penalty\n\n return scores",
"objective": 0.01358,
"other_inf": null
},
{
"algorithm": "Algorithm: Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)\n\n Args:\n item (int): size of current item\n bins (np.ndarray): rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: scores for the bins for assignment.\n \"\"\"\n\n scores = 1. / np.power((bins - item) / item, 1 / (bins - item)) * (bins - item)\n scores *= (1 - (bins > 2 * item)) * (-1e6)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^2 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (((bins - item) / item)**2) * (bins-item) * (1 - (bins > (2*item))) * (-1e6)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "\nAlgorithm: Modified Algorithm: (bins - item)^4 * (1-((bins - item) > 0.85 * item)) * (-1e6)\n",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n A novel score function that scoring a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Check if the item can fit in any bin.\n if np.all(bins < item):\n return np.zeros_like(bins)\n\n # Calculate the scores for each bin.\n scores = (bins - item) ** 4 * (1 - ((bins - item) > 0.85 * item)) * (-1e6)\n\n # Set the score of any bin that cannot fit the item to -inf.\n scores[bins < item] = -np.inf\n\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item) ** 2 * (1 - ((bins - item) > threshold * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) ** 2 * (1 - ((bins - item) > item * 0.9)) * (-1e6)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Modified algorithm: (bins - item)^2 * (1-((bins - item) > 0.75 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**2 * (1 - (bins - item > 0.75*item)) * (-1e6)\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^4 * (1-((bins - item) > 0.95 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**4 * (1-((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^6 * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n I need help designing a novel score function that scoring a set of bins to assign an item. In each step, the item will be assigned to the bin with the maximum score. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final goal is to minimize the number of used bins.\n I have existing algorithm idea as follows: \n New algorithm: (bins - item)^6 * (1-((bins - item) > 0.9 * item)) * (-1e6)\n Please implement it in Python as a function named score. This function should accept 2 input(s): 'item', 'bins'. The function should return 1 output(s): 'scores'. 'item' and 'bins' are the size of current item and the rest capacities of feasible bins, which are larger than the item size. The output named 'scores' is the scores for the bins for assignment. Note that 'item' is of type int, 'bins' is a Numpy array include integer values, and 'scores' should be Numpy array. The function should be complicated enough to promote performance. Avoid utilizing the random component, and it is crucial to maintain self-consistency.\n Do not give any additional explanations!\n \"\"\"\n delta = bins - item\n scores = np.power(delta, 6) * (1 - (delta > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^1.5 * (1-((bins - item) > 0.7 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**1.5 * (1-((bins - item) > 0.7 * item)) * (-1e6)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)^2.5 * (1-((bins - item) > 0.5 * item)) * (-1e6) ",
"code": "def score(item, bins):\n scores = (bins - item)**2.5 * (1 - ((bins - item) > 0.5 * item)) * (-1e6)\n return scores",
"objective": 0.02757,
"other_inf": null
},
{
"algorithm": "The score is the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number, penalized if the rest capacity is less than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the maximum bin capacity.\n max_capacity = np.max(bins)\n\n # Calculate the difference between the bin rest capacity and the item size.\n diff = bins - item\n\n # Calculate the bin number.\n bin_num = np.arange(len(bins)) + 1\n\n # Calculate the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.\n scores = 1 / (max_capacity * diff * bin_num)\n\n # Penalize if the rest capacity is less than twice the item size.\n scores[diff < 2 * item] -= 1\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)**2.5 * (1-((bins - item) > 2.5 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n # Calculate the difference between the bin capacity and item size\n diff = bins - item\n\n # Calculate the score using the formula\n scores = (diff**2.5) * (1 - (diff > 2.5 * item)) * (-1e6)\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins-item)**(2+rand()) * (1-((bins-item) > (2+rand()) * item)) * (-1e6)",
"code": "def score(item, bins):\n \"\"\"Scores a set of bins to assign an item to.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger\n than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin capacity and the item size.\n diff = bins - item\n\n # Calculate the score for each bin.\n scores = np.power(diff, 2 + np.random.rand()) * (1 - (diff > (2 + np.random.rand()) * item)) * (-1e6)\n\n return scores",
"objective": 0.03179,
"other_inf": null
},
{
"algorithm": "{New algorithm: Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the inverse of the ratio of the item size to the maximum capacity, divided by the product of the square root of the bin's number and the ratio of the item size to the maximum capacity.}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Calculate the ratio of the item size to the bin's remaining capacity\n ratio1 = item / (bins - item)\n\n # Calculate the inverse of the ratio of the item size to the maximum capacity\n ratio2 = 1 / (item / bins)\n\n # Calculate the square root of the bin's number\n sqrt_bin_num = np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the ratio of the item size to the maximum capacity\n ratio3 = item / bins\n\n # Calculate the score of each bin\n scores = (ratio1 + ratio2) / (sqrt_bin_num * ratio3)\n\n return scores",
"objective": 0.0332,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_15.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign score as (bins - item)**(item/bins) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**(item/bins) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Modified version: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin in 'bins' for the item of size 'item'.\n The score is computed as follows:\n score = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6))\n The bin with the maximum score is selected for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n # Compute the scores for each bin.\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2 * item)) * (-1e6))\n\n # Return the scores.\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score as the product of the difference between the bin rest capacity and the item size, the ratio of the item size to the bin rest capacity, and a penalty if the rest capacity is less than the sum of the item size and a margin value.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculates the score for each bin in bins for assigning an item of size item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of scores for each bin in bins.\n \"\"\"\n # Calculate the difference between the bin rest capacity and the item size\n diff = bins - item\n\n # Calculate the ratio of the item size to the bin rest capacity\n ratio = item / bins\n\n # Calculate a penalty if the rest capacity is less than the sum of the item size and a margin value\n penalty = np.where(diff < item, diff - item, 0)\n\n # Calculate the score as the product of the difference, ratio, and penalty\n scores = diff * ratio * penalty\n\n return scores",
"objective": 0.01358,
"other_inf": null
},
{
"algorithm": "Algorithm: Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * (-1e6)\n\n Args:\n item (int): size of current item\n bins (np.ndarray): rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: scores for the bins for assignment.\n \"\"\"\n\n scores = 1. / np.power((bins - item) / item, 1 / (bins - item)) * (bins - item)\n scores *= (1 - (bins > 2 * item)) * (-1e6)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * log(bins) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for assigning an item to a bin.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the remaining capacities of the feasible bins.\n\n Returns:\n A Numpy array of scores for the bins.\n \"\"\"\n\n # Check if any bins have enough capacity to hold the item.\n feasible_bins = bins[bins >= item]\n if len(feasible_bins) == 0:\n return np.array([0])\n\n # Calculate the scores for the feasible bins.\n scores = 1 / ((bins - item) / item)**(1 / (bins - item)) * (bins - item) * (1 - (bins > 2 * item)) * np.log(bins) * (-1e6)\n\n # Return the scores.\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^2 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (((bins - item) / item)**2) * (bins-item) * (1 - (bins > (2*item))) * (-1e6)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New Algorithm: Modified Algorithm: (bins - item)^3 * (1-((bins - item) > 0.85 * item)) * (-1e5)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculate the score for each bin in bins for assigning an item of size item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of integers representing the remaining capacities of feasible bins, \n which are larger than the item size.\n\n Returns:\n np.array: A numpy array of scores for the bins.\n \"\"\"\n\n # Calculate the difference between the bin capacities and the item size.\n diff = bins - item\n\n # Calculate the score for each bin using the given formula.\n scores = np.power(diff, 3) * (1 - (diff > 0.85 * item)) * (-1e5)\n\n # Return the scores.\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item) ** 2 * (1 - ((bins - item) > threshold * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) ** 2 * (1 - ((bins - item) > item * 0.9)) * (-1e6)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Modified algorithm: (bins - item)^2 * (1-((bins - item) > 0.75 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**2 * (1 - (bins - item > 0.75*item)) * (-1e6)\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)**2 * (1-((bins - item) > 0.9 * item)) * (-10**6) ",
"code": "import numpy as np\ndef score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.9 * item)) * (-10**6)\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^4 * (1-((bins - item) > 0.95 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**4 * (1-((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^6 * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n I need help designing a novel score function that scoring a set of bins to assign an item. In each step, the item will be assigned to the bin with the maximum score. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final goal is to minimize the number of used bins.\n I have existing algorithm idea as follows: \n New algorithm: (bins - item)^6 * (1-((bins - item) > 0.9 * item)) * (-1e6)\n Please implement it in Python as a function named score. This function should accept 2 input(s): 'item', 'bins'. The function should return 1 output(s): 'scores'. 'item' and 'bins' are the size of current item and the rest capacities of feasible bins, which are larger than the item size. The output named 'scores' is the scores for the bins for assignment. Note that 'item' is of type int, 'bins' is a Numpy array include integer values, and 'scores' should be Numpy array. The function should be complicated enough to promote performance. Avoid utilizing the random component, and it is crucial to maintain self-consistency.\n Do not give any additional explanations!\n \"\"\"\n delta = bins - item\n scores = np.power(delta, 6) * (1 - (delta > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^1.5 * (1-((bins - item) > 0.7 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**1.5 * (1-((bins - item) > 0.7 * item)) * (-1e6)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: Modified algorithm: (bins - item)^2 * (1-((bins - item) > 0.6 * item)) * (-1e6) ",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function takes an item size and a list of bin capacities and returns a score for each bin.\n\n The score is calculated as follows:\n (bins - item)^2 * (1-((bins - item) > 0.6 * item)) * (-1e6)\n\n If the remaining capacity of a bin is equal to the maximum capacity, it will not be used.\n\n Args:\n item: The size of the item to be assigned.\n bins: A list of the remaining capacities of the feasible bins.\n\n Returns:\n A numpy array of scores for each bin.\n \"\"\"\n\n scores = (bins - item)**2 * (1-np.where(bins - item > 0.6 * item, 1, 0)) * (-1e6)\n return scores",
"objective": 0.02475,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)^2.5 * (1-((bins - item) > 0.5 * item)) * (-1e6) ",
"code": "def score(item, bins):\n scores = (bins - item)**2.5 * (1 - ((bins - item) > 0.5 * item)) * (-1e6)\n return scores",
"objective": 0.02757,
"other_inf": null
},
{
"algorithm": "The score is the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number, penalized if the rest capacity is less than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the maximum bin capacity.\n max_capacity = np.max(bins)\n\n # Calculate the difference between the bin rest capacity and the item size.\n diff = bins - item\n\n # Calculate the bin number.\n bin_num = np.arange(len(bins)) + 1\n\n # Calculate the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.\n scores = 1 / (max_capacity * diff * bin_num)\n\n # Penalize if the rest capacity is less than twice the item size.\n scores[diff < 2 * item] -= 1\n\n return scores",
"objective": 0.02777,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_16.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)**2 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**2 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) / item) * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Modified version: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin in 'bins' for the item of size 'item'.\n The score is computed as follows:\n score = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6))\n The bin with the maximum score is selected for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n # Compute the scores for each bin.\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2 * item)) * (-1e6))\n\n # Return the scores.\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score as the product of the difference between the bin rest capacity and the item size, the ratio of the item size to the bin rest capacity, and a penalty if the rest capacity is less than the sum of the item size and a margin value.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculates the score for each bin in bins for assigning an item of size item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of scores for each bin in bins.\n \"\"\"\n # Calculate the difference between the bin rest capacity and the item size\n diff = bins - item\n\n # Calculate the ratio of the item size to the bin rest capacity\n ratio = item / bins\n\n # Calculate a penalty if the rest capacity is less than the sum of the item size and a margin value\n penalty = np.where(diff < item, diff - item, 0)\n\n # Calculate the score as the product of the difference, ratio, and penalty\n scores = diff * ratio * penalty\n\n return scores",
"objective": 0.01358,
"other_inf": null
},
{
"algorithm": "Assigns a score as (bins - item) * ((bins - item)/item)^(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * ((bins - item)/item)**(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * log(bins + 1) * (-1e5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (np.maximum((bins - item) / item, 1e-10))**(1 / (bins - item)) * (bins - item) * (1 - (bins > 2 * item)) * np.log(bins + 1) * (-1e5)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^2 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (((bins - item) / item)**2) * (bins-item) * (1 - (bins > (2*item))) * (-1e6)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New Algorithm: Modified Algorithm: (bins - item)^3 * (1-((bins - item) > 0.85 * item)) * (-1e5)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculate the score for each bin in bins for assigning an item of size item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of integers representing the remaining capacities of feasible bins, \n which are larger than the item size.\n\n Returns:\n np.array: A numpy array of scores for the bins.\n \"\"\"\n\n # Calculate the difference between the bin capacities and the item size.\n diff = bins - item\n\n # Calculate the score for each bin using the given formula.\n scores = np.power(diff, 3) * (1 - (diff > 0.85 * item)) * (-1e5)\n\n # Return the scores.\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item) ** 2 * (1 - ((bins - item) > threshold * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) ** 2 * (1 - ((bins - item) > item * 0.9)) * (-1e6)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "Modified algorithm: (bins - item)^2 * (1-((bins - item) > 0.75 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**2 * (1 - (bins - item > 0.75*item)) * (-1e6)\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)**2 * (1-((bins - item) > 0.9 * item)) * (-10**6) ",
"code": "import numpy as np\ndef score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.9 * item)) * (-10**6)\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^4 * (1-((bins - item) > 0.95 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**4 * (1-((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01942,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^6 * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n I need help designing a novel score function that scoring a set of bins to assign an item. In each step, the item will be assigned to the bin with the maximum score. If the rest capacity of a bin equals the maximum capacity, it will not be used. The final goal is to minimize the number of used bins.\n I have existing algorithm idea as follows: \n New algorithm: (bins - item)^6 * (1-((bins - item) > 0.9 * item)) * (-1e6)\n Please implement it in Python as a function named score. This function should accept 2 input(s): 'item', 'bins'. The function should return 1 output(s): 'scores'. 'item' and 'bins' are the size of current item and the rest capacities of feasible bins, which are larger than the item size. The output named 'scores' is the scores for the bins for assignment. Note that 'item' is of type int, 'bins' is a Numpy array include integer values, and 'scores' should be Numpy array. The function should be complicated enough to promote performance. Avoid utilizing the random component, and it is crucial to maintain self-consistency.\n Do not give any additional explanations!\n \"\"\"\n delta = bins - item\n scores = np.power(delta, 6) * (1 - (delta > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: (bins - item)^2 * (1-((bins - item) > 0.7 * item)) * (-1e5)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.7 * item)) * (-1e5)\n return scores",
"objective": 0.02385,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^3 * (1 - e^(-1*(bins - item)/item)) * (1-((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**3 * (1 - np.exp(-1*(bins - item)/item)) * (1-((bins - item) > 0.6 * item)) * (-1e6)\n return scores",
"objective": 0.02475,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)^2.5 * (1-((bins - item) > 0.5 * item)) * (-1e6) ",
"code": "def score(item, bins):\n scores = (bins - item)**2.5 * (1 - ((bins - item) > 0.5 * item)) * (-1e6)\n return scores",
"objective": 0.02757,
"other_inf": null
},
{
"algorithm": "The score is the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number, penalized if the rest capacity is less than twice the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the maximum bin capacity.\n max_capacity = np.max(bins)\n\n # Calculate the difference between the bin rest capacity and the item size.\n diff = bins - item\n\n # Calculate the bin number.\n bin_num = np.arange(len(bins)) + 1\n\n # Calculate the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.\n scores = 1 / (max_capacity * diff * bin_num)\n\n # Penalize if the rest capacity is less than twice the item size.\n scores[diff < 2 * item] -= 1\n\n return scores",
"objective": 0.02777,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_17.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "(bins - item)**3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))",
"code": "def score(item, bins):\n scores = (bins - item) ** 3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.5/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) * 0.5 / item) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) / item) * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Modified version: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin in 'bins' for the item of size 'item'.\n The score is computed as follows:\n score = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6))\n The bin with the maximum score is selected for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n # Compute the scores for each bin.\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2 * item)) * (-1e6))\n\n # Return the scores.\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score as the product of the difference between the bin rest capacity and the item size, the ratio of the item size to the bin rest capacity, and a penalty if the rest capacity is less than the sum of the item size and a margin value.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"\n Calculates the score for each bin in bins for assigning an item of size item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of scores for each bin in bins.\n \"\"\"\n # Calculate the difference between the bin rest capacity and the item size\n diff = bins - item\n\n # Calculate the ratio of the item size to the bin rest capacity\n ratio = item / bins\n\n # Calculate a penalty if the rest capacity is less than the sum of the item size and a margin value\n penalty = np.where(diff < item, diff - item, 0)\n\n # Calculate the score as the product of the difference, ratio, and penalty\n scores = diff * ratio * penalty\n\n return scores",
"objective": 0.01358,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign a score based on the difference between bin capacity and item size, incorporating various modifiers to account for underutilization penalties and thresholds. My new algorithm assigns a score as (bins - item)**2 * (1 - ((bins - item)/item)^(1/2)) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item) ** 2 * (1 - ((bins - item) / item) ** (1 / 2)) * (1 - (bins >= 2 * item)) * (-1e6)\n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^1 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / item)**1 * (bins - item) * (1 - (bins > 2 * item)) * (-1e6)\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign score as 1/((bins - item)/item) * (bins - item) * (1 - (bins > 2 * item)) * (-1e9) * (1 + log(item)/5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item)/item) * (bins - item) * (1 - (bins > 2 * item)) * (-1e9) * (1 + np.log(item)/5)\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Assigns a score as (bins - item) * ((bins - item)/item)^(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * ((bins - item)/item)**(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * log(bins + 1) * (-1e5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (np.maximum((bins - item) / item, 1e-10))**(1 / (bins - item)) * (bins - item) * (1 - (bins > 2 * item)) * np.log(bins + 1) * (-1e5)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^2 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (((bins - item) / item)**2) * (bins-item) * (1 - (bins > (2*item))) * (-1e6)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item) * ((bins/item)^3 + 5) * (1-((bins - item) > 0.85 * item)) * (-1e5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * ((bins / item) ** 3 + 5) * (1 - ((bins - item) > 0.85 * item)) * (-1e5)\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^4 * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**4 * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "New algorithm: ((bins - item) / (bins - item)^2) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins - item) / (bins - item)**2) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01821,
"other_inf": null
},
{
"algorithm": "Modified algorithm: (bins - item)^2 * (1-((bins - item) > 0.75 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**2 * (1 - (bins - item > 0.75*item)) * (-1e6)\n return scores",
"objective": 0.01861,
"other_inf": null
},
{
"algorithm": " New algorithm: (bins - item)**2 * (1-((bins - item) > 0.9 * item)) * (-10**6) ",
"code": "import numpy as np\ndef score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.9 * item)) * (-10**6)\n return scores",
"objective": 0.01922,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^4 * (1-((bins - item) > 0.95 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**4 * (1-((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01942,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_18.json
================================================
[
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-1e6))",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the scores for a set of bins to assign an item.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-1e6))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign a score as log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "def score(item, bins):\n scores = np.log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "(bins - item)**3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))",
"code": "def score(item, bins):\n scores = (bins - item) ** 3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) * (1-((bins - item) > 0.95 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes a score for each bin for assigning an item to it.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (numpy.array): The remaining capacities of the feasible bins.\n\n Returns:\n numpy.array: The scores for the bins.\n \"\"\"\n\n # Check if any bins can hold the item.\n if np.all(bins < item):\n return np.zeros(bins.shape)\n\n # Compute the scores for the bins.\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)\n\n # Mask out the bins that cannot hold the item.\n scores[bins < item] = -np.inf\n\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.5/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) * 0.5 / item) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) / item) * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Modified version: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin in 'bins' for the item of size 'item'.\n The score is computed as follows:\n score = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6))\n The bin with the maximum score is selected for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n # Compute the scores for each bin.\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2 * item)) * (-1e6))\n\n # Return the scores.\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))",
"code": "def score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))\n return scores",
"objective": 0.01358,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign a score based on the difference between bin capacity and item size, incorporating various modifiers to account for underutilization penalties and thresholds. My new algorithm assigns a score as (bins - item)**2 * (1 - ((bins - item)/item)^(1/2)) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item) ** 2 * (1 - ((bins - item) / item) ** (1 / 2)) * (1 - (bins >= 2 * item)) * (-1e6)\n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^1 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / item)**1 * (bins - item) * (1 - (bins > 2 * item)) * (-1e6)\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign score as 1/((bins - item)/item) * (bins - item) * (1 - (bins > 2 * item)) * (-1e9) * (1 + log(item)/5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item)/item) * (bins - item) * (1 - (bins > 2 * item)) * (-1e9) * (1 + np.log(item)/5)\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Assigns a score as (bins - item) * ((bins - item)/item)^(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * ((bins - item)/item)**(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * log(bins + 1) * (-1e5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (np.maximum((bins - item) / item, 1e-10))**(1 / (bins - item)) * (bins - item) * (1 - (bins > 2 * item)) * np.log(bins + 1) * (-1e5)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score as exp(-(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item) * ((bins/item)^3 + 5) * (1-((bins - item) > 0.85 * item)) * (-1e5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * ((bins / item) ** 3 + 5) * (1 - ((bins - item) > 0.85 * item)) * (-1e5)\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^4 * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**4 * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01761,
"other_inf": null
},
{
"algorithm": "New algorithm: ((bins - item) / (bins - item)^2) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins - item) / (bins - item)**2) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01821,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_19.json
================================================
[
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.6/item) * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin in 'bins' for assigning an item of size 'item'.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the remaining capacities of the bins.\n\n Returns:\n A Numpy array of scores for each bin.\n \"\"\"\n\n # Compute the score for each bin.\n scores = np.log(bins - item) / (1 + (bins - item) * 0.6 / item) * (1 - ((bins - item) > 0.8 * item)) * (-1e6)\n\n # Return the scores.\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign a score as log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "def score(item, bins):\n scores = np.log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "(bins - item)**3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))",
"code": "def score(item, bins):\n scores = (bins - item) ** 3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) * (1-((bins - item) > 0.95 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes a score for each bin for assigning an item to it.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (numpy.array): The remaining capacities of the feasible bins.\n\n Returns:\n numpy.array: The scores for the bins.\n \"\"\"\n\n # Check if any bins can hold the item.\n if np.all(bins < item):\n return np.zeros(bins.shape)\n\n # Compute the scores for the bins.\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)\n\n # Mask out the bins that cannot hold the item.\n scores[bins < item] = -np.inf\n\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.5/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) * 0.5 / item) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) / item) * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Modified version: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin in 'bins' for the item of size 'item'.\n The score is computed as follows:\n score = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6))\n The bin with the maximum score is selected for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n # Compute the scores for each bin.\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2 * item)) * (-1e6))\n\n # Return the scores.\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))",
"code": "def score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))\n return scores",
"objective": 0.01358,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign a score based on the difference between bin capacity and item size, incorporating various modifiers to account for underutilization penalties and thresholds. My new algorithm assigns a score as (bins - item)**2 * (1 - ((bins - item)/item)^(1/2)) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item) ** 2 * (1 - ((bins - item) / item) ** (1 / 2)) * (1 - (bins >= 2 * item)) * (-1e6)\n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^1 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / item)**1 * (bins - item) * (1 - (bins > 2 * item)) * (-1e6)\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign score as 1/((bins - item)/item) * (bins - item) * (1 - (bins > 2 * item)) * (-1e9) * (1 + log(item)/5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item)/item) * (bins - item) * (1 - (bins > 2 * item)) * (-1e9) * (1 + np.log(item)/5)\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Assigns a score as (bins - item) * ((bins - item)/item)^(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * ((bins - item)/item)**(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)\n return scores",
"objective": 0.0157,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Assigns score as 1/((bins - item)/item)^(1/(bins-item)) * (bins - item) * (1 - (bins > 2*item)) * log(bins + 1) * (-1e5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (np.maximum((bins - item) / item, 1e-10))**(1 / (bins - item)) * (bins - item) * (1 - (bins > 2 * item)) * np.log(bins + 1) * (-1e5)\n return scores",
"objective": 0.0163,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score as exp(-(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(-(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item) * ((bins/item)^3 + 5) * (1-((bins - item) > 0.85 * item)) * (-1e5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * ((bins / item) ** 3 + 5) * (1 - ((bins - item) > 0.85 * item)) * (-1e5)\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.0167,
"other_inf": null
},
{
"algorithm": "Assign score as ln(bins - item) * (1 - ((bins - item) > 0.9 * item)) * (1 - ((bins - item) < 0.1 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the difference between bins and item\n dif = bins - item\n # Calculate the ratio of difference and item\n ratio = dif / item\n # Calculate the natural logarithm of bins - item\n ln_bins_item = np.log(bins - item)\n # Calculate the score\n scores = ln_bins_item * (1 - (ratio > 0.9)) * (1 - (ratio < 0.1)) * (-1e6)\n return scores",
"objective": 0.0169,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_2.json
================================================
[
{
"algorithm": "Assign a score based on the ratio of the bin capacity to the difference between the bin capacity and the item size, weighted by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins / np.maximum(0, bins - item)) * np.arange(len(bins))\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the sum of the rest capacity and the bin number\n inv_sum_rest_cap_bin_num = 1.0 / (bins + np.arange(1, bins.size + 1))\n # Calculate the rest capacity divided by the maximum capacity\n rest_cap_div_max_cap = bins / np.max(bins)\n # Calculate the score\n scores = inv_sum_rest_cap_bin_num - rest_cap_div_max_cap\n # Return the scores\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Modified version: Calculate bin scores as the product of normalized capacity and the negative exponential of the bin number multiplied by the item size ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores for an item. The bin with the highest score should be assigned the item.\n\n Args:\n item: int, size of the item to be assigned\n bins: Numpy array, rest capacities of feasible bins\n\n Returns:\n scores: Numpy array, scores for the bins\n \"\"\"\n\n normalized_capacities = bins / np.max(bins)\n exponential_weights = np.exp(-bins * item / np.max(bins))\n scores = normalized_capacities * exponential_weights\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the minimum rest capacity, avoiding bins with rest capacity equal to the item size; If multiple bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score of assigning an item to each bin.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Check if any bins have a rest capacity equal to the item size.\n if np.any(bins == item):\n return np.zeros_like(bins)\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin. Avoid bins with rest capacity equal to the item size.\n scores = rest_capacities/bins\n scores[rest_capacities == 0] = -np.inf\n \n # If any bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.\n max_capacity = np.max(bins[rest_capacities == np.min(rest_capacities)])\n scores[bins == max_capacity] = np.inf\n\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin scores as the product of normalized capacity and the exponential decay of bin number, then scale scores relative to the maximum value.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates bin scores for item assignment.\n\n Args:\n item: Size of the item to be assigned.\n bins: Numpy array of remaining capacities of feasible bins.\n\n Returns:\n Numpy array of bin scores.\n \"\"\"\n\n # Calculate normalized capacities.\n capacities = bins / np.max(bins)\n\n # Calculate exponential decay of bin numbers.\n decay = np.exp(-np.arange(len(bins)))\n\n # Calculate bin scores.\n scores = capacities * decay\n\n # Scale scores relative to the maximum value.\n scores /= np.max(scores)\n\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate the score for each bin as the maximum between the available capacity and the item size, and set the score to -1 if the rest capacity equals the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.min((bins - item, np.zeros_like(bins)), axis=0)\n scores[bins == bins.max()] = -1\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the average rest capacities of the bins whose rest capacities are smaller than the item size and subtracts minimum rest capacity from all of them to calculate the final score, then assigns the item to the bin with the maximum score.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculates the scores for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for assigning the item to each bin.\n \"\"\"\n # Find the bins with sufficient capacity.\n feasible_bins = bins[bins >= item]\n\n # Calculate the average remaining capacity of the feasible bins.\n avg_capacity = np.mean(feasible_bins)\n\n # Subtract the minimum remaining capacity from all feasible bins.\n scores = feasible_bins - np.min(feasible_bins)\n\n # Calculate the final score for each bin.\n scores = scores + (avg_capacity - scores) * (feasible_bins < avg_capacity)\n\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Calculate bin scores as the sum of normalized capacity and the inverse of the bin number, scaled by the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores for item assignment.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Normalize bin capacities\n max_capacity = np.max(bins)\n normalized_bins = bins / max_capacity\n\n # Calculate bin scores\n scores = normalized_bins + 1 / np.arange(1, len(bins) + 1)\n\n # Scale scores by maximum score\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": "Assign a score for each bin based on the ratio of the item size to the remaining capacity, with a bias towards larger capacities.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function takes two inputs:\n \n 1. item: The size of the current item to be assigned.\n 2. bins: A Numpy array containing the remaining capacities of feasible bins, which are larger than the item size.\n\n It returns a Numpy array named 'scores', where each element represents the score for assigning the item to the corresponding bin. The goal is to minimize the number of used bins.\n\n The scoring function is based on the ratio of the item size to the remaining capacity, with a bias towards larger capacities.\n \"\"\"\n\n # Calculate the score for each bin as the ratio of the item size to the remaining capacity\n scores = item / bins\n\n # Add a bias towards larger capacities by multiplying the score by the remaining capacity\n scores *= bins\n\n # Return the scores\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate bin scores as the product of normalized capacity and the inverse square root of the bin number, then scale scores relative to the maximum value.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculate bin scores as the product of normalized capacity and the inverse square root of the bin number, then scale scores relative to the maximum value.\n\n Args:\n item (int): Size of current item\n bins (np.ndarray): Rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n np.ndarray: Scores for the bins for assignment\n \"\"\"\n\n normalized_capacities = bins / np.max(bins)\n inverse_sqrt_bin_numbers = 1 / np.sqrt(np.arange(1, len(bins) + 1))\n scores = normalized_capacities * inverse_sqrt_bin_numbers\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin that has the smallest rest capacity after adding the item size and penalize any bin with rest capacity equal to maximum capacity.",
"code": "def score(item, bins):\n scores = np.zeros_like(bins)\n free_bins = bins >= item # Mark feasible bins\n scores[free_bins] = - bins[free_bins] # Prioritize bins with less space left\n scores[bins == item] -= bins[bins == item] # Extra penalty for overfilled bins\n scores[bins == bins.max()] = -bins.max() # Prevent using full bins\n return scores",
"objective": 0.0486,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin scores as the product of normalized capacity and the exponential decay of bin number, then weight the scores by inverse of the square root of capacity and scale scores relative to the maximum value.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate bin scores for item assignment.\n\n Args:\n item (int): Size of current item.\n bins (np.ndarray): Rest capacities of feasible bins.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n # Calculate normalized capacity\n normalized_capacities = bins / np.amax(bins)\n\n # Calculate exponential decay of bin number\n bin_numbers = np.arange(len(bins))\n exponential_decay = np.exp(-bin_numbers / 10)\n\n # Calculate bin scores\n scores = normalized_capacities * exponential_decay\n\n # Weight scores by inverse of square root of capacity\n scores = scores / np.sqrt(bins)\n\n # Scale scores relative to maximum value\n scores = scores / np.amax(scores)\n\n # Return scores\n return scores",
"objective": 0.049,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign a score for each bin based on the ratio of the item size to the remaining capacity, with a bias towards larger capacities. Item size is also considered in a score equation",
"code": "def score(item, bins):\n scores = bins / (bins - item)\n scores[bins - item <= 0] = -float('inf')\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate scores as rest capacity divided by maximum capacity, penalizing bins at maximum capacity and assigning the item to the bin with the highest score, reducing the need for new bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates scores for bins to assign an item.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n\n # Calculate scores as rest capacity divided by maximum capacity.\n scores = bins / np.max(bins)\n\n # Penalize bins at maximum capacity.\n scores[bins == np.max(bins)] = 0\n\n # Reduce the need for new bins.\n scores = scores - (bins - item) / np.max(bins)\n\n return scores",
"objective": 0.05232,
"other_inf": null
},
{
"algorithm": "Compute the ratio between item size and remaining capacity in each bin, penalize maximum capacity bins and normalize the scores by dividing by the number of bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n :param item: the size of the current item\n :type item: int\n :param bins: the rest capacities of the feasible bins\n :type bins: numpy.ndarray\n :return: the scores for the bins for assignment\n :rtype: numpy.ndarray\n \"\"\"\n\n # Compute the ratio between item size and remaining capacity in each bin\n ratios = item / bins\n\n # Penalize bins that are at maximum capacity\n penalties = np.where(bins == item, 1, 0)\n\n # Normalize the scores by dividing by the number of bins\n scores = ratios / penalties / len(bins)\n\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin scores as the product of reversed normalized capacity and the square root of the bin number, then scale scores relative to the maximum value.",
"code": "import numpy as np\ndef score(item, bins):\n \"\"\"Calculates the bin scores for assigning an item to a bin.\n \n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the remaining capacities of the feasible bins, \n which are larger than the item size.\n\n Returns:\n scores: A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n # Calculate the reversed normalized capacities.\n cap = 1 - bins / bins.max()\n\n # Calculate the square root of the bin numbers.\n bin_num = np.arange(len(bins)) + 1\n root = np.sqrt(bin_num)\n\n # Calculate the bin scores.\n scores = cap * root\n\n # Scale the scores relative to the maximum value.\n scores /= scores.max()\n\n return scores",
"objective": 0.05433,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_20.json
================================================
[
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.6/item) * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin in 'bins' for assigning an item of size 'item'.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the remaining capacities of the bins.\n\n Returns:\n A Numpy array of scores for each bin.\n \"\"\"\n\n # Compute the score for each bin.\n scores = np.log(bins - item) / (1 + (bins - item) * 0.6 / item) * (1 - ((bins - item) > 0.8 * item)) * (-1e6)\n\n # Return the scores.\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) * (1 + (bins - item)/item) * (1 - ((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Assigns an item to a bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): Size of the current item.\n bins (np.ndarray): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n bins_capacity = bins - item\n scores = np.log(bins_capacity) * (1 + bins_capacity/item) * (1 - (bins_capacity > 0.6 * item)) * (-1e6)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.4/item) * (1-((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n availability_factor = np.log((bins - item) / (1 + (bins - item) * 0.4 / item))\n overflow_factor = 1 - ((bins - item) > 0.6 * item)\n scores = availability_factor * overflow_factor * (-1e6)\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign a score as log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "def score(item, bins):\n scores = np.log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "(bins - item)**3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))",
"code": "def score(item, bins):\n scores = (bins - item) ** 3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.5/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) * 0.5 / item) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) / item) * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (1 - ((bins - item) >= 0.90 * item)) * (-1e6)",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (1 - ((bins - item) >= 0.90 * item)) * (-1e6)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Assign score as log(bins - item)/(1 - (bins - item)/item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = np.log(bins - item) / (1 - (bins - item) / item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Modified version: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin in 'bins' for the item of size 'item'.\n The score is computed as follows:\n score = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e6))\n The bin with the maximum score is selected for assignment. If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The goal is to minimize the number of used bins.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for the bins.\n \"\"\"\n\n # Compute the scores for each bin.\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins >= 2 * item)) * (-1e6))\n\n # Return the scores.\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))",
"code": "def score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))\n return scores",
"objective": 0.01358,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign a score based on the difference between bin capacity and item size, incorporating various modifiers to account for underutilization penalties and thresholds. My new algorithm assigns a score as (bins - item)**2 * (1 - ((bins - item)/item)^(1/2)) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item) ** 2 * (1 - ((bins - item) / item) ** (1 / 2)) * (1 - (bins >= 2 * item)) * (-1e6)\n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^1 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / item)**1 * (bins - item) * (1 - (bins > 2 * item)) * (-1e6)\n return scores",
"objective": 0.01459,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e9)}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e9)}\n \n Args:\n item: The size of current item.\n bins: A Numpy array include integer values, representing the rest capacities of feasible bins, which are larger than the item size.\n \n Returns:\n scores: The scores for the bins for assignment. This should be a Numpy array.\n \"\"\"\n\n # Compute the scores for each bin.\n delta = bins - item\n term1 = np.power(delta, 1 / (delta / item))\n term2 = 1 - (bins >= 2 * item)\n term3 = np.power(-1e9, term2)\n scores = np.multiply(np.multiply(term1, term2), term3)\n\n return scores",
"objective": 0.01479,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign score as 1/((bins - item)/item) * (bins - item) * (1 - (bins > 2 * item)) * (-1e9) * (1 + log(item)/5)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item)/item) * (bins - item) * (1 - (bins > 2 * item)) * (-1e9) * (1 + np.log(item)/5)\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Assigns a score as (bins - item) * ((bins - item)/item)^(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) * ((bins - item)/item)**(1/(bins - item)) * (1 - (bins >=2*item)) * (-1e6)\n return scores",
"objective": 0.0157,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_21.json
================================================
[
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "The backbone idea is to give high scores to bins with sufficient remaining capacity and penalize bins that are nearly full. My new algorithm: log(bins - item) / log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / np.log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.6/item) * (1-((bins - item) > 0.8 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score for each bin in 'bins' for assigning an item of size 'item'.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the remaining capacities of the bins.\n\n Returns:\n A Numpy array of scores for each bin.\n \"\"\"\n\n # Compute the score for each bin.\n scores = np.log(bins - item) / (1 + (bins - item) * 0.6 / item) * (1 - ((bins - item) > 0.8 * item)) * (-1e6)\n\n # Return the scores.\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7)}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7))\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) * (1 + (bins - item)/item) * (1 - ((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Assigns an item to a bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): Size of the current item.\n bins (np.ndarray): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n bins_capacity = bins - item\n scores = np.log(bins_capacity) * (1 + bins_capacity/item) * (1 - (bins_capacity > 0.6 * item)) * (-1e6)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.4/item) * (1-((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n availability_factor = np.log((bins - item) / (1 + (bins - item) * 0.4 / item))\n overflow_factor = 1 - ((bins - item) > 0.6 * item)\n scores = availability_factor * overflow_factor * (-1e6)\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign a score as log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "def score(item, bins):\n scores = np.log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "(bins - item)**3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))",
"code": "def score(item, bins):\n scores = (bins - item) ** 3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)",
"code": "def score(item, bins):\n \"\"\"\n Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n\n Args:\n item (int): Size of current item\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n np.array: Scores for the bins for assignment\n \"\"\"\n\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/log(bins) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = np.log(bins - item) / np.log(bins) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) / item) * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (1 - ((bins - item) >= 0.90 * item)) * (-1e6)",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (1 - ((bins - item) >= 0.90 * item)) * (-1e6)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Assign score as log(bins - item)/(1 - (bins - item)/item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = np.log(bins - item) / (1 - (bins - item) / item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e8)}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e8)}\n\n Args:\n item: size of current item\n bins: rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n scores: the scores for the bins for assignment\n \"\"\"\n\n scores = np.power(bins - item, 1 / ((bins - item) / item) * (1 - (bins >= 2 * item)) * (-1e8))\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))",
"code": "def score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))\n return scores",
"objective": 0.01358,
"other_inf": null
},
{
"algorithm": "The common backbone idea in the provided algorithms is to assign a score based on the difference between bin capacity and item size, incorporating various modifiers to account for underutilization penalties and thresholds. My new algorithm assigns a score as (bins - item)**2 * (1 - ((bins - item)/item)^(1/2)) * (1 - (bins >= 2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item) ** 2 * (1 - ((bins - item) / item) ** (1 / 2)) * (1 - (bins >= 2 * item)) * (-1e6)\n return scores",
"objective": 0.01429,
"other_inf": null
},
{
"algorithm": "Assign score as 1/((bins - item)/item)^1 * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / ((bins - item) / item)**1 * (bins - item) * (1 - (bins > 2 * item)) * (-1e6)\n return scores",
"objective": 0.01459,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_22.json
================================================
[
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "The backbone idea is to give high scores to bins with sufficient remaining capacity and penalize bins that are nearly full. My new algorithm: log(bins - item) / log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / np.log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "Assign a score as log(max(bins - item, 0)) * 1 / (1 + log(min(bins - item, bins / 2))) * (1 - ((bins - item) > 0.8*item)) * (1 - ((bins - item) > 1.8*item)) * (1 - (bins >= 2.2*item)) * (-1e9)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(np.clip(bins - item, 0, None)) * 1 / (1 + np.log(np.clip(bins - item, 0, bins / 2))) * (1 - ((bins - item) > 0.8 * item)) * (1 - ((bins - item) > 1.8 * item)) * (1 - (bins >= 2.2 * item)) * (-1e9)\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7)}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7))\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) * (1 + (bins - item)/item) * (1 - ((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Assigns an item to a bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): Size of the current item.\n bins (np.ndarray): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n bins_capacity = bins - item\n scores = np.log(bins_capacity) * (1 + bins_capacity/item) * (1 - (bins_capacity > 0.6 * item)) * (-1e6)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.4/item) * (1-((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n availability_factor = np.log((bins - item) / (1 + (bins - item) * 0.4 / item))\n overflow_factor = 1 - ((bins - item) > 0.6 * item)\n scores = availability_factor * overflow_factor * (-1e6)\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**((1/((bins - item)/item)) * (bins < 1.9*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**((1/((bins - item)/item)) * (bins < 1.9*item)) * (-1e6)\n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign a score as log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "def score(item, bins):\n scores = np.log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "(bins - item)**3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))",
"code": "def score(item, bins):\n scores = (bins - item) ** 3 * (-1e6) * (1 - ((bins - item) > 0.5 * bins))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)",
"code": "def score(item, bins):\n \"\"\"\n Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n\n Args:\n item (int): Size of current item\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n np.array: Scores for the bins for assignment\n \"\"\"\n\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/log(bins) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = np.log(bins - item) / np.log(bins) * (1 - ((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6) * item / bins",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6) * item / bins\n return scores",
"objective": 0.01217,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) / item) * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (1 - ((bins - item) >= 0.90 * item)) * (-1e6)",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (1 - ((bins - item) >= 0.90 * item)) * (-1e6)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Assign score as log(bins - item)/(1 - (bins - item)/item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = np.log(bins - item) / (1 - (bins - item) / item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e8)}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e8)}\n\n Args:\n item: size of current item\n bins: rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n scores: the scores for the bins for assignment\n \"\"\"\n\n scores = np.power(bins - item, 1 / ((bins - item) / item) * (1 - (bins >= 2 * item)) * (-1e8))\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "New algorithm: (np.log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-2e6))",
"code": "def score(item, bins):\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-2e6)\n return scores",
"objective": 0.01358,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_23.json
================================================
[
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "The backbone idea is to give high scores to bins with sufficient remaining capacity and penalize bins that are nearly full. My new algorithm: log(bins - item) / log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / np.log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "Assign a score as log(max(bins - item, 0)) * 1 / (1 + log(min(bins - item, bins / 2))) * (1 - ((bins - item) > 0.8*item)) * (1 - ((bins - item) > 1.8*item)) * (1 - (bins >= 2.2*item)) * (-1e9)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(np.clip(bins - item, 0, None)) * 1 / (1 + np.log(np.clip(bins - item, 0, bins / 2))) * (1 - ((bins - item) > 0.8 * item)) * (1 - ((bins - item) > 1.8 * item)) * (1 - (bins >= 2.2 * item)) * (-1e9)\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7)}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7))\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) * (1 + (bins - item)/item) * (1 - ((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Assigns an item to a bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): Size of the current item.\n bins (np.ndarray): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n bins_capacity = bins - item\n scores = np.log(bins_capacity) * (1 + bins_capacity/item) * (1 - (bins_capacity > 0.6 * item)) * (-1e6)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.4/item) * (1-((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n availability_factor = np.log((bins - item) / (1 + (bins - item) * 0.4 / item))\n overflow_factor = 1 - ((bins - item) > 0.6 * item)\n scores = availability_factor * overflow_factor * (-1e6)\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**((1/((bins - item)/item)) * (bins < 1.9*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**((1/((bins - item)/item)) * (bins < 1.9*item)) * (-1e6)\n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign a score as log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "def score(item, bins):\n scores = np.log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": " Modified algorithm: (bins - item)**2 * (-1e6) * (1 - ((bins - item) / bins > 0.5)) ",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (-1e6) * (1 - ((bins - item) / bins > 0.5))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)",
"code": "def score(item, bins):\n \"\"\"\n Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n\n Args:\n item (int): Size of current item\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n np.array: Scores for the bins for assignment\n \"\"\"\n\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.90 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.90 * item)) * (-1e6)\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6) * item / bins",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6) * item / bins\n return scores",
"objective": 0.01217,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) / item) * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assigns score as (bins - item)^(1/((bins - item)/item) * (1 - (bins > 2*item)) * (1 - (bins > 2.5*item)) * (-1e7)",
"code": "def score(item, bins):\n scores = (bins - item)**(1/((bins - item)/item)) * (1 - (bins > 2*item)) * (1 - (bins > 2.5*item)) * (-1e7)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Assign score as log(bins - item)/(1 - (bins - item)/item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = np.log(bins - item) / (1 - (bins - item) / item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e8)}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins >= 2*item)) * (-1e8)}\n\n Args:\n item: size of current item\n bins: rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n scores: the scores for the bins for assignment\n \"\"\"\n\n scores = np.power(bins - item, 1 / ((bins - item) / item) * (1 - (bins >= 2 * item)) * (-1e8))\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "New algorithm: (np.log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-2e6))",
"code": "def score(item, bins):\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-2e6)\n return scores",
"objective": 0.01358,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_24.json
================================================
[
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "The backbone idea is to give high scores to bins with sufficient remaining capacity and penalize bins that are nearly full. My new algorithm: log(bins - item) / log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / np.log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) / log(item) * (1 - ((bins - item) > 0.8 * item)) * (-1e6)",
"code": "import numpy as np\nfrom numba import njit\n\n@njit\ndef score(item: int, bins: np.ndarray):\n scores = np.log(bins - item) / np.log(item) * (\n 1 - ((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7)}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7))\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) * (1 + (bins - item)/item) * (1 - ((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Assigns an item to a bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): Size of the current item.\n bins (np.ndarray): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n bins_capacity = bins - item\n scores = np.log(bins_capacity) * (1 + bins_capacity/item) * (1 - (bins_capacity > 0.6 * item)) * (-1e6)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.4/item) * (1-((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n availability_factor = np.log((bins - item) / (1 + (bins - item) * 0.4 / item))\n overflow_factor = 1 - ((bins - item) > 0.6 * item)\n scores = availability_factor * overflow_factor * (-1e6)\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**((1/((bins - item)/item)) * (bins < 1.9*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**((1/((bins - item)/item)) * (bins < 1.9*item)) * (-1e6)\n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign a score as log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "def score(item, bins):\n scores = np.log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": " Modified algorithm: (bins - item)**2 * (-1e6) * (1 - ((bins - item) / bins > 0.5)) ",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (-1e6) * (1 - ((bins - item) / bins > 0.5))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)",
"code": "def score(item, bins):\n \"\"\"\n Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n\n Args:\n item (int): Size of current item\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n np.array: Scores for the bins for assignment\n \"\"\"\n\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.90 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.90 * item)) * (-1e6)\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6) * item / bins",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6) * item / bins\n return scores",
"objective": 0.01217,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)/item) * (1-((bins - item) > 0.9 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / (1 + (bins - item) / item) * (1-((bins - item) > 0.9 * item)) * (-1e6)\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assigns score as (bins - item)^(1/((bins - item)/item) * (1 - (bins > 2*item)) * (1 - (bins > 2.5*item)) * (-1e7)",
"code": "def score(item, bins):\n scores = (bins - item)**(1/((bins - item)/item)) * (1 - (bins > 2*item)) * (1 - (bins > 2.5*item)) * (-1e7)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
},
{
"algorithm": "Assign score as log(bins - item)/(1 - (bins - item)/item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)",
"code": "def score(item, bins):\n scores = np.log(bins - item) / (1 - (bins - item) / item) * (bins-item) * (1 - (bins>2*item)) * (-1e6)\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)^{1/(bins - item) * (1 - (bins >= 2*item)) * (-1e8)}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**(1 / (bins - item) * (1 - (bins >= 2*item)) * (-1e8))\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))",
"code": "def score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.5 * item)) * (-1e6))\n return scores",
"objective": 0.01358,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_25.json
================================================
[
{
"algorithm": "New algorithm: (log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (np.log(bins - item) * (1 - ((bins - item) > 0.75 * item)) * (-3e6))\n return scores",
"objective": 0.00895,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.7*item))) * (-1e5)",
"code": "def score(item, bins):\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.7*item))) * (-1e5)\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "The backbone idea is to give high scores to bins with sufficient remaining capacity and penalize bins that are nearly full. My new algorithm: log(bins - item) / log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) / np.log(item) * (1 - ((bins - item) > 0.7 * item)) * (-1e6)\n return scores",
"objective": 0.00966,
"other_inf": null
},
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) / log(item) * (1 - ((bins - item) > 0.8 * item)) * (-1e6)",
"code": "import numpy as np\nfrom numba import njit\n\n@njit\ndef score(item: int, bins: np.ndarray):\n scores = np.log(bins - item) / np.log(item) * (\n 1 - ((bins - item) > 0.8 * item)) * (-1e6)\n return scores",
"objective": 0.01026,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)^{1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7)}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.8*item)) * (1 - (bins > 2.2*item)) * (-1e7))\n return scores",
"objective": 0.01067,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item) * (1 + (bins - item)/item) * (1 - ((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Assigns an item to a bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item (int): Size of the current item.\n bins (np.ndarray): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n bins_capacity = bins - item\n scores = np.log(bins_capacity) * (1 + bins_capacity/item) * (1 - (bins_capacity > 0.6 * item)) * (-1e6)\n return scores",
"objective": 0.01087,
"other_inf": null
},
{
"algorithm": "New algorithm: log(bins - item)/(1 + (bins - item)*0.4/item) * (1-((bins - item) > 0.6 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n availability_factor = np.log((bins - item) / (1 + (bins - item) * 0.4 / item))\n overflow_factor = 1 - ((bins - item) > 0.6 * item)\n scores = availability_factor * overflow_factor * (-1e6)\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**((1/((bins - item)/item)) * (bins < 1.9*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**((1/((bins - item)/item)) * (bins < 1.9*item)) * (-1e6)\n return scores",
"objective": 0.01117,
"other_inf": null
},
{
"algorithm": "Algorithm: Assign a score as log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)",
"code": "def score(item, bins):\n scores = np.log(1+(bins-item)**2/(bins**2-item**2)) * (1 - (bins > 2*item)) * (-1e5)\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": " Modified algorithm: (bins - item)**2 * (-1e6) * (1 - ((bins - item) / bins > 0.5)) ",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (-1e6) * (1 - ((bins - item) / bins > 0.5))\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Assign a score as the clip(2 * log(bins - item), 0, 1e7) * (1 - (bins - item) / item) * (1 - (bins - item) / bins) * (1 - (bins > 2 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates a score for each bin in 'bins' for assigning an item of size 'item'.\n The score is calculated as follows:\n clip(2 * log(bins - item), 0, 1e7) * (1 - (bins - item) / item) * (1 - (bins - item) / bins) * (1 - (bins > 2 * item)) * (-1e6)\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the remaining capacities of feasible bins.\n Returns:\n A Numpy array of scores for each bin.\n \"\"\"\n\n scores = np.clip(2 * np.log(bins - item), 0, 1e7)\n scores *= (1 - (bins - item) / item)\n scores *= (1 - (bins - item) / bins)\n scores *= (1 - (bins > 2 * item)) * (-1e6)\n return scores",
"objective": 0.01167,
"other_inf": null
},
{
"algorithm": "New algorithm: Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)",
"code": "def score(item, bins):\n \"\"\"\n Assigns score as (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n\n Args:\n item (int): Size of current item\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n np.array: Scores for the bins for assignment\n \"\"\"\n\n scores = (bins - item)**(1/((bins - item)/item) * (1 - (bins > 1.9*item))) * (-1e6)\n return scores",
"objective": 0.01177,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6)\n return scores",
"objective": 0.01197,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.90 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.90 * item)) * (-1e6)\n return scores",
"objective": 0.01207,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6) * item / bins",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.log(bins - item) * (1 - ((bins - item) > 0.95 * item)) * (-1e6) * item / bins\n return scores",
"objective": 0.01217,
"other_inf": null
},
{
"algorithm": "Score as (bins - item) ^ 2 * log (bins - item) * (1 - (bins-item)/item) * (1 - (bins>2*item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins - item)**2 * np.log(bins - item) * (1 - (bins - item) / item) * (1 - (bins > 2*item)) * (-1e6))\n return scores",
"objective": 0.01248,
"other_inf": null
},
{
"algorithm": "New algorithm: item * log(bins - item) * (1 - ((bins - item) > 0.90 * item)) * (-1e6) * item / bins",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item * np.log(bins - item) * (1 - ((bins - item) > 0.90 * item)) * (-1e6) * item / bins\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assigns score as (bins - item)^(1/((bins - item)/item) * (1 - (bins > 2*item)) * (1 - (bins > 2.5*item)) * (-1e7)",
"code": "def score(item, bins):\n scores = (bins - item)**(1/((bins - item)/item)) * (1 - (bins > 2*item)) * (1 - (bins > 2.5*item)) * (-1e7)\n return scores",
"objective": 0.01268,
"other_inf": null
},
{
"algorithm": "Divide the remaining capacity of each bin by the item size to calculate a penalty, and add the penalty to the score of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n penalty = np.ceil(bins / item)\n scores = bins - penalty * item\n return scores",
"objective": 0.01298,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_3.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "{Algorithm: The new algorithm divides item size by bin's rest capacity, multiplies the fraction by a value less than 1, and adds 1 to the product.}",
"code": "def score(item, bins):\n scores = (item / bins) * 0.99 + 1\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the sum of the rest capacity and the bin number\n inv_sum_rest_cap_bin_num = 1.0 / (bins + np.arange(1, bins.size + 1))\n # Calculate the rest capacity divided by the maximum capacity\n rest_cap_div_max_cap = bins / np.max(bins)\n # Calculate the score\n scores = inv_sum_rest_cap_bin_num - rest_cap_div_max_cap\n # Return the scores\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n # Calculate the sum of rest capacity and bin number for each bin.\n denom = bins + np.arange(1, len(bins) + 1)\n\n # Calculate the score for each bin.\n scores = np.sqrt(1.0 / denom) - bins / np.max(bins)\n\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Modified version: Calculate bin scores as the product of normalized capacity and the negative exponential of the bin number multiplied by the item size ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores for an item. The bin with the highest score should be assigned the item.\n\n Args:\n item: int, size of the item to be assigned\n bins: Numpy array, rest capacities of feasible bins\n\n Returns:\n scores: Numpy array, scores for the bins\n \"\"\"\n\n normalized_capacities = bins / np.max(bins)\n exponential_weights = np.exp(-bins * item / np.max(bins))\n scores = normalized_capacities * exponential_weights\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score as the ratio of the item size to the bin capacity minus the bin number, rewarding bins with larger capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins - np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the minimum rest capacity, avoiding bins with rest capacity equal to the item size; If multiple bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score of assigning an item to each bin.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Check if any bins have a rest capacity equal to the item size.\n if np.any(bins == item):\n return np.zeros_like(bins)\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin. Avoid bins with rest capacity equal to the item size.\n scores = rest_capacities/bins\n scores[rest_capacities == 0] = -np.inf\n \n # If any bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.\n max_capacity = np.max(bins[rest_capacities == np.min(rest_capacities)])\n scores[bins == max_capacity] = np.inf\n\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin scores as the product of normalized capacity and the exponential decay of bin number, then scale scores relative to the maximum value.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates bin scores for item assignment.\n\n Args:\n item: Size of the item to be assigned.\n bins: Numpy array of remaining capacities of feasible bins.\n\n Returns:\n Numpy array of bin scores.\n \"\"\"\n\n # Calculate normalized capacities.\n capacities = bins / np.max(bins)\n\n # Calculate exponential decay of bin numbers.\n decay = np.exp(-np.arange(len(bins)))\n\n # Calculate bin scores.\n scores = capacities * decay\n\n # Scale scores relative to the maximum value.\n scores /= np.max(scores)\n\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm divides the average rest capacity of feasible bins by the item size and subtracts the result from the rest capacity of each feasible bin to calculate the final score.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[bins >= item]\n if len(feasible_bins) == 0:\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "Apply a penalty to bins where remaining capacity is greater than 1.5 times the item size, but increase the penalty for bins with remaining capacity greater than 2 times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n # Assign bonus score for full bins\n full_bins_mask = (bins == item)\n scores[full_bins_mask] += 1000\n \n # Penalize bins with large remaining capacity\n penalty_mask_1 = (bins > 1.5 * item) & (bins < 2 * item)\n scores[penalty_mask_1] -= 100\n \n penalty_mask_2 = (bins >= 2 * item)\n scores[penalty_mask_2] -= 200\n \n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Calculate the score as the normalized capacity of the bin multiplied by the inverse square root of the current bin number, plus an exponentially decaying number related to the capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin.\n\n The item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins.\n \"\"\"\n\n # Calculate the normalized capacity of each bin.\n normalized_capacities = bins / np.max(bins)\n\n # Calculate the inverse square root of the current bin number.\n inverse_square_roots = 1 / np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the exponentially decaying number related to the capacity and the item size.\n decaying_numbers = np.exp(-(bins - item) / item)\n\n # Calculate the score for each bin.\n scores = normalized_capacities * inverse_square_roots * decaying_numbers\n\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the average rest capacities of the bins whose rest capacities are smaller than the item size and subtracts minimum rest capacity from all of them to calculate the final score, then assigns the item to the bin with the maximum score.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculates the scores for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for assigning the item to each bin.\n \"\"\"\n # Find the bins with sufficient capacity.\n feasible_bins = bins[bins >= item]\n\n # Calculate the average remaining capacity of the feasible bins.\n avg_capacity = np.mean(feasible_bins)\n\n # Subtract the minimum remaining capacity from all feasible bins.\n scores = feasible_bins - np.min(feasible_bins)\n\n # Calculate the final score for each bin.\n scores = scores + (avg_capacity - scores) * (feasible_bins < avg_capacity)\n\n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Calculate bin scores as the sum of normalized capacity and the inverse of the bin number, scaled by the maximum score.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores for item assignment.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Normalize bin capacities\n max_capacity = np.max(bins)\n normalized_bins = bins / max_capacity\n\n # Calculate bin scores\n scores = normalized_bins + 1 / np.arange(1, len(bins) + 1)\n\n # Scale scores by maximum score\n return scores",
"objective": 0.04367,
"other_inf": null
},
{
"algorithm": " The new algorithm multiplies each bin's score by the ratio of the item's weight to the bin's base capacity, ensuring priority is given to bins that can accommodate the item with less wasted capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of integer values representing the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of scores for the bins.\n \"\"\"\n\n # Calculate the ratio of the item's weight to each bin's base capacity.\n ratios = item / bins\n\n # Multiply each bin's score by the ratio.\n scores = bins * ratios\n\n # Return the scores.\n return scores",
"objective": 0.04518,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculate bin scores as the product of normalized capacity and the inverse square root of the bin number, then scale scores relative to the maximum value.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculate bin scores as the product of normalized capacity and the inverse square root of the bin number, then scale scores relative to the maximum value.\n\n Args:\n item (int): Size of current item\n bins (np.ndarray): Rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n np.ndarray: Scores for the bins for assignment\n \"\"\"\n\n normalized_capacities = bins / np.max(bins)\n inverse_sqrt_bin_numbers = 1 / np.sqrt(np.arange(1, len(bins) + 1))\n scores = normalized_capacities * inverse_sqrt_bin_numbers\n return scores",
"objective": 0.04588,
"other_inf": null
},
{
"algorithm": "The common backbone idea is to use a combination of the item size, bin capacity, and bin number to calculate a score for each bin. Our new algorithm calculates the score as the sum of the normalized capacity and the normalized exponential decay of the item size multiplied by the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates a score for each bin in 'bins' for assigning an item of size 'item'.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the remaining capacities of feasible bins.\n\n Returns:\n A Numpy array of scores for the bins.\n \"\"\"\n normalized_capacity = bins / np.max(bins)\n normalized_item_size = item / np.max(bins)\n bin_numbers = np.arange(len(bins)) + 1\n normalized_exponential_decay = np.exp(-normalized_item_size * bin_numbers)\n scores = normalized_capacity + normalized_exponential_decay\n return scores",
"objective": 0.04668,
"other_inf": null
},
{
"algorithm": "Assign an item to the bin that has the smallest rest capacity after adding the item size and penalize any bin with rest capacity equal to maximum capacity.",
"code": "def score(item, bins):\n scores = np.zeros_like(bins)\n free_bins = bins >= item # Mark feasible bins\n scores[free_bins] = - bins[free_bins] # Prioritize bins with less space left\n scores[bins == item] -= bins[bins == item] # Extra penalty for overfilled bins\n scores[bins == bins.max()] = -bins.max() # Prevent using full bins\n return scores",
"objective": 0.0486,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin scores as the product of normalized capacity and the exponential decay of bin number, then weight the scores by inverse of the square root of capacity and scale scores relative to the maximum value.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate bin scores for item assignment.\n\n Args:\n item (int): Size of current item.\n bins (np.ndarray): Rest capacities of feasible bins.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n # Calculate normalized capacity\n normalized_capacities = bins / np.amax(bins)\n\n # Calculate exponential decay of bin number\n bin_numbers = np.arange(len(bins))\n exponential_decay = np.exp(-bin_numbers / 10)\n\n # Calculate bin scores\n scores = normalized_capacities * exponential_decay\n\n # Weight scores by inverse of square root of capacity\n scores = scores / np.sqrt(bins)\n\n # Scale scores relative to maximum value\n scores = scores / np.amax(scores)\n\n # Return scores\n return scores",
"objective": 0.049,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_4.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by the reciprocal of the product of its index and the difference between its rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate scores for a set of bins.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: Scores for the bins.\n \"\"\"\n\n # Calculate the difference between the bin rest capacities and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the product of the bin index and the difference.\n scores = 1 / (np.arange(len(bins)) + 1) / diff\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity minus the bin number, favoring bins with larger rest capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / np.maximum(bins - item, 1)) - np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": " Algorithm: This algorithm includes a new parameter, alpha, and uses the score function: score = alpha * (1 / remaining_capacity) + (1 - alpha) * (cube root of bin number). ",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n remaining_capacity = bins - item\n cube_root_bin_number = np.power(np.arange(len(bins)) + 1, 1 / 3)\n scores = alpha * (1 / remaining_capacity) + (1 - alpha) * cube_root_bin_number\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "{Algorithm: The new algorithm divides item size by bin's rest capacity, multiplies the fraction by a value less than 1, and adds 1 to the product.}",
"code": "def score(item, bins):\n scores = (item / bins) * 0.99 + 1\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the sum of the rest capacity and the bin number\n inv_sum_rest_cap_bin_num = 1.0 / (bins + np.arange(1, bins.size + 1))\n # Calculate the rest capacity divided by the maximum capacity\n rest_cap_div_max_cap = bins / np.max(bins)\n # Calculate the score\n scores = inv_sum_rest_cap_bin_num - rest_cap_div_max_cap\n # Return the scores\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n # Calculate the sum of rest capacity and bin number for each bin.\n denom = bins + np.arange(1, len(bins) + 1)\n\n # Calculate the score for each bin.\n scores = np.sqrt(1.0 / denom) - bins / np.max(bins)\n\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": " New algorithm: Score function: scores = bins - (bins - item)**3",
"code": "def score(item, bins):\n feasible_bins = bins[bins >= item]\n scores = feasible_bins - (feasible_bins - item)**3\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified version: Calculate bin scores as the product of normalized capacity and the negative exponential of the bin number multiplied by the item size ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores for an item. The bin with the highest score should be assigned the item.\n\n Args:\n item: int, size of the item to be assigned\n bins: Numpy array, rest capacities of feasible bins\n\n Returns:\n scores: Numpy array, scores for the bins\n \"\"\"\n\n normalized_capacities = bins / np.max(bins)\n exponential_weights = np.exp(-bins * item / np.max(bins))\n scores = normalized_capacities * exponential_weights\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score as the ratio of the item size to the bin capacity minus the bin number, rewarding bins with larger capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins - np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New Algorithm: Increase the penalty factor for bins with remaining capacity greater than item size by a parameter 'k'.\nCode:\ndef new_score(item, bins, k):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > k * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-np.maximum(0, (bins - item) > item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the minimum rest capacity, avoiding bins with rest capacity equal to the item size; If multiple bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score of assigning an item to each bin.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Check if any bins have a rest capacity equal to the item size.\n if np.any(bins == item):\n return np.zeros_like(bins)\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin. Avoid bins with rest capacity equal to the item size.\n scores = rest_capacities/bins\n scores[rest_capacities == 0] = -np.inf\n \n # If any bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.\n max_capacity = np.max(bins[rest_capacities == np.min(rest_capacities)])\n scores[bins == max_capacity] = np.inf\n\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "Calculate bin scores as a linear combination of bins' remaining capacities and their position in the bin list.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculate bin scores as a linear combination of bins' remaining capacities and their position in the bin list.\n\n Parameters:\n item: Size of current item.\n bins: Numpy array include integer values, which are the rest capacities of feasible bins.\n\n Returns:\n Numpy array named 'scores' with the scores for the bins for assignment.\n \"\"\"\n pos_scores = np.arange(len(bins)) + 1 # Positional scores\n\n # Capacities are divided by the item size to normalize the scores\n cap_scores = bins / item\n\n # Calculate the final scores\n scores = 0.5 * cap_scores + 0.5 * pos_scores\n\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin scores as the product of remaining capacity and the exponential decay of bin number, excluding already full bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores as the product of remaining capacity and the exponential decay of bin number, excluding already full bins.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n bins = bins[bins >= item]\n num_bins = len(bins)\n scores = bins * np.exp(-np.arange(num_bins))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm divides the average rest capacity of feasible bins by the item size and subtracts the result from the rest capacity of each feasible bin to calculate the final score.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[bins >= item]\n if len(feasible_bins) == 0:\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the sum of the inverse of the remaining capacity and the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[bins >= item]\n scores = 1 / feasible_bins + np.sqrt(np.arange(len(feasible_bins)))\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "Calculate the score as the normalized capacity of the bin multiplied by the inverse square root of the current bin number, plus an exponentially decaying number related to the capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin.\n\n The item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins.\n \"\"\"\n\n # Calculate the normalized capacity of each bin.\n normalized_capacities = bins / np.max(bins)\n\n # Calculate the inverse square root of the current bin number.\n inverse_square_roots = 1 / np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the exponentially decaying number related to the capacity and the item size.\n decaying_numbers = np.exp(-(bins - item) / item)\n\n # Calculate the score for each bin.\n scores = normalized_capacities * inverse_square_roots * decaying_numbers\n\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the product of the inverse of the bin number and the ratio of item size to the rest capacity, favoring both bins with larger rest capacity and smaller bin numbers.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes the score for assigning an item to each bin.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the remaining capacities of the feasible bins.\n\n Returns:\n A numpy array of the scores for each bin.\n \"\"\"\n\n # Compute the inverse of the bin numbers.\n inv_bin_nums = 1.0 / np.arange(1, len(bins) + 1)\n\n # Compute the ratio of the item size to the remaining capacity of each bin.\n item_to_rest_capacity_ratios = item / bins\n\n # Compute the scores.\n scores = inv_bin_nums * item_to_rest_capacity_ratios\n\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "The new algorithm finds the average rest capacities of the bins whose rest capacities are smaller than the item size and subtracts minimum rest capacity from all of them to calculate the final score, then assigns the item to the bin with the maximum score.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculates the scores for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: The remaining capacities of the feasible bins.\n\n Returns:\n The scores for assigning the item to each bin.\n \"\"\"\n # Find the bins with sufficient capacity.\n feasible_bins = bins[bins >= item]\n\n # Calculate the average remaining capacity of the feasible bins.\n avg_capacity = np.mean(feasible_bins)\n\n # Subtract the minimum remaining capacity from all feasible bins.\n scores = feasible_bins - np.min(feasible_bins)\n\n # Calculate the final score for each bin.\n scores = scores + (avg_capacity - scores) * (feasible_bins < avg_capacity)\n\n return scores",
"objective": 0.04276,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_5.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by the reciprocal of the product of its index and the difference between its rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate scores for a set of bins.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: Scores for the bins.\n \"\"\"\n\n # Calculate the difference between the bin rest capacities and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the product of the bin index and the difference.\n scores = 1 / (np.arange(len(bins)) + 1) / diff\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity minus the bin number, favoring bins with larger rest capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / np.maximum(bins - item, 1)) - np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (1 - alpha) * (1 / remaining_capacity) + alpha * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n scores = (1 - alpha) * (1 / (bins - item)) + alpha * np.power(np.arange(len(bins)) + 1, 1 / 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "{Algorithm: The new algorithm divides item size by bin's rest capacity, multiplies the fraction by a value less than 1, and adds 1 to the product.}",
"code": "def score(item, bins):\n scores = (item / bins) * 0.99 + 1\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the sum of the rest capacity and the bin number\n inv_sum_rest_cap_bin_num = 1.0 / (bins + np.arange(1, bins.size + 1))\n # Calculate the rest capacity divided by the maximum capacity\n rest_cap_div_max_cap = bins / np.max(bins)\n # Calculate the score\n scores = inv_sum_rest_cap_bin_num - rest_cap_div_max_cap\n # Return the scores\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n max_capacity = np.max(bins)\n scores = (item / bins + np.sqrt(np.arange(len(bins)) + 1)) - (item / max_capacity)\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n # Calculate the sum of rest capacity and bin number for each bin.\n denom = bins + np.arange(1, len(bins) + 1)\n\n # Calculate the score for each bin.\n scores = np.sqrt(1.0 / denom) - bins / np.max(bins)\n\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Algorithm main parameters: bin capacities and item size. New algorithm: Score function: scores = bins - (bins - item)**2",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - (bins - item)**2\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified version: Calculate bin scores as the product of normalized capacity and the negative exponential of the bin number multiplied by the item size ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores for an item. The bin with the highest score should be assigned the item.\n\n Args:\n item: int, size of the item to be assigned\n bins: Numpy array, rest capacities of feasible bins\n\n Returns:\n scores: Numpy array, scores for the bins\n \"\"\"\n\n normalized_capacities = bins / np.max(bins)\n exponential_weights = np.exp(-bins * item / np.max(bins))\n scores = normalized_capacities * exponential_weights\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score of a bin based on the exponential of the reciprocal of the sum of the rest capacity and the bin number, divided by the maximum capacity.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n \"\"\"\n Computes the score of a bin based on the exponential of the reciprocal of the sum of the rest capacity and the bin number, divided by the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n scores = np.exp(- (bins + np.arange(len(bins)) + 1) / (item + max_capacity))\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score as the ratio of the item size to the bin capacity minus the bin number, rewarding bins with larger capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins - np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New Algorithm: Increase the penalty factor for bins with remaining capacity greater than item size by a parameter 'k'.\nCode:\ndef new_score(item, bins, k):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > k * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-np.maximum(0, (bins - item) > item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the minimum rest capacity, avoiding bins with rest capacity equal to the item size; If multiple bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score of assigning an item to each bin.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Check if any bins have a rest capacity equal to the item size.\n if np.any(bins == item):\n return np.zeros_like(bins)\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin. Avoid bins with rest capacity equal to the item size.\n scores = rest_capacities/bins\n scores[rest_capacities == 0] = -np.inf\n \n # If any bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.\n max_capacity = np.max(bins[rest_capacities == np.min(rest_capacities)])\n scores[bins == max_capacity] = np.inf\n\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the difference between bin capacity and the maximum capacity minus the item size multiplied by the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score as the difference between bin capacity and the maximum capacity minus the item size multiplied by the bin number.\n\n Args:\n item (int): The size of the current item.\n bins (Numpy array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Numpy array: The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n scores = bins - max_capacity + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin scores as the product of remaining capacity and the exponential decay of bin number, excluding already full bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores as the product of remaining capacity and the exponential decay of bin number, excluding already full bins.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n bins = bins[bins >= item]\n num_bins = len(bins)\n scores = bins * np.exp(-np.arange(num_bins))\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Algorithm: The new algorithm divides the average rest capacity of feasible bins by the item size and subtracts the result from the rest capacity of each feasible bin to calculate the final score.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[bins >= item]\n if len(feasible_bins) == 0:\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the sum of the inverse of the remaining capacity and the square root of the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[bins >= item]\n scores = 1 / feasible_bins + np.sqrt(np.arange(len(feasible_bins)))\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_6.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by the reciprocal of the product of its index and the difference between its rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate scores for a set of bins.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: Scores for the bins.\n \"\"\"\n\n # Calculate the difference between the bin rest capacities and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the product of the bin index and the difference.\n scores = 1 / (np.arange(len(bins)) + 1) / diff\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity minus the bin number, favoring bins with larger rest capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / np.maximum(bins - item, 1)) - np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (1 - alpha) * (1 / remaining_capacity) + alpha * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n scores = (1 - alpha) * (1 / (bins - item)) + alpha * np.power(np.arange(len(bins)) + 1, 1 / 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "{Algorithm: The new algorithm divides item size by bin's rest capacity, multiplies the fraction by a value less than 1, and adds 1 to the product.}",
"code": "def score(item, bins):\n scores = (item / bins) * 0.99 + 1\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the sum of the rest capacity and the bin number\n inv_sum_rest_cap_bin_num = 1.0 / (bins + np.arange(1, bins.size + 1))\n # Calculate the rest capacity divided by the maximum capacity\n rest_cap_div_max_cap = bins / np.max(bins)\n # Calculate the score\n scores = inv_sum_rest_cap_bin_num - rest_cap_div_max_cap\n # Return the scores\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n max_capacity = np.max(bins)\n scores = (item / bins + np.sqrt(np.arange(len(bins)) + 1)) - (item / max_capacity)\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n # Calculate the sum of rest capacity and bin number for each bin.\n denom = bins + np.arange(1, len(bins) + 1)\n\n # Calculate the score for each bin.\n scores = np.sqrt(1.0 / denom) - bins / np.max(bins)\n\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Algorithm main parameters: bin capacities and item size. New algorithm: Score function: scores = bins - (bins - item)**2",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - (bins - item)**2\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified version: Calculate bin scores as the product of normalized capacity and the negative exponential of the bin number multiplied by the item size ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores for an item. The bin with the highest score should be assigned the item.\n\n Args:\n item: int, size of the item to be assigned\n bins: Numpy array, rest capacities of feasible bins\n\n Returns:\n scores: Numpy array, scores for the bins\n \"\"\"\n\n normalized_capacities = bins / np.max(bins)\n exponential_weights = np.exp(-bins * item / np.max(bins))\n scores = normalized_capacities * exponential_weights\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm assigns the item to the bin with the maximum product of the reciprocal of the sum of the rest capacity and the bin number, and the square root of the normalized rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin in 'bins' for assigning an item of size 'item'.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the reciprocal of the sum of the rest capacity and the bin number\n reciprocal_sum = 1 / (bins + np.arange(1, bins.size + 1))\n\n # Calculate the square root of the normalized rest capacity\n normalized_rest_capacity = bins / np.max(bins)\n sqrt_normalized_rest_capacity = np.sqrt(normalized_rest_capacity)\n\n # Calculate the score as the product of the reciprocal of the sum of the rest capacity and the bin number, and the square root of the normalized rest capacity\n scores = reciprocal_sum * sqrt_normalized_rest_capacity\n\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": " The score of a bin is determined by dividing the item size by the square root of the sum of the rest capacity and the bin number, multiplied by a constant representing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score of each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Compute the score of each bin.\n scores = (item / np.sqrt(bins + np.arange(len(bins)))) * np.sqrt(len(bins))\n\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score as the ratio of the item size to the bin capacity minus the bin number, rewarding bins with larger capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins - np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New Algorithm: Increase the penalty factor for bins with remaining capacity greater than item size by a parameter 'k'.\nCode:\ndef new_score(item, bins, k):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > k * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-np.maximum(0, (bins - item) > item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The score is the weighted sum of the item size and the rest capacity of the bins, with the weights being inversely proportional to the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function scores a set of bins to assign an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (numpy.array): The rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n numpy.array: The scores for the bins for assignment.\n \"\"\"\n\n # Compute the weights for each bin.\n weights = 1.0 / np.arange(1, len(bins) + 1)\n\n # Compute the scores for each bin.\n scores = weights * (item + bins)\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the minimum rest capacity, avoiding bins with rest capacity equal to the item size; If multiple bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score of assigning an item to each bin.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Check if any bins have a rest capacity equal to the item size.\n if np.any(bins == item):\n return np.zeros_like(bins)\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin. Avoid bins with rest capacity equal to the item size.\n scores = rest_capacities/bins\n scores[rest_capacities == 0] = -np.inf\n \n # If any bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.\n max_capacity = np.max(bins[rest_capacities == np.min(rest_capacities)])\n scores[bins == max_capacity] = np.inf\n\n return scores",
"objective": 0.04165,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score as the difference between bin capacity and the maximum capacity minus the item size multiplied by the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score as the difference between bin capacity and the maximum capacity minus the item size multiplied by the bin number.\n\n Args:\n item (int): The size of the current item.\n bins (Numpy array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Numpy array: The scores for the bins for assignment.\n \"\"\"\n\n max_capacity = np.max(bins)\n scores = bins - max_capacity + item * np.arange(len(bins))\n return scores",
"objective": 0.04196,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_7.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by the reciprocal of the product of its index and the difference between its rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate scores for a set of bins.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: Scores for the bins.\n \"\"\"\n\n # Calculate the difference between the bin rest capacities and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the product of the bin index and the difference.\n scores = 1 / (np.arange(len(bins)) + 1) / diff\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity minus the bin number, favoring bins with larger rest capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / np.maximum(bins - item, 1)) - np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (1 - alpha) * (1 / remaining_capacity) + alpha * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n scores = (1 - alpha) * (1 / (bins - item)) + alpha * np.power(np.arange(len(bins)) + 1, 1 / 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "{Algorithm: The new algorithm divides item size by bin's rest capacity, multiplies the fraction by a value less than 1, and adds 1 to the product.}",
"code": "def score(item, bins):\n scores = (item / bins) * 0.99 + 1\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the sum of the rest capacity and the bin number\n inv_sum_rest_cap_bin_num = 1.0 / (bins + np.arange(1, bins.size + 1))\n # Calculate the rest capacity divided by the maximum capacity\n rest_cap_div_max_cap = bins / np.max(bins)\n # Calculate the score\n scores = inv_sum_rest_cap_bin_num - rest_cap_div_max_cap\n # Return the scores\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n max_capacity = np.max(bins)\n scores = (item / bins + np.sqrt(np.arange(len(bins)) + 1)) - (item / max_capacity)\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The algorithm calculates each bin's score as the sum of the square root of item size divided by the bin's capacity, square root of the bin's number, and square root of 1 divided by the bin's number, subtracting the bin's capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / bins) + np.sqrt(np.arange(1, len(bins) + 1)) + np.sqrt(1 / np.arange(1, len(bins) + 1)) - bins / np.max(bins)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n # Calculate the sum of rest capacity and bin number for each bin.\n denom = bins + np.arange(1, len(bins) + 1)\n\n # Calculate the score for each bin.\n scores = np.sqrt(1.0 / denom) - bins / np.max(bins)\n\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Algorithm main parameters: bin capacities and item size. New algorithm: Score function: scores = bins - (bins - item)**2",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - (bins - item)**2\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "Modified version: Calculate bin scores as the product of normalized capacity and the negative exponential of the bin number multiplied by the item size ratio.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin scores for an item. The bin with the highest score should be assigned the item.\n\n Args:\n item: int, size of the item to be assigned\n bins: Numpy array, rest capacities of feasible bins\n\n Returns:\n scores: Numpy array, scores for the bins\n \"\"\"\n\n normalized_capacities = bins / np.max(bins)\n exponential_weights = np.exp(-bins * item / np.max(bins))\n scores = normalized_capacities * exponential_weights\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm assigns the item to the bin with the maximum product of the reciprocal of the sum of the rest capacity and the bin number, and the square root of the normalized rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin in 'bins' for assigning an item of size 'item'.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the reciprocal of the sum of the rest capacity and the bin number\n reciprocal_sum = 1 / (bins + np.arange(1, bins.size + 1))\n\n # Calculate the square root of the normalized rest capacity\n normalized_rest_capacity = bins / np.max(bins)\n sqrt_normalized_rest_capacity = np.sqrt(normalized_rest_capacity)\n\n # Calculate the score as the product of the reciprocal of the sum of the rest capacity and the bin number, and the square root of the normalized rest capacity\n scores = reciprocal_sum * sqrt_normalized_rest_capacity\n\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": " The score of a bin is determined by dividing the item size by the square root of the sum of the rest capacity and the bin number, multiplied by a constant representing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score of each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Compute the score of each bin.\n scores = (item / np.sqrt(bins + np.arange(len(bins)))) * np.sqrt(len(bins))\n\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score as the ratio of the item size to the bin capacity minus the bin number, rewarding bins with larger capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins - np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New Algorithm: Increase the penalty factor for bins with remaining capacity greater than item size by a parameter 'k'.\nCode:\ndef new_score(item, bins, k):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > k * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-np.maximum(0, (bins - item) > item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The score is the weighted sum of the item size and the rest capacity of the bins, with the weights being inversely proportional to the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function scores a set of bins to assign an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (numpy.array): The rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n numpy.array: The scores for the bins for assignment.\n \"\"\"\n\n # Compute the weights for each bin.\n weights = 1.0 / np.arange(1, len(bins) + 1)\n\n # Compute the scores for each bin.\n scores = weights * (item + bins)\n\n return scores",
"objective": 0.04125,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign the item to the bin with the minimum rest capacity, avoiding bins with rest capacity equal to the item size; If multiple bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score of assigning an item to each bin.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Check if any bins have a rest capacity equal to the item size.\n if np.any(bins == item):\n return np.zeros_like(bins)\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin. Avoid bins with rest capacity equal to the item size.\n scores = rest_capacities/bins\n scores[rest_capacities == 0] = -np.inf\n \n # If any bins have the same minimum rest capacity, assign the item to the one with the largest initial capacity.\n max_capacity = np.max(bins[rest_capacities == np.min(rest_capacities)])\n scores[bins == max_capacity] = np.inf\n\n return scores",
"objective": 0.04165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_8.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by the reciprocal of the product of its index and the difference between its rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate scores for a set of bins.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: Scores for the bins.\n \"\"\"\n\n # Calculate the difference between the bin rest capacities and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the product of the bin index and the difference.\n scores = 1 / (np.arange(len(bins)) + 1) / diff\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity minus the bin number, favoring bins with larger rest capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / np.maximum(bins - item, 1)) - np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculating each bin's score as the sum of the square root of the item size divided by the bin's capacity, square root of the bin's number, and square root of the bin's number divided by the item size, subtracting the square root of the maximum capacity divided by the bin's number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / bins) + np.sqrt(np.arange(1, len(bins) + 1)) + np.sqrt(np.arange(1, len(bins) + 1) / item) - np.sqrt(np.max(bins) / np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (1 - alpha) * (1 / remaining_capacity) + alpha * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n scores = (1 - alpha) * (1 / (bins - item)) + alpha * np.power(np.arange(len(bins)) + 1, 1 / 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "{Algorithm: The new algorithm divides item size by bin's rest capacity, multiplies the fraction by a value less than 1, and adds 1 to the product.}",
"code": "def score(item, bins):\n scores = (item / bins) * 0.99 + 1\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The backbone idea is to penalize bins with large remaining capacities and/or small item sizes. The new algorithm scores each bin as the ratio of its remaining capacity to the sum of its index and the item size, exponentially penalized by the difference between the remaining capacity and the item size.",
"code": "def score(item, bins):\n remaining_capacities = bins - item\n index_arr = np.arange(len(bins))\n scores = np.exp(-np.abs(remaining_capacities)) / (remaining_capacities + index_arr + 1)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n max_capacity = np.max(bins)\n scores = (item / bins + np.sqrt(np.arange(len(bins)) + 1)) - (item / max_capacity)\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The algorithm calculates each bin's score as the sum of the square root of item size divided by the bin's capacity, square root of the bin's number, and square root of 1 divided by the bin's number, subtracting the bin's capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / bins) + np.sqrt(np.arange(1, len(bins) + 1)) + np.sqrt(1 / np.arange(1, len(bins) + 1)) - bins / np.max(bins)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n # Calculate the sum of rest capacity and bin number for each bin.\n denom = bins + np.arange(1, len(bins) + 1)\n\n # Calculate the score for each bin.\n scores = np.sqrt(1.0 / denom) - bins / np.max(bins)\n\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Algorithm main parameters: bin capacities and item size. New algorithm: Score function: scores = bins - (bins - item)**2",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - (bins - item)**2\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (beta) * (1 / remaining_capacity) + (1 - beta) * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5\n scores = (beta) * (1 / bins) + (1 - beta) * np.power(np.arange(1, len(bins) + 1), 1 / 3)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm assigns the item to the bin with the maximum product of the reciprocal of the sum of the rest capacity and the bin number, and the square root of the normalized rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin in 'bins' for assigning an item of size 'item'.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the reciprocal of the sum of the rest capacity and the bin number\n reciprocal_sum = 1 / (bins + np.arange(1, bins.size + 1))\n\n # Calculate the square root of the normalized rest capacity\n normalized_rest_capacity = bins / np.max(bins)\n sqrt_normalized_rest_capacity = np.sqrt(normalized_rest_capacity)\n\n # Calculate the score as the product of the reciprocal of the sum of the rest capacity and the bin number, and the square root of the normalized rest capacity\n scores = reciprocal_sum * sqrt_normalized_rest_capacity\n\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": " The score of a bin is determined by dividing the item size by the square root of the sum of the rest capacity and the bin number, multiplied by a constant representing bin utilization.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Computes the score of each bin for assigning an item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Compute the score of each bin.\n scores = (item / np.sqrt(bins + np.arange(len(bins)))) * np.sqrt(len(bins))\n\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the score as the ratio of the item size to the bin capacity minus the bin number, rewarding bins with larger capacities. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / bins - np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New Algorithm: Increase the penalty factor for bins with remaining capacity greater than item size by a parameter 'k'.\nCode:\ndef new_score(item, bins, k):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > k * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-np.maximum(0, (bins - item) > item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.04115,
"other_inf": null
},
{
"algorithm": "The score is the weighted sum of the item size and the rest capacity of the bins, with the weights being inversely proportional to the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function scores a set of bins to assign an item.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (numpy.array): The rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n numpy.array: The scores for the bins for assignment.\n \"\"\"\n\n # Compute the weights for each bin.\n weights = 1.0 / np.arange(1, len(bins) + 1)\n\n # Compute the scores for each bin.\n scores = weights * (item + bins)\n\n return scores",
"objective": 0.04125,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run2/population_generation_9.json
================================================
[
{
"algorithm": "Add a penalty to the score of any bin with remaining capacity greater than two times the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n inf = np.inf\n scores = (bins - item) * (1-((bins - item) > 2 * item)) * 1e6\n scores[bins == item] = inf\n scores[bins < item] = -inf\n return scores",
"objective": 0.01006,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as 1e6 divided by the remaining capacity of the bin, subtracting a penalty if the capacity is less than three times the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \n max_size = np.max(bins)\n used_bins = np.where(bins>0)[0]\n \n weight1 = 1.0/(bins[used_bins] - item)\n weight2 = np.where(bins[used_bins] < item * 3, -1e6, 0)\n \n scores = weight1 + weight2\n return scores",
"objective": 0.02787,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^2 * (1-((bins - item) > 2 * item)) * (-1e6)",
"code": "def score(item, bins):\n scores = (bins - item)**2 * (1-((bins - item) > 2 * item)) * (-1e6)\n return scores",
"objective": 0.02867,
"other_inf": null
},
{
"algorithm": "{New algorithm: Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the inverse of the ratio of the item size to the maximum capacity, divided by the product of the square root of the bin's number and the ratio of the item size to the maximum capacity.}",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n # Calculate the ratio of the item size to the bin's remaining capacity\n ratio1 = item / (bins - item)\n\n # Calculate the inverse of the ratio of the item size to the maximum capacity\n ratio2 = 1 / (item / bins)\n\n # Calculate the square root of the bin's number\n sqrt_bin_num = np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the ratio of the item size to the maximum capacity\n ratio3 = item / bins\n\n # Calculate the score of each bin\n scores = (ratio1 + ratio2) / (sqrt_bin_num * ratio3)\n\n return scores",
"objective": 0.0332,
"other_inf": null
},
{
"algorithm": "New algorithm: (bins - item)^3 * (1-((bins - item) > 3 * item)) * (-1e6)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item)**3 * (1-((bins - item) > 3 * item)) * (-1e6)\n return scores",
"objective": 0.03542,
"other_inf": null
},
{
"algorithm": "The score is the ratio of item size to the rest capacity plus the bin number, penalizing bins with smaller rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item)) + np.arange(len(bins))\n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm scores each bin by the reciprocal of the product of its index and the difference between its rest capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate scores for a set of bins.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: Scores for the bins.\n \"\"\"\n\n # Calculate the difference between the bin rest capacities and the item size.\n diff = bins - item\n\n # Calculate the reciprocal of the product of the bin index and the difference.\n scores = 1 / (np.arange(len(bins)) + 1) / diff\n\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of each bin as the reciprocal of the product of the maximum bin capacity, the difference between the bin rest capacity and the item size, and the bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / (bins * (bins - item) * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity minus the bin number, favoring bins with larger rest capacity.",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / np.maximum(bins - item, 1)) - np.arange(len(bins))\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: The score is the ratio of item size to the rest capacity plus the bin number divided by the maximum capacity, penalizing bins with smaller rest capacity and larger size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins - item) + bins / bins.max())\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (1 - alpha) * (1 / remaining_capacity) + alpha * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n alpha = 0.5\n scores = (1 - alpha) * (1 / (bins - item)) + alpha * np.power(np.arange(len(bins)) + 1, 1 / 3)\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Assign score as 1e6 divided by the remaining capacity, penalizing bins with a capacity less than half the item size.",
"code": "def score(item, bins):\n scores = 1e6 / (bins - item)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The backbone idea is to penalize bins with large remaining capacities and/or small item sizes. The new algorithm scores each bin as the ratio of its remaining capacity to the sum of its index and the item size, exponentially penalized by the difference between the remaining capacity and the item size.",
"code": "def score(item, bins):\n remaining_capacities = bins - item\n index_arr = np.arange(len(bins))\n scores = np.exp(-np.abs(remaining_capacities)) / (remaining_capacities + index_arr + 1)\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score of each bin as the sum of the item size divided by the bin's capacity and the square root of the bin's number, minus the item size divided by the maximum capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n max_capacity = np.max(bins)\n scores = (item / bins + np.sqrt(np.arange(len(bins)) + 1)) - (item / max_capacity)\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The algorithm calculates each bin's score as the sum of the square root of item size divided by the bin's capacity, square root of the bin's number, and square root of 1 divided by the bin's number, subtracting the bin's capacity divided by the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(item / bins) + np.sqrt(np.arange(1, len(bins) + 1)) + np.sqrt(1 / np.arange(1, len(bins) + 1)) - bins / np.max(bins)\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the square root of the bin's number, divided by the ratio of the item size to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score of each bin as the sum of the ratio of the item size to the bin's remaining capacity and the square root of the bin's number, divided by the ratio of the item size to the maximum capacity.\n\n Parameters:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the ratio of the item size to the bin's remaining capacity.\n ratios = item / bins\n\n # Calculate the square root of the bin's number.\n sqrt_bins = np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score of each bin.\n scores = ratios + sqrt_bins / (item / np.max(bins))\n\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "Algorithm: Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate the score for each bin based on the square root of the inverse of the sum of the rest capacity and the bin number, minus the rest capacity divided by the maximum capacity.\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n # Calculate the sum of rest capacity and bin number for each bin.\n denom = bins + np.arange(1, len(bins) + 1)\n\n # Calculate the score for each bin.\n scores = np.sqrt(1.0 / denom) - bins / np.max(bins)\n\n return scores",
"objective": 0.04035,
"other_inf": null
},
{
"algorithm": "Algorithm main parameters: bin capacities and item size. New algorithm: Score function: scores = bins - (bins - item)**2",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins - (bins - item)**2\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "New algorithm modifies the score function to: score = (beta) * (1 / remaining_capacity) + (1 - beta) * (cube root of bin number)",
"code": "import numpy as np\n\ndef score(item, bins):\n beta = 0.5\n scores = (beta) * (1 / bins) + (1 - beta) * np.power(np.arange(1, len(bins) + 1), 1 / 3)\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "New algorithm assigns the item to the bin with the maximum product of the reciprocal of the sum of the rest capacity and the bin number, and the square root of the normalized rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin in 'bins' for assigning an item of size 'item'.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.array): A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the reciprocal of the sum of the rest capacity and the bin number\n reciprocal_sum = 1 / (bins + np.arange(1, bins.size + 1))\n\n # Calculate the square root of the normalized rest capacity\n normalized_rest_capacity = bins / np.max(bins)\n sqrt_normalized_rest_capacity = np.sqrt(normalized_rest_capacity)\n\n # Calculate the score as the product of the reciprocal of the sum of the rest capacity and the bin number, and the square root of the normalized rest capacity\n scores = reciprocal_sum * sqrt_normalized_rest_capacity\n\n return scores",
"objective": 0.04085,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_0.json
================================================
[
{
"algorithm": "\nThe algorithm will calculate the score for each bin based on the formula: score = (1 / (capacity - item)) if capacity != maximum capacity, else score = -1. Then, it will return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n maximum_capacity = np.max(bins)\n scores = np.zeros_like(bins, dtype=float)\n \n for i in range(len(bins)):\n if bins[i] != maximum_capacity:\n scores[i] = 1 / (bins[i] - item)\n else:\n scores[i] = -1\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the ratio of item size to each bin's rest capacity.\n2. Calculate the score for each bin based on the ratio and the condition of the rest capacity.\n3. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins, dtype=float)\n for i in range(len(bins)):\n if bins[i] == item:\n scores[i] = -1\n elif bins[i] > item:\n scores[i] = item / bins[i]\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the rest capacity, prioritizing bins with higher rest capacity and lower index, and returning a Numpy array of scores for assignment. \n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * (bins == np.max(bins)) - (2 * np.arange(len(bins)))\n return scores",
"objective": 0.07073,
"other_inf": null
},
{
"algorithm": "\nDescribe the algorithm:\nThe score function takes an input item size and an array of rest capacities of feasible bins, and returns an array of scores for the bins, where the item will be assigned to the bin with the maximum score in each step, with the goal of minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = bins[bins != item] # remove bins with rest capacity equal to item size\n\n for i in range(valid_bins.shape[0]):\n scores[i] = valid_bins[i] - item\n\n return scores",
"objective": 0.08693,
"other_inf": null
},
{
"algorithm": "\nThe algorithm calculates the scores for each bin using a novel scoring function based on the rest capacity and proximity to the item size, then returns the scores in a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / (1 + np.arange(len(bins)))\n return scores",
"objective": 0.10715,
"other_inf": null
},
{
"algorithm": "\n The algorithm iterates through each bin, calculates the score for each bin based on the remaining capacity and the item size, and assigns the item to the bin with the maximum score. The scores for the bins are returned as an array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins - item) / bins\n scores[bins == np.max(bins)] = -np.inf\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "\n The algorithm consists of the following steps:\n 1. Calculate the scores for each bin by dividing the rest capacity of each bin by the size of the current item, subtracting 1 if the rest capacity equals the maximum capacity, and setting the score to 0 if the rest capacity is less than the item size.\n 2. Return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins / item) - (bins == bins.max())\n scores[bins < item] = 0\n return scores",
"objective": 0.32428,
"other_inf": null
},
{
"algorithm": "\nNew algorithm:\nThe score function will first calculate the scores for each bin by subtracting the rest capacity of the bin from the item size, giving a negative score if the rest capacity equals the maximum capacity, and then return the scores as a Numpy array.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = item - bins\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.88067,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function takes an item size and an array of bin capacities as input, and calculates a score for each bin based on its capacity, with higher capacity bins getting higher scores to minimize the number of used bins.\n\n```python\nimport numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / (item * (bins != item)) # Assigning infinite score to bins with equal capacity to item to prevent them from being used\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nDescribe your new algorithm and main steps here\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n mask = remaining_capacity >= item\n scores = np.zeros_like(bins, dtype=float)\n scores[mask] = remaining_capacity[mask] / (np.sum(bins) - np.sum(remaining_capacity))\n return scores",
"objective": 0.92353,
"other_inf": null
},
{
"algorithm": "\nThe algorithm will iterate through each bin and calculate its score based on the rest capacity, with a penalty applied when the rest capacity equals the maximum capacity, and then return the scores for the bins for assignment.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (bins - item) / max_capacity - 0.1 * (bins == max_capacity)\n return scores",
"objective": 1.47862,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm first calculates the remaining capacity of each bin after adding the item, then assigns a score to each bin based on the remaining capacity, and finally returns the scores for the bins for assignment as a Numpy array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n remaining_capacity[remaining_capacity == bins[0]] = 0 # Set the remaining capacity of full bins to 0\n scores = remaining_capacity # Assign score based on remaining capacity\n return scores",
"objective": 1.48375,
"other_inf": null
},
{
"algorithm": "\nThe algorithm works by first calculating the available capacity for each bin after assigning the current item to it, then scoring each bin based on the remaining capacity with a penalty for reaching the maximum capacity, and finally returning the scores for all the bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacity = np.maximum(0, bins - item)\n penalty = (bins == max_capacity).astype(int)\n scores = remaining_capacity - penalty\n return scores",
"objective": 1.51524,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the remaining capacity of each bin after assignment of the current item. \n2. Assign a score to each bin based on the remaining capacity, with a penalty for bins at maximum capacity. \n3. Return the scores for the bins.\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n penalty = np.where(remaining_capacity == 0, -np.inf, 0)\n scores = remaining_capacity + penalty\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_1.json
================================================
[
{
"algorithm": " Calculate the score of a bin as the ratio of the item size to the rest capacity and add 1 to the ratio, and subtract 1 if the rest capacity is equal to the maximum capacity. ",
"code": "import numpy as np\ndef score(item, bins):\n scores = (item / bins + 1) - (bins == bins.max())\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The score function will prioritize bins with specific patterns in their rest capacities. The patterns are repeated but alternated by bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score bins based on their rest capacities and item size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins.\n\n Returns:\n np.array: Scores for the bins.\n \"\"\"\n\n # Pattern 1: Prioritize bins with rest capacity equal to item size\n pattern1 = np.where(bins == item, np.full(bins.shape, 100), np.zeros(bins.shape))\n\n # Pattern 2: Prioritize bins with alternating rest capacities\n pattern2 = np.where(bins % (item * 2) == item, np.full(bins.shape, 50), np.zeros(bins.shape))\n\n # Combine patterns\n scores = pattern1 + pattern2\n\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the ratio of the item size to the square root of the rest capacity, adding 1 to ensure positive scores and subtracting 1 from bins at the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(bins) * (item / np.sqrt(np.maximum(bins - item, 0)))\n scores[bins == min(bins)] -= 1\n scores[bins == max(bins)] += 1\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the inverse of the remaining capacity, and return the maximum score if the remaining capacity is less than a threshold, else return -1.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n threshold = bins.max() / 2\n scores = 1.0 / np.maximum(bins - item, 1)\n scores[bins < item] = -1\n scores[bins <= threshold] = np.maximum(scores[bins <= threshold], -1)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Initialize an empty array named 'scores' with the same length as the input array 'bins'.\n2. Calculate the scores for each bin by taking the minimum between the rest capacity of the bin and the size of the item.\n3. Set the score of a bin with maximum capacity to a very small negative value to prevent it from being used.\n4. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.minimum(bins, item)\n max_capacity_bin_index = np.argmax(bins)\n scores[max_capacity_bin_index] = -99999999\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the rest capacity with the inverse of the bin index, and subtracts the negative maximum rest capacity from the product to adjust the score for the maximum capacity bin and set it to 0 if feasible and -1 if infeasible.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculates the scores for each bin based on the item size and remaining bin capacities.\n\n Args:\n item: Size of the item to be assigned.\n bins: Array of remaining capacities for feasible bins.\n\n Returns:\n Array of scores for each bin.\n \"\"\"\n\n # Calculate the product of remaining capacity and inverse bin index.\n scores = bins * (1.0 / np.arange(1, len(bins) + 1))\n\n # Adjust scores for maximum capacity bin and infeasible bins.\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n scores[bins < item] = -1\n\n # Return the scores.\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the product of the rest capacity and the exponential of the negative bin number, and increase the score by 1 if the rest capacity of a bin equals the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n scores = bins * np.exp(-np.arange(len(bins)))\n scores[bins == bins.max()] += 1\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "The algorithm multiplies the rest capacity of a feasible bin with the reciprocal of the bin's index and adds a positive constant to encourage bin reuse.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function scores a set of bins to assign an item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the reciprocal of the bin indices.\n reciprocal_indices = 1 / np.arange(1, len(bins) + 1)\n\n # Calculate the scores.\n scores = bins * reciprocal_indices + 1\n\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New algorithm calculates scores based on a weighted average of bin rest capacity, maximum bin capacity, and bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates scores for a set of bins to assign an item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin.\n rest_capacities = bins - item\n\n # Calculate the maximum bin capacity.\n max_capacity = np.max(bins)\n\n # Calculate the bin number.\n bin_number = np.arange(len(bins)) + 1\n\n # Calculate the scores.\n scores = 0.5 * rest_capacities / max_capacity + 0.25 * bin_number + 0.25\n\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": " New algorithm: Calculate the scores for each bin by subtracting the item size from the rest capacity if it is less than the maximum capacity and the rest capacity is greater than the item size, and subtract 2 if the rest capacity is less than the maximum capacity or equals the item size. ",
"code": "def score(item, bins):\n \"\"\"Calculate the scores for each bin by subtracting the item size from the rest capacity if it is less than the maximum capacity and the rest capacity is greater than the item size, and subtract 2 if the rest capacity is less than the maximum capacity or equals the item size.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n scores = np.zeros_like(bins, dtype=np.float32)\n max_capacity = np.max(bins)\n for i, bin_capacity in enumerate(bins):\n if bin_capacity < max_capacity and bin_capacity > item:\n scores[i] = max_capacity - item - bin_capacity\n else:\n scores[i] = -2\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": "The algorithm will use a weighted average of the bin capacity, the bin rest capacity, the bin number, and a penalty factor to assign an item to an empty bin that results in the lowest final score.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest = np.maximum(bins - item, 0)\n scores = (-rest + bins*0.5 - (bins - rest)**0.5 - rest**0.5)*0.25\n scores[bins <= item] = -np.inf\n scores[rest == 0] = -np.inf\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "{ New algorithm: Calculate the scores for each bin by subtracting 1 from the rest capacity if it is less than the maximum capacity, subtracting 2 if it is equal to the maximum capacity, and subtracting 3 if the rest capacity is less than the item size. }",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(\n bins < item,\n -3,\n np.where(bins == item, -2, -1 * np.minimum(1, bins - item - 1))\n )\n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the scores for each bin by subtracting 1 from the rest capacity if it is less than the maximum capacity and subtracting 2 if it is equal to the maximum capacity, and set the score to 0 if the rest capacity is less than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the scores for each bin.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n scores = np.zeros_like(bins)\n mask = bins >= item\n scores[mask] = np.where(bins[mask] == item, -2, -1)\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio of the item size to the bin's rest capacity, penalized by the number of bins that can fit the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([[-1.]])\n ratios = item / bins\n penalty = 1 / (np.sum(ratios < 1) + 1)\n scores = penalty * ratios\n scores[np.argmax(scores)] = 0.\n return scores",
"objective": 0.05654,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: \n1. Calculate the available capacity for each bin by subtracting the item size from the rest capacities of feasible bins. \n2. Set the score for each bin to 0 if the available capacity is less than the item size, otherwise set the score to the available capacity. \n3. If the rest capacity of a bin equals the maximum capacity, set the score to -1 to indicate that it will not be used. \n4. Return the scores for the bins for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = np.where(available_capacity < item, 0, available_capacity)\n scores = np.where(bins == np.max(bins), -1, scores)\n return scores",
"objective": 0.05795,
"other_inf": null
},
{
"algorithm": "\n The new algorithm will calculate the score for each bin based on the rest capacity, using a weighted average of the rest capacity and the inverse of the bin number, then return the scores for each bin for assignment. \n",
"code": "import numpy as np\n\ndef score(item, bins):\n num_bins = len(bins)\n weights = np.arange(1, num_bins + 1)\n normalized_capacity = 1 - (bins / np.max(bins))\n scores = normalized_capacity * weights\n return scores",
"objective": 0.05815,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with minimum remaining capacity and higher capacity, then penalize full bins to minimize used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Prioritize bins with minimum remaining capacity and higher capacity, then penalize full bins to minimize used bins.\n\n Args:\n item (int): Size of the current item.\n bins (np.ndarray): Remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n # Prioritize bins with minimum remaining capacity.\n scores = 1 / bins\n\n # Penalize full bins to minimize used bins.\n full_bins = bins <= item\n scores[full_bins] = -np.inf\n\n # Prioritize bins with higher capacity.\n scores = np.where(full_bins, scores, scores * bins)\n\n return scores",
"objective": 0.06751,
"other_inf": null
},
{
"algorithm": "\nDefine a function named score that takes in inputs 'item' and 'bins' and returns the output 'scores' as a Numpy array, implementing a novel scoring algorithm to assign the item to the bins with the maximum score while minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n feasible_bins = np.where(bins >= item)[0]\n \n if len(feasible_bins) == 0:\n return scores\n \n min_capacity = np.min(bins[feasible_bins])\n \n for i in feasible_bins:\n if bins[i] == min_capacity:\n scores[i] = -1\n else:\n scores[i] = (bins[i] - item) / bins[i]\n \n return scores",
"objective": 0.06962,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_10.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with its index.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the square root of the bin's size.\n sqrt_size = np.sqrt(bins)\n\n # Calculate the exponential of the product of the bin's rest capacity with its index.\n exp_product = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * sqrt_size * exp_product\n\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Combining the ideas of prioritizing bins based on their remaining capacity and penalizing bins with large differences between their remaining capacity and the item size, the new algorithm assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the remaining capacity of each bin after assigning the item.\n remaining_capacities = bins - item\n\n # Calculate the inverse of the square root of the remaining capacity of each bin.\n inverse_sqrt_remaining_capacities = 1 / np.sqrt(remaining_capacities)\n\n # Calculate the absolute difference between the remaining capacity of each bin and the item size.\n abs_differences = np.abs(remaining_capacities - item)\n\n # Calculate the inverse of the absolute difference between the remaining capacity of each bin and the item size.\n inverse_abs_differences = 1 / abs_differences\n\n # Calculate the score for each bin as the product of the inverse of the square root of the remaining capacity and the inverse of the absolute difference between the remaining capacity and the item size.\n scores = inverse_sqrt_remaining_capacities * inverse_abs_differences\n\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the inverse of the distance between the item size and the bin's rest capacity, the square of the exponential of the product of the bin's rest capacity and its index, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item) * np.square(np.exp(bins * np.arange(1, len(bins) + 1))) * np.sqrt(bins)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with small remaining capacity and penalize bins with large differences between their remaining capacity and the item size by using the score function: scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0)))",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Prioritize bins with small remaining capacity and penalize bins with large differences between their remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (numpy.ndarray): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n numpy.ndarray: The scores for the bins for assignment.\n \"\"\"\n\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0)))\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": "Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate bin score.\n\n Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = 1.0 / available_capacity**2 + np.sqrt(available_capacity / item) / np.arange(1.0, len(bins) + 1.0)\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "The new algorithm utilizes a score function that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes a score for each bin that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array containing the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array containing the scores for the bins.\n \"\"\"\n\n # Compute the rest capacity ratio for each bin.\n ratio = bins / item\n\n # Compute the score for each bin.\n scores = ratio / (np.arange(len(bins)) + 1)\n\n # Penalize bins with a low rest capacity ratio.\n scores[ratio < 1.5] /= ratio[ratio < 1.5]\n\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "New algorithm uses the product of the bins' inverse index, the inverse of the bins' available capacity, and a weighted sum of the item size and the bin size as the score function.",
"code": "import numpy as np\ndef score(item, bins):\n scores = bins / (np.array(range(len(bins))) + 1) * (1/(bins - item) + 1./item + 1.)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Assign each bin a score that is the sum of the inverse of the square of the difference between the bin's size and the item's size, and the inverse of the product of the bin's rest capacity and its index. ",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = 1 / (bins - item) ** 2 + 1 / (bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Calculates the score of a bin as the product of the inverse of bin index, the inverse of bin available capacity, and a function of item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(1 + np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse square root of the distance between the item size and the bin's rest capacity and the square of the inverse of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(1 / (bins - item))**2 * 1 / np.arange(len(bins),0,-1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Score function is the product of inverse square root of the bin available capacity, the inverse of the square root of the bin index, and the bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = (1 / np.sqrt(available_capacity)) * (1 / np.sqrt(np.arange(1, len(bins) + 1))) * item\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin score as the product of the exponent of the inverse of the difference between the bin size and the item size, and the exponent of the inverse of the product of the bin size and the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.power(1 / (bins - item), 2) * np.power(1 / (bins * np.arange(1, len(bins) + 1)), 2)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the following: the inverse of the square of the difference between the item size and the bin's rest capacity, the inverse of the product of the bin's index and its rest capacity, and the square of the bin's size.",
"code": "def score(item, bins):\n # Calculate the score for each bin\n scores = (1 / ((item - bins) ** 2)) * (1 / (np.arange(1, bins.size + 1) * bins)) * (bins ** 2)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's rest capacity, and the inverse of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diffs = np.abs(bins - item)\n # Calculate the inverse of the square of the absolute difference\n inv_sq_diffs = 1 / diffs**2\n # Calculate the square root of the bin's rest capacity\n sqrt_capacities = np.sqrt(bins)\n # Calculate the inverse of the bin's index\n inv_indices = 1 / np.arange(1, bins.size + 1)\n # Calculate the score for each bin\n scores = inv_sq_diffs * sqrt_capacities * inv_indices\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index and the square root of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin score for an item.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n\n available_capacity = np.maximum(bins - item, 0)\n ratio = np.maximum(available_capacity / item, 1)\n scores = (1 / available_capacity**2 + np.sqrt(ratio)) / np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03934,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_11.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the absolute difference between the item size and the bin's rest capacity\n inv_diff = 1 / np.abs(item - bins)\n\n # Calculate the square root of the bin's rest capacity\n sqrt_cap = np.sqrt(bins)\n\n # Calculate the exponential of the product of the bin's rest capacity with the bin's index\n exp_cap_idx = np.exp(bins * np.arange(1, len(bins) + 1))\n\n # Calculate the score for each bin\n scores = inv_diff * sqrt_cap * exp_cap_idx\n\n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Combining the ideas of prioritizing bins based on their remaining capacity and penalizing bins with large differences between their remaining capacity and the item size, the new algorithm assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the remaining capacity of each bin after assigning the item.\n remaining_capacities = bins - item\n\n # Calculate the inverse of the square root of the remaining capacity of each bin.\n inverse_sqrt_remaining_capacities = 1 / np.sqrt(remaining_capacities)\n\n # Calculate the absolute difference between the remaining capacity of each bin and the item size.\n abs_differences = np.abs(remaining_capacities - item)\n\n # Calculate the inverse of the absolute difference between the remaining capacity of each bin and the item size.\n inverse_abs_differences = 1 / abs_differences\n\n # Calculate the score for each bin as the product of the inverse of the square root of the remaining capacity and the inverse of the absolute difference between the remaining capacity and the item size.\n scores = inverse_sqrt_remaining_capacities * inverse_abs_differences\n\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "Weighted sum of inverse of distance between item size and bin's rest capacity, inverse of distance between bin index and item size, and square root of bin's size",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n distance_size = np.abs(bins - item)\n distance_index = np.abs(np.arange(len(bins)) - item)\n scores = 1 / distance_size + 1 / distance_index + np.sqrt(bins)\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the inverse of the distance between the item size and the bin's rest capacity, the square of the exponential of the product of the bin's rest capacity and its index, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item) * np.square(np.exp(bins * np.arange(1, len(bins) + 1))) * np.sqrt(bins)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritize bins with small remaining capacity and penalize bins with large differences between their remaining capacity and the item size by using the score function: scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0)))",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Prioritize bins with small remaining capacity and penalize bins with large differences between their remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (numpy.ndarray): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n numpy.ndarray: The scores for the bins for assignment.\n \"\"\"\n\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0)))\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": "Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate bin score.\n\n Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = 1.0 / available_capacity**2 + np.sqrt(available_capacity / item) / np.arange(1.0, len(bins) + 1.0)\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the sum of the inverse of the rest capacity, the logarithm of the rest capacity, and the square root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n\n # Calculate the logarithm of the rest capacity\n log_rest_capacity = np.log(bins - item)\n\n # Calculate the square root of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score for each bin\n scores = inv_rest_capacity + log_rest_capacity + sqrt_bin_index\n\n return scores",
"objective": 0.03622,
"other_inf": null
},
{
"algorithm": "The new algorithm utilizes a score function that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes a score for each bin that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array containing the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array containing the scores for the bins.\n \"\"\"\n\n # Compute the rest capacity ratio for each bin.\n ratio = bins / item\n\n # Compute the score for each bin.\n scores = ratio / (np.arange(len(bins)) + 1)\n\n # Penalize bins with a low rest capacity ratio.\n scores[ratio < 1.5] /= ratio[ratio < 1.5]\n\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "New algorithm uses the product of the bins' inverse index, the inverse of the bins' available capacity, and a weighted sum of the item size and the bin size as the score function.",
"code": "import numpy as np\ndef score(item, bins):\n scores = bins / (np.array(range(len(bins))) + 1) * (1/(bins - item) + 1./item + 1.)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Assign each bin a score that is the sum of the inverse of the square of the difference between the bin's size and the item's size, and the inverse of the product of the bin's rest capacity and its index. ",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = 1 / (bins - item) ** 2 + 1 / (bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Calculates the score of a bin as the product of the inverse of bin index, the inverse of bin available capacity, and a function of item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(1 + np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse square root of the distance between the item size and the bin's rest capacity and the square of the inverse of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(1 / (bins - item))**2 * 1 / np.arange(len(bins),0,-1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "New algorithm: Score function is the product of inverse square root of the bin available capacity, the inverse of the square root of the bin index, and the bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = (1 / np.sqrt(available_capacity)) * (1 / np.sqrt(np.arange(1, len(bins) + 1))) * item\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin score as the product of the exponent of the inverse of the difference between the bin size and the item size, and the exponent of the inverse of the product of the bin size and the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.power(1 / (bins - item), 2) * np.power(1 / (bins * np.arange(1, len(bins) + 1)), 2)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the following: the inverse of the square of the difference between the item size and the bin's rest capacity, the inverse of the product of the bin's index and its rest capacity, and the square of the bin's size.",
"code": "def score(item, bins):\n # Calculate the score for each bin\n scores = (1 / ((item - bins) ** 2)) * (1 / (np.arange(1, bins.size + 1) * bins)) * (bins ** 2)\n return scores",
"objective": 0.03914,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_12.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the absolute difference between the item size and the bin's rest capacity\n inv_diff = 1 / np.abs(item - bins)\n\n # Calculate the square root of the bin's rest capacity\n sqrt_cap = np.sqrt(bins)\n\n # Calculate the exponential of the product of the bin's rest capacity with the bin's index\n exp_cap_idx = np.exp(bins * np.arange(1, len(bins) + 1))\n\n # Calculate the score for each bin\n scores = inv_diff * sqrt_cap * exp_cap_idx\n\n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Combining the ideas of prioritizing bins based on their remaining capacity and penalizing bins with large differences between their remaining capacity and the item size, the new algorithm assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the remaining capacity of each bin after assigning the item.\n remaining_capacities = bins - item\n\n # Calculate the inverse of the square root of the remaining capacity of each bin.\n inverse_sqrt_remaining_capacities = 1 / np.sqrt(remaining_capacities)\n\n # Calculate the absolute difference between the remaining capacity of each bin and the item size.\n abs_differences = np.abs(remaining_capacities - item)\n\n # Calculate the inverse of the absolute difference between the remaining capacity of each bin and the item size.\n inverse_abs_differences = 1 / abs_differences\n\n # Calculate the score for each bin as the product of the inverse of the square root of the remaining capacity and the inverse of the absolute difference between the remaining capacity and the item size.\n scores = inverse_sqrt_remaining_capacities * inverse_abs_differences\n\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square root of the absolute difference between the item size and the bin's rest capacity, the square of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the square of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n score_fun = lambda b: (1 / np.sqrt(np.abs(item-b))) * ((b**2) * np.exp(b * ((b**2)/100)))\n scores = score_fun(bins)\n return scores",
"objective": 0.02445,
"other_inf": null
},
{
"algorithm": "Weighted sum of inverse of distance between item size and bin's rest capacity, inverse of distance between bin index and item size, and square root of bin's size",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n distance_size = np.abs(bins - item)\n distance_index = np.abs(np.arange(len(bins)) - item)\n scores = 1 / distance_size + 1 / distance_index + np.sqrt(bins)\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the inverse of the distance between the item size and the bin's rest capacity, the square of the exponential of the product of the bin's rest capacity and its index, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item) * np.square(np.exp(bins * np.arange(1, len(bins) + 1))) * np.sqrt(bins)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm: Evaulate the bin score using the square root function proposed as the score function: scores = np.sqrt(1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0)))) ",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining = bins - item\n scores = np.sqrt(1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0))))\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": "Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate bin score.\n\n Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = 1.0 / available_capacity**2 + np.sqrt(available_capacity / item) / np.arange(1.0, len(bins) + 1.0)\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the sum of the inverse of the rest capacity, the logarithm of the rest capacity, and the square root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n\n # Calculate the logarithm of the rest capacity\n log_rest_capacity = np.log(bins - item)\n\n # Calculate the square root of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score for each bin\n scores = inv_rest_capacity + log_rest_capacity + sqrt_bin_index\n\n return scores",
"objective": 0.03622,
"other_inf": null
},
{
"algorithm": "Bin score is derived from the product of the bin's remaining capacity raised to the power of the bin's index divided by the absolute difference between bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = np.power(bins, np.arange(len(bins))) / np.abs(bins - item)\n\n # Set the scores of bins with insufficient capacity to zero\n scores[bins < item] = 0\n\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a bin's score using the sum of inverse of its remaining capacity and the square of the difference between the item and bin size with an exponential weight of bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity\n inv_cap = 1 / (bins - item)\n \n # Calculate the squared difference between the item and bin size\n diff_sq = np.square(item - bins)\n \n # Calculate the exponential weight of the bin's index\n exp_weight = np.exp(np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = inv_cap * diff_sq * exp_weight\n \n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "New algorithm uses the product of the bins' inverse index, the inverse of the bins' available capacity, and a weighted sum of the item size and the bin size as the score function.",
"code": "import numpy as np\ndef score(item, bins):\n scores = bins / (np.array(range(len(bins))) + 1) * (1/(bins - item) + 1./item + 1.)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Assign each bin a score that is the sum of the inverse of the square of the difference between the bin's size and the item's size, and the inverse of the product of the bin's rest capacity and its index. ",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = 1 / (bins - item) ** 2 + 1 / (bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Calculates the score of a bin as the product of the inverse of bin index, the inverse of bin available capacity, and a function of item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(1 + np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the sum of the inverse square root of the distance between the item size and the bin's rest capacity and the square of the inverse of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.sqrt(1 / (bins - item))**2 * 1 / np.arange(len(bins),0,-1)\n return scores",
"objective": 0.03874,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Calculates bin score as the product of the inverse of bin index, the inverse of bin available capacity raised to a power, and a function of item size.",
"code": "def score(item, bins):\n scores = (1 / np.arange(1, bins.size + 1)) * (1 / (bins - item) ** 2) * (bins - item)\n return scores",
"objective": 0.03884,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_13.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the inverse of the absolute difference between the item size and the bin's rest capacity\n inv_diff = 1 / np.abs(item - bins)\n \n # Calculate the square root of the bin's size\n sqrt_size = np.sqrt(bins)\n \n # Calculate the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size\n exp_prod = np.exp(bins * np.arange(len(bins)) - item / 2)\n \n # Calculate the final score for each bin\n scores = inv_diff * sqrt_size * exp_prod\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the absolute difference between the item size and the bin's rest capacity\n inv_diff = 1 / np.abs(item - bins)\n\n # Calculate the square root of the bin's rest capacity\n sqrt_cap = np.sqrt(bins)\n\n # Calculate the exponential of the product of the bin's rest capacity with the bin's index\n exp_cap_idx = np.exp(bins * np.arange(1, len(bins) + 1))\n\n # Calculate the score for each bin\n scores = inv_diff * sqrt_cap * exp_cap_idx\n\n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Combining the ideas of prioritizing bins based on their remaining capacity and penalizing bins with large differences between their remaining capacity and the item size, the new algorithm assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the remaining capacity of each bin after assigning the item.\n remaining_capacities = bins - item\n\n # Calculate the inverse of the square root of the remaining capacity of each bin.\n inverse_sqrt_remaining_capacities = 1 / np.sqrt(remaining_capacities)\n\n # Calculate the absolute difference between the remaining capacity of each bin and the item size.\n abs_differences = np.abs(remaining_capacities - item)\n\n # Calculate the inverse of the absolute difference between the remaining capacity of each bin and the item size.\n inverse_abs_differences = 1 / abs_differences\n\n # Calculate the score for each bin as the product of the inverse of the square root of the remaining capacity and the inverse of the absolute difference between the remaining capacity and the item size.\n scores = inverse_sqrt_remaining_capacities * inverse_abs_differences\n\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square root of the absolute difference between the item size and the bin's rest capacity, the square of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the square of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n score_fun = lambda b: (1 / np.sqrt(np.abs(item-b))) * ((b**2) * np.exp(b * ((b**2)/100)))\n scores = score_fun(bins)\n return scores",
"objective": 0.02445,
"other_inf": null
},
{
"algorithm": "Weighted sum of inverse of distance between item size and bin's rest capacity, inverse of distance between bin index and item size, and square root of bin's size",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Scores a set of bins to assign an item.\n\n In each step, the item will be assigned to the bin with the maximum score.\n If the rest capacity of a bin equals the maximum capacity, it will not be used.\n The final goal is to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n distance_size = np.abs(bins - item)\n distance_index = np.abs(np.arange(len(bins)) - item)\n scores = 1 / distance_size + 1 / distance_index + np.sqrt(bins)\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the inverse of the distance between the item size and the bin's rest capacity, the square of the exponential of the product of the bin's rest capacity and its index, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item) * np.square(np.exp(bins * np.arange(1, len(bins) + 1))) * np.sqrt(bins)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm: Evaulate the bin score using the square root function proposed as the score function: scores = np.sqrt(1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0)))) ",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining = bins - item\n scores = np.sqrt(1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0))))\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": "Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate bin score.\n\n Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = 1.0 / available_capacity**2 + np.sqrt(available_capacity / item) / np.arange(1.0, len(bins) + 1.0)\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin as the sum of the inverse of the rest capacity, the logarithm of the rest capacity, and the square root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the rest capacity\n inv_rest_capacity = 1 / (bins - item)\n\n # Calculate the logarithm of the rest capacity\n log_rest_capacity = np.log(bins - item)\n\n # Calculate the square root of the bin's index\n sqrt_bin_index = np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score for each bin\n scores = inv_rest_capacity + log_rest_capacity + sqrt_bin_index\n\n return scores",
"objective": 0.03622,
"other_inf": null
},
{
"algorithm": "Bin score is derived from the product of the bin's remaining capacity raised to the power of the bin's index divided by the absolute difference between bin's remaining capacity and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the bin scores\n scores = np.power(bins, np.arange(len(bins))) / np.abs(bins - item)\n\n # Set the scores of bins with insufficient capacity to zero\n scores[bins < item] = 0\n\n return scores",
"objective": 0.03672,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate a bin's score using the sum of inverse of its remaining capacity and the square of the difference between the item and bin size with an exponential weight of bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the remaining capacity\n inv_cap = 1 / (bins - item)\n \n # Calculate the squared difference between the item and bin size\n diff_sq = np.square(item - bins)\n \n # Calculate the exponential weight of the bin's index\n exp_weight = np.exp(np.arange(len(bins)))\n \n # Calculate the score for each bin\n scores = inv_cap * diff_sq * exp_weight\n \n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "New algorithm uses the product of the bins' inverse index, the inverse of the bins' available capacity, and a weighted sum of the item size and the bin size as the score function.",
"code": "import numpy as np\ndef score(item, bins):\n scores = bins / (np.array(range(len(bins))) + 1) * (1/(bins - item) + 1./item + 1.)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Assign each bin a score that is the sum of the inverse of the square of the difference between the bin's size and the item's size, and the inverse of the product of the bin's rest capacity and its index. ",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = 1 / (bins - item) ** 2 + 1 / (bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Calculates the score of a bin as the product of the inverse of bin index, the inverse of bin available capacity, and a function of item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(1 + np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.03864,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_14.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the bin score based on the product of the inverse of the rest capacity, the square root of the bin size, and the exponential of the product of the rest capacity and its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the bin score based on the product of the inverse of the rest capacity, the square root of the bin size, and the exponential of the product of the rest capacity and its index.\n \n Args:\n item (int): The size of the current item.\n bins (NumPy array): The rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n NumPy array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the inverse of the rest capacity of each bin.\n inv_rest_capacities = 1 / rest_capacities\n\n # Calculate the square root of the bin size.\n bin_sizes = np.sqrt(bins)\n\n # Calculate the exponential of the product of the rest capacity and its index.\n exp_rest_capacities = np.exp(rest_capacities * np.arange(1, len(bins) + 1))\n\n # Calculate the bin score.\n scores = inv_rest_capacities * bin_sizes * exp_rest_capacities\n\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the inverse of the absolute difference between the item size and the bin's rest capacity\n inv_diff = 1 / np.abs(item - bins)\n \n # Calculate the square root of the bin's size\n sqrt_size = np.sqrt(bins)\n \n # Calculate the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size\n exp_prod = np.exp(bins * np.arange(len(bins)) - item / 2)\n \n # Calculate the final score for each bin\n scores = inv_diff * sqrt_size * exp_prod\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_bin_rest_index = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_prod_bin_rest_index = np.exp(prod_bin_rest_index)\n\n # Calculate the square of the bin's size.\n bin_size_squared = np.square(bins)\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * exp_prod_bin_rest_index * bin_size_squared\n\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of the absolute difference between the item size and the bin's rest capacity\n inv_diff = 1 / np.abs(item - bins)\n\n # Calculate the square root of the bin's rest capacity\n sqrt_cap = np.sqrt(bins)\n\n # Calculate the exponential of the product of the bin's rest capacity with the bin's index\n exp_cap_idx = np.exp(bins * np.arange(1, len(bins) + 1))\n\n # Calculate the score for each bin\n scores = inv_diff * sqrt_cap * exp_cap_idx\n\n # Return the scores\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Combining the ideas of prioritizing bins based on their remaining capacity and penalizing bins with large differences between their remaining capacity and the item size, the new algorithm assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the remaining capacity of each bin after assigning the item.\n remaining_capacities = bins - item\n\n # Calculate the inverse of the square root of the remaining capacity of each bin.\n inverse_sqrt_remaining_capacities = 1 / np.sqrt(remaining_capacities)\n\n # Calculate the absolute difference between the remaining capacity of each bin and the item size.\n abs_differences = np.abs(remaining_capacities - item)\n\n # Calculate the inverse of the absolute difference between the remaining capacity of each bin and the item size.\n inverse_abs_differences = 1 / abs_differences\n\n # Calculate the score for each bin as the product of the inverse of the square root of the remaining capacity and the inverse of the absolute difference between the remaining capacity and the item size.\n scores = inverse_sqrt_remaining_capacities * inverse_abs_differences\n\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square root of the absolute difference between the item size and the bin's rest capacity, the square of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the square of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n score_fun = lambda b: (1 / np.sqrt(np.abs(item-b))) * ((b**2) * np.exp(b * ((b**2)/100)))\n scores = score_fun(bins)\n return scores",
"objective": 0.02445,
"other_inf": null
},
{
"algorithm": "The new algorithm employs a weighted sum of inverse of distance between item size and rest capacity, inverse of distance between bin index and item size, and a square root of bin's rest capacity, and the item size, with all parameters being scalars.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Scores a set of bins to assign an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of feasible bins.\n\n Returns:\n A Numpy array of scores for the bins.\n \"\"\"\n\n distance_to_capacity = np.abs(bins - item)\n distance_to_index = np.abs(np.arange(len(bins)) - item)\n scores = 1 / distance_to_capacity + 1 / distance_to_index + np.sqrt(bins) + item\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the inverse of the distance between the item size and the bin's rest capacity, the square of the exponential of the product of the bin's rest capacity and its index, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item) * np.square(np.exp(bins * np.arange(1, len(bins) + 1))) * np.sqrt(bins)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "{New Algorithm: Multiply the item size by the square of the exponential of the product of the bin's rest capacity and its index, and then divide the result by the distance between the item size and the bin's rest capacity. If the rest capacity of a bin is zero, it will not be used.}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.square(np.exp(bins * np.arange(1, len(bins) + 1)))) / np.abs(bins - item)\n return scores",
"objective": 0.02827,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the square of the exponential of the product of the bin's rest capacity and its index, and the sum of the inverse of the distance between the item size and the bin's rest capacity and the square root of the bin's size.",
"code": "import numpy as np\nimport math\n\ndef score(item, bins):\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_prod_rest_capacity_index = np.exp(np.multiply(bins, np.arange(1, len(bins) + 1)))\n\n # Calculate the inverse of the distance between the item size and the bin's rest capacity\n inv_distance_item_rest_capacity = 1 / np.abs(bins - item)\n\n # Calculate the square root of the bin's size\n sqrt_bin_size = np.sqrt(bins)\n\n # Calculate the sum of the inverse of the distance between the item size and the bin's rest\n # capacity and the square root of the bin's size\n sum_inv_distance_item_rest_capacity_sqrt_bin_size = np.sum(\n np.multiply(inv_distance_item_rest_capacity, sqrt_bin_size)\n )\n\n # Calculate the score for each bin\n scores = np.multiply(np.square(exp_prod_rest_capacity_index), sum_inv_distance_item_rest_capacity_sqrt_bin_size)\n\n return scores",
"objective": 0.03189,
"other_inf": null
},
{
"algorithm": "New algorithm: Evaulate the bin score using the square root function proposed as the score function: scores = np.sqrt(1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0)))) ",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining = bins - item\n scores = np.sqrt(1. / ((1. + remaining) * (1. + np.abs(remaining - item)) * (1. + np.maximum(remaining - item, 0))))\n return scores",
"objective": 0.0321,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the square of the inverse of the distance between the item size and the bin's rest capacity, the cube of the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the square of the inverse of the distance between the item size and the bin's rest capacity.\n dist_inv_squared = np.square(1 / np.abs(bins - item))\n\n # Calculate the cube of the exponential of the product of the bin's rest capacity and its index.\n exp_prod_cubed = np.power(np.exp(bins * np.arange(1, len(bins) + 1)), 3)\n\n # Calculate the square of the bin's size.\n size_squared = np.square(bins)\n\n # Calculate the scores as the sum of the three components.\n scores = dist_inv_squared + exp_prod_cubed + size_squared\n\n return scores",
"objective": 0.0336,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_15.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the square of the rest capacity minus the item size, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity minus the item size\n rest_capacity = bins - item\n\n # Calculate the inverse of the square of the rest capacity\n inv_rest_capacity = 1 / (rest_capacity ** 2)\n\n # Calculate the square root of the bin's size\n sqrt_bin_size = np.sqrt(bins)\n\n # Calculate the exponential of the product of the bin's rest capacity with the bin's index\n exp_rest_capacity_index = np.exp(rest_capacity * np.arange(len(bins)))\n\n # Calculate the scores\n scores = inv_rest_capacity * sqrt_bin_size * exp_rest_capacity_index\n\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New Algorithm: For each item, multiply the sum of the square of the exponential of the square root of bin's capacity and its index, the square of the inverse of the absolute difference between item size and rest capacity, and the exponential of the product of bin's capacity with its index minus half of item size, by an integer that is exponential of the difference between item size and bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of the feasible bins\n\n Returns:\n scores: The scores for each bin.\n \"\"\"\n\n # Calculate the exponentials of the square root of bin capacities and their indices.\n exp_cap_sqrt = np.exp(np.sqrt(bins))\n\n # Calculate the exponentials of the square root of bin indices.\n exp_idx_sqrt = np.exp(np.sqrt(np.arange(1, len(bins) + 1)))\n\n # Calculate the squares of the inverse of the absolute difference between item size and rest capacity.\n inv_diff_sqr = (1 / np.abs(item - bins)) ** 2\n\n # Calculate the exponentials of the product of bin capacities with their indices minus half of item size.\n exp_cap_idx_item = np.exp(bins * np.arange(1, len(bins) + 1) - item / 2)\n\n # Calculate the scores.\n scores = (exp_cap_sqrt * exp_idx_sqrt * inv_diff_sqr * exp_cap_idx_item) * np.exp(item - bins)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the sum of the inverse of the absolute difference between the item size and the bin's rest capacity\n inv_diff = 1 / np.abs(item - bins)\n \n # Calculate the square root of the bin's size\n sqrt_size = np.sqrt(bins)\n \n # Calculate the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size\n exp_prod = np.exp(bins * np.arange(len(bins)) - item / 2)\n \n # Calculate the final score for each bin\n scores = inv_diff * sqrt_size * exp_prod\n \n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_bin_rest_index = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_prod_bin_rest_index = np.exp(prod_bin_rest_index)\n\n # Calculate the square of the bin's size.\n bin_size_squared = np.square(bins)\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * exp_prod_bin_rest_index * bin_size_squared\n\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(1.0 / np.abs(item - bins), np.sqrt(bins)) * np.exp(bins * np.arange(bins.shape[0]))\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "Combining the ideas of prioritizing bins based on their remaining capacity and penalizing bins with large differences between their remaining capacity and the item size, the new algorithm assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the remaining capacity of each bin after assigning the item.\n remaining_capacities = bins - item\n\n # Calculate the inverse of the square root of the remaining capacity of each bin.\n inverse_sqrt_remaining_capacities = 1 / np.sqrt(remaining_capacities)\n\n # Calculate the absolute difference between the remaining capacity of each bin and the item size.\n abs_differences = np.abs(remaining_capacities - item)\n\n # Calculate the inverse of the absolute difference between the remaining capacity of each bin and the item size.\n inverse_abs_differences = 1 / abs_differences\n\n # Calculate the score for each bin as the product of the inverse of the square root of the remaining capacity and the inverse of the absolute difference between the remaining capacity and the item size.\n scores = inverse_sqrt_remaining_capacities * inverse_abs_differences\n\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square root of the absolute difference between the item size and the bin's rest capacity, the square of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the square of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n score_fun = lambda b: (1 / np.sqrt(np.abs(item-b))) * ((b**2) * np.exp(b * ((b**2)/100)))\n scores = score_fun(bins)\n return scores",
"objective": 0.02445,
"other_inf": null
},
{
"algorithm": "New algorithm: The bin score is calculated based on the product of the inverse of the rest capacity, the square root of the bin size, and the exponential of the product of the rest capacity and the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1./(bins - item)**2 * np.sqrt(bins)*np.exp(bins*np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm employs a weighted sum of inverse of distance between item size and rest capacity, inverse of distance between bin index and item size, and a square root of bin's rest capacity, with all parameters being different from the original algorithm.",
"code": "import numpy as np\ndef score(item, bins):\n distance1 = np.abs(bins - item)\n distance2 = np.abs(np.arange(len(bins)) - item)\n scores = 1 / distance1 + 1 / distance2 + np.sqrt(bins)\n scores[bins <= 0] = 0.\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the inverse of the distance between the item size and the bin's rest capacity, the square of the exponential of the product of the bin's rest capacity and its index, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item) * np.square(np.exp(bins * np.arange(1, len(bins) + 1))) * np.sqrt(bins)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "{New Algorithm: Multiply the item size by the square of the exponential of the product of the bin's rest capacity and its index, and then divide the result by the distance between the item size and the bin's rest capacity. If the rest capacity of a bin is zero, it will not be used.}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.square(np.exp(bins * np.arange(1, len(bins) + 1)))) / np.abs(bins - item)\n return scores",
"objective": 0.02827,
"other_inf": null
},
{
"algorithm": "Score function multiplies the sum of the exponential of the bin size and the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's index, and the exponential of the product between the item size and the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score function to assign an item to a bin.\n\n Args:\n item (int): Size of the item to be assigned.\n bins (np.ndarray): Rest capacities of feasible bins, must be larger than the item size.\n\n Returns:\n np.ndarray: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the sum of the exponential of the bin size and the inverse of the absolute difference between the item size and the bin's rest capacity\n num = np.exp(bins) + 1 / np.abs(bins - item)\n\n # Calculate the square root of the bin's index\n idx = np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the exponential of the product between the item size and the bin's index\n denom = np.exp(item * idx)\n\n # Calculate the score\n scores = num / denom\n return scores",
"objective": 0.02837,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_16.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the square of the rest capacity minus the item size, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the rest capacity minus the item size\n rest_capacity = bins - item\n\n # Calculate the inverse of the square of the rest capacity\n inv_rest_capacity = 1 / (rest_capacity ** 2)\n\n # Calculate the square root of the bin's size\n sqrt_bin_size = np.sqrt(bins)\n\n # Calculate the exponential of the product of the bin's rest capacity with the bin's index\n exp_rest_capacity_index = np.exp(rest_capacity * np.arange(len(bins)))\n\n # Calculate the scores\n scores = inv_rest_capacity * sqrt_bin_size * exp_rest_capacity_index\n\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates a score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n\n # Calculate the rest capacity of each bin.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = np.multiply(bins, np.exp(np.multiply(rest_capacities, np.arange(1, len(rest_capacities) + 1)))) / np.abs(rest_capacities)\n\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "New Algorithm: For each item, multiply the sum of the square of the exponential of the square root of bin's capacity and its index, the square of the inverse of the absolute difference between item size and rest capacity, and the exponential of the product of bin's capacity with its index minus half of item size, by an integer that is exponential of the difference between item size and bin's capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin.\n\n Args:\n item: The size of the current item.\n bins: The remaining capacities of the feasible bins\n\n Returns:\n scores: The scores for each bin.\n \"\"\"\n\n # Calculate the exponentials of the square root of bin capacities and their indices.\n exp_cap_sqrt = np.exp(np.sqrt(bins))\n\n # Calculate the exponentials of the square root of bin indices.\n exp_idx_sqrt = np.exp(np.sqrt(np.arange(1, len(bins) + 1)))\n\n # Calculate the squares of the inverse of the absolute difference between item size and rest capacity.\n inv_diff_sqr = (1 / np.abs(item - bins)) ** 2\n\n # Calculate the exponentials of the product of bin capacities with their indices minus half of item size.\n exp_cap_idx_item = np.exp(bins * np.arange(1, len(bins) + 1) - item / 2)\n\n # Calculate the scores.\n scores = (exp_cap_sqrt * exp_idx_sqrt * inv_diff_sqr * exp_cap_idx_item) * np.exp(item - bins)\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "{Algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, and the square root of the bin's size}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.abs(bins - item) + np.exp(bins * np.arange(len(bins)) - 0.5 * item) + np.sqrt(bins)\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp = np.exp(np.multiply(bins, np.arange(len(bins))))\n\n # Calculate the score for each bin.\n scores = np.multiply(np.multiply(bins, exp), 1 / diff)\n\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_bin_rest_index = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_prod_bin_rest_index = np.exp(prod_bin_rest_index)\n\n # Calculate the square of the bin's size.\n bin_size_squared = np.square(bins)\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * exp_prod_bin_rest_index * bin_size_squared\n\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(1.0 / np.abs(item - bins), np.sqrt(bins)) * np.exp(bins * np.arange(bins.shape[0]))\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "The score for each bin is calculated based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the product of the bin's rest capacity and its index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: Size of the item to be assigned.\n bins: Rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n\n # Check if any bin has enough capacity to hold the item.\n if np.min(bins) < item:\n return np.zeros_like(bins)\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the square root of the exponential of the product of the bin's rest capacity and its index.\n sqrt_exp_prod_bin_capacity_index = np.sqrt(np.exp(bins * np.arange(1, len(bins) + 1)))\n\n # Calculate the exponential of the product of the bin's rest capacity and its index minus half of the item size.\n exp_prod_bin_capacity_index_minus_half_item_size = np.exp(bins * np.arange(1, len(bins) + 1) - item / 2)\n\n # Calculate the score for each bin.\n scores = inv_diff * sqrt_exp_prod_bin_capacity_index * exp_prod_bin_capacity_index_minus_half_item_size\n\n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": "Combining the ideas of prioritizing bins based on their remaining capacity and penalizing bins with large differences between their remaining capacity and the item size, the new algorithm assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the remaining capacity of each bin after assigning the item.\n remaining_capacities = bins - item\n\n # Calculate the inverse of the square root of the remaining capacity of each bin.\n inverse_sqrt_remaining_capacities = 1 / np.sqrt(remaining_capacities)\n\n # Calculate the absolute difference between the remaining capacity of each bin and the item size.\n abs_differences = np.abs(remaining_capacities - item)\n\n # Calculate the inverse of the absolute difference between the remaining capacity of each bin and the item size.\n inverse_abs_differences = 1 / abs_differences\n\n # Calculate the score for each bin as the product of the inverse of the square root of the remaining capacity and the inverse of the absolute difference between the remaining capacity and the item size.\n scores = inverse_sqrt_remaining_capacities * inverse_abs_differences\n\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square root of the absolute difference between the item size and the bin's rest capacity, the square of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the square of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n score_fun = lambda b: (1 / np.sqrt(np.abs(item-b))) * ((b**2) * np.exp(b * ((b**2)/100)))\n scores = score_fun(bins)\n return scores",
"objective": 0.02445,
"other_inf": null
},
{
"algorithm": "New algorithm: The bin score is calculated based on the product of the inverse of the rest capacity, the square root of the bin size, and the exponential of the product of the rest capacity and the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1./(bins - item)**2 * np.sqrt(bins)*np.exp(bins*np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.02535,
"other_inf": null
},
{
"algorithm": "New algorithm: The new algorithm employs a weighted sum of inverse of distance between item size and rest capacity, inverse of distance between bin index and item size, and a square root of bin's rest capacity, with all parameters being different from the original algorithm.",
"code": "import numpy as np\ndef score(item, bins):\n distance1 = np.abs(bins - item)\n distance2 = np.abs(np.arange(len(bins)) - item)\n scores = 1 / distance1 + 1 / distance2 + np.sqrt(bins)\n scores[bins <= 0] = 0.\n return scores",
"objective": 0.02546,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the inverse of the distance between the item size and the bin's rest capacity, the square of the exponential of the product of the bin's rest capacity and its index, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item) * np.square(np.exp(bins * np.arange(1, len(bins) + 1))) * np.sqrt(bins)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "{New Algorithm: Multiply the item size by the square of the exponential of the product of the bin's rest capacity and its index, and then divide the result by the distance between the item size and the bin's rest capacity. If the rest capacity of a bin is zero, it will not be used.}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item * np.square(np.exp(bins * np.arange(1, len(bins) + 1)))) / np.abs(bins - item)\n return scores",
"objective": 0.02827,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_17.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by multiplying the exponential of the difference between the item's size and the bin's rest capacity with the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the sum of the inverse of the absolute difference between the item's size and the bin's rest capacity and the square root of the bin's size",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacities = bins - item\n scores = np.exp(-np.abs(rest_capacities)) * np.sqrt(np.exp(rest_capacities * np.arange(1, len(bins) + 1))) * np.exp(1 / np.abs(rest_capacities) + np.sqrt(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates a score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n\n # Calculate the rest capacity of each bin.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = np.multiply(bins, np.exp(np.multiply(rest_capacities, np.arange(1, len(rest_capacities) + 1)))) / np.abs(rest_capacities)\n\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The backbone idea in the provided algorithms is to calculate the score for each bin based on the product or multiplication of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity. A new algorithm that has a totally different form can be designed by using the sum or addition of the functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the sum of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse function of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the sum of the functions of the bin's rest capacity and its index and the inverse function of the absolute difference.\n scores = bins + np.arange(len(bins)) + inv_abs_diff\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / diff**2\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_cap_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the square of the bin's size\n bin_size_sq = bins**2\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_cap_idx * bin_size_sq\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "{Algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, and the square root of the bin's size}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.abs(bins - item) + np.exp(bins * np.arange(len(bins)) - 0.5 * item) + np.sqrt(bins)\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Score each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's size and its index, and the inverse of the absolute difference between the item size and the bin's capacity, divided by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins / item - 1))) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp = np.exp(np.multiply(bins, np.arange(len(bins))))\n\n # Calculate the score for each bin.\n scores = np.multiply(np.multiply(bins, exp), 1 / diff)\n\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_bin_rest_index = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_prod_bin_rest_index = np.exp(prod_bin_rest_index)\n\n # Calculate the square of the bin's size.\n bin_size_squared = np.square(bins)\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * exp_prod_bin_rest_index * bin_size_squared\n\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(1.0 / np.abs(item - bins), np.sqrt(bins)) * np.exp(bins * np.arange(bins.shape[0]))\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity, and the bin index.",
"code": "def score(item, bins):\n scores = bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins - item) + 1) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "The score for each bin is calculated based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the product of the bin's rest capacity and its index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: Size of the item to be assigned.\n bins: Rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n\n # Check if any bin has enough capacity to hold the item.\n if np.min(bins) < item:\n return np.zeros_like(bins)\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the square root of the exponential of the product of the bin's rest capacity and its index.\n sqrt_exp_prod_bin_capacity_index = np.sqrt(np.exp(bins * np.arange(1, len(bins) + 1)))\n\n # Calculate the exponential of the product of the bin's rest capacity and its index minus half of the item size.\n exp_prod_bin_capacity_index_minus_half_item_size = np.exp(bins * np.arange(1, len(bins) + 1) - item / 2)\n\n # Calculate the score for each bin.\n scores = inv_diff * sqrt_exp_prod_bin_capacity_index * exp_prod_bin_capacity_index_minus_half_item_size\n\n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": "Combining the ideas of prioritizing bins based on their remaining capacity and penalizing bins with large differences between their remaining capacity and the item size, the new algorithm assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the remaining capacity of each bin after assigning the item.\n remaining_capacities = bins - item\n\n # Calculate the inverse of the square root of the remaining capacity of each bin.\n inverse_sqrt_remaining_capacities = 1 / np.sqrt(remaining_capacities)\n\n # Calculate the absolute difference between the remaining capacity of each bin and the item size.\n abs_differences = np.abs(remaining_capacities - item)\n\n # Calculate the inverse of the absolute difference between the remaining capacity of each bin and the item size.\n inverse_abs_differences = 1 / abs_differences\n\n # Calculate the score for each bin as the product of the inverse of the square root of the remaining capacity and the inverse of the absolute difference between the remaining capacity and the item size.\n scores = inverse_sqrt_remaining_capacities * inverse_abs_differences\n\n return scores",
"objective": 0.02163,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square root of the absolute difference between the item size and the bin's rest capacity, the square of the bin's rest capacity, and the exponential of the product of the bin's rest capacity with the square of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n score_fun = lambda b: (1 / np.sqrt(np.abs(item-b))) * ((b**2) * np.exp(b * ((b**2)/100)))\n scores = score_fun(bins)\n return scores",
"objective": 0.02445,
"other_inf": null
},
{
"algorithm": "New algorithm: The bin score is calculated based on the product of the inverse of the rest capacity, the square root of the bin size, and the exponential of the product of the rest capacity and the square root of its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1./(bins - item)**2 * np.sqrt(bins)*np.exp(bins*np.sqrt(np.arange(1, len(bins)+1)))\n return scores",
"objective": 0.02535,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_18.json
================================================
[
{
"algorithm": "The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculates the score for each bin based on the given item size.\n\n The score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geom_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n exp_prod = np.exp(np.arange(len(bins)) * (bins - item))\n\n # Calculate the score for each bin.\n scores = inv_diff * geom_mean * exp_prod\n\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by multiplying the exponential of the difference between the item's size and the bin's rest capacity with the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the sum of the inverse of the absolute difference between the item's size and the bin's rest capacity and the square root of the bin's size",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacities = bins - item\n scores = np.exp(-np.abs(rest_capacities)) * np.sqrt(np.exp(rest_capacities * np.arange(1, len(bins) + 1))) * np.exp(1 / np.abs(rest_capacities) + np.sqrt(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates a score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n\n # Calculate the rest capacity of each bin.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = np.multiply(bins, np.exp(np.multiply(rest_capacities, np.arange(1, len(rest_capacities) + 1)))) / np.abs(rest_capacities)\n\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "A comprehensive score that combines the geometric mean of the bin's size and rest capacity, the exponential of the product of the bin's index and rest capacity, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item to.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are\n larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n size_rest_capacity_gm = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n index_rest_capacity_exp = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the inverse of the absolute difference between the item size and the\n # bin's rest capacity.\n item_rest_capacity_diff_inv = 1 / np.abs(bins - item)\n\n # Combine the three scores into a comprehensive score.\n scores = size_rest_capacity_gm * index_rest_capacity_exp * item_rest_capacity_diff_inv\n\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The backbone idea in the provided algorithms is to calculate the score for each bin based on the product or multiplication of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity. A new algorithm that has a totally different form can be designed by using the sum or addition of the functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the sum of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse function of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the sum of the functions of the bin's rest capacity and its index and the inverse function of the absolute difference.\n scores = bins + np.arange(len(bins)) + inv_abs_diff\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / diff**2\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_cap_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the square of the bin's size\n bin_size_sq = bins**2\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_cap_idx * bin_size_sq\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "{Algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, and the square root of the bin's size}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.abs(bins - item) + np.exp(bins * np.arange(len(bins)) - 0.5 * item) + np.sqrt(bins)\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Score each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's size and its index, and the inverse of the absolute difference between the item size and the bin's capacity, divided by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins / item - 1))) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp = np.exp(np.multiply(bins, np.arange(len(bins))))\n\n # Calculate the score for each bin.\n scores = np.multiply(np.multiply(bins, exp), 1 / diff)\n\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_bin_rest_index = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_prod_bin_rest_index = np.exp(prod_bin_rest_index)\n\n # Calculate the square of the bin's size.\n bin_size_squared = np.square(bins)\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * exp_prod_bin_rest_index * bin_size_squared\n\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(1.0 / np.abs(item - bins), np.sqrt(bins)) * np.exp(bins * np.arange(bins.shape[0]))\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity, and the bin index.",
"code": "def score(item, bins):\n scores = bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins - item) + 1) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0165,
"other_inf": null
},
{
"algorithm": "The score for each bin is calculated based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the product of the bin's rest capacity and its index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin for assigning an item.\n\n Args:\n item: Size of the item to be assigned.\n bins: Rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n\n # Check if any bin has enough capacity to hold the item.\n if np.min(bins) < item:\n return np.zeros_like(bins)\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the square root of the exponential of the product of the bin's rest capacity and its index.\n sqrt_exp_prod_bin_capacity_index = np.sqrt(np.exp(bins * np.arange(1, len(bins) + 1)))\n\n # Calculate the exponential of the product of the bin's rest capacity and its index minus half of the item size.\n exp_prod_bin_capacity_index_minus_half_item_size = np.exp(bins * np.arange(1, len(bins) + 1) - item / 2)\n\n # Calculate the score for each bin.\n scores = inv_diff * sqrt_exp_prod_bin_capacity_index * exp_prod_bin_capacity_index_minus_half_item_size\n\n return scores",
"objective": 0.02083,
"other_inf": null
},
{
"algorithm": "Combining the ideas of prioritizing bins based on their remaining capacity and penalizing bins with large differences between their remaining capacity and the item size, the new algorithm assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n This function assigns a score to each bin as the product of the inverse of the square root of the bin's remaining capacity and the inverse of the absolute difference between the bin's remaining capacity and the item size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the remaining capacity of each bin after assigning the item.\n remaining_capacities = bins - item\n\n # Calculate the inverse of the square root of the remaining capacity of each bin.\n inverse_sqrt_remaining_capacities = 1 / np.sqrt(remaining_capacities)\n\n # Calculate the absolute difference between the remaining capacity of each bin and the item size.\n abs_differences = np.abs(remaining_capacities - item)\n\n # Calculate the inverse of the absolute difference between the remaining capacity of each bin and the item size.\n inverse_abs_differences = 1 / abs_differences\n\n # Calculate the score for each bin as the product of the inverse of the square root of the remaining capacity and the inverse of the absolute difference between the remaining capacity and the item size.\n scores = inverse_sqrt_remaining_capacities * inverse_abs_differences\n\n return scores",
"objective": 0.02163,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_19.json
================================================
[
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n rest_capacities = bins - item\n scores = rest_capacities * np.exp(rest_capacities * np.arange(len(bins))) * (1 / np.abs(rest_capacities)) * np.sqrt(bins)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculates the score for each bin based on the given item size.\n\n The score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geom_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n exp_prod = np.exp(np.arange(len(bins)) * (bins - item))\n\n # Calculate the score for each bin.\n scores = inv_diff * geom_mean * exp_prod\n\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by multiplying the exponential of the difference between the item's size and the bin's rest capacity with the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the sum of the inverse of the absolute difference between the item's size and the bin's rest capacity and the square root of the bin's size",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacities = bins - item\n scores = np.exp(-np.abs(rest_capacities)) * np.sqrt(np.exp(rest_capacities * np.arange(1, len(bins) + 1))) * np.exp(1 / np.abs(rest_capacities) + np.sqrt(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates a score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n\n # Calculate the rest capacity of each bin.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = np.multiply(bins, np.exp(np.multiply(rest_capacities, np.arange(1, len(rest_capacities) + 1)))) / np.abs(rest_capacities)\n\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Main parameters of the existing algorithm include: inverse function, exponent, and bin size square. The new algorithm uses the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the cube of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_cap_idx = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_cap_idx = np.exp(prod_cap_idx)\n\n # Calculate the cube of the bin's size.\n cube_size = np.power(bins, 3)\n\n # Calculate the score for each bin.\n scores = inv_diff * exp_cap_idx * cube_size\n\n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "A comprehensive score that combines the geometric mean of the bin's size and rest capacity, the exponential of the product of the bin's index and rest capacity, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item to.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are\n larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n size_rest_capacity_gm = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n index_rest_capacity_exp = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the inverse of the absolute difference between the item size and the\n # bin's rest capacity.\n item_rest_capacity_diff_inv = 1 / np.abs(bins - item)\n\n # Combine the three scores into a comprehensive score.\n scores = size_rest_capacity_gm * index_rest_capacity_exp * item_rest_capacity_diff_inv\n\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The backbone idea in the provided algorithms is to calculate the score for each bin based on the product or multiplication of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity. A new algorithm that has a totally different form can be designed by using the sum or addition of the functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the sum of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse function of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the sum of the functions of the bin's rest capacity and its index and the inverse function of the absolute difference.\n scores = bins + np.arange(len(bins)) + inv_abs_diff\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / diff**2\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_cap_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the square of the bin's size\n bin_size_sq = bins**2\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_cap_idx * bin_size_sq\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "{Algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, and the square root of the bin's size}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.abs(bins - item) + np.exp(bins * np.arange(len(bins)) - 0.5 * item) + np.sqrt(bins)\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Score each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's size and its index, and the inverse of the absolute difference between the item size and the bin's capacity, divided by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins / item - 1))) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp = np.exp(np.multiply(bins, np.arange(len(bins))))\n\n # Calculate the score for each bin.\n scores = np.multiply(np.multiply(bins, exp), 1 / diff)\n\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_bin_rest_index = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_prod_bin_rest_index = np.exp(prod_bin_rest_index)\n\n # Calculate the square of the bin's size.\n bin_size_squared = np.square(bins)\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * exp_prod_bin_rest_index * bin_size_squared\n\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(1.0 / np.abs(item - bins), np.sqrt(bins)) * np.exp(bins * np.arange(bins.shape[0]))\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity, and the bin index.",
"code": "def score(item, bins):\n scores = bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins - item) + 1) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_2.json
================================================
[
{
"algorithm": "New algorithm prioritizes bins with higher rest capacity and penalizes bins with rest capacity much larger than item size and equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n\n # Find feasible bins that can hold the 'item'.\n feasible_bins = bins[bins >= item]\n \n if len(feasible_bins) == 0:\n return np.zeros_like(bins)\n \n # Calculate the rest capacity after assigning the 'item'.\n rest_capacities = feasible_bins - item\n \n # Calculate the score for each feasible bin.\n scores = 1 / (rest_capacities + 1)\n \n # Penalize bins with rest capacity much larger than item size or equal to the maximum capacity.\n max_capacity = np.max(bins)\n scores -= (rest_capacities > max_capacity - item) * 0.5\n scores -= (rest_capacities > item) * 0.25\n \n # Normalize the scores.\n scores /= np.max(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Modified version that calculates the ratio of the item to the bin capacity and penalizes full bins more harshly using a logarithmic function.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 - np.power(1 - item / bins, 2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The score function will prioritize bins with specific patterns in their rest capacities. The patterns are repeated but alternated by bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score bins based on their rest capacities and item size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins.\n\n Returns:\n np.array: Scores for the bins.\n \"\"\"\n\n # Pattern 1: Prioritize bins with rest capacity equal to item size\n pattern1 = np.where(bins == item, np.full(bins.shape, 100), np.zeros(bins.shape))\n\n # Pattern 2: Prioritize bins with alternating rest capacities\n pattern2 = np.where(bins % (item * 2) == item, np.full(bins.shape, 50), np.zeros(bins.shape))\n\n # Combine patterns\n scores = pattern1 + pattern2\n\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "A score function that prioritized bins based on the ratio of their rest capacity to their index and penalized bins with a rest capacity much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins for assigning an item to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment. \n \"\"\"\n\n # Calculate ratio of rest capacity to bin index, penalized by large capacity.\n scores = bins / np.arange(1, len(bins) + 1)\n scores = scores / (1 + np.maximum(0, bins - item))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score of 1 divided by the difference between the maximum capacity and the bin's rest capacity, or 0 if the bin cannot accommodate the item.",
"code": "import numpy as np\ndef score(item, bins):\n scores = np.zeros_like(bins)\n idx = bins>=item\n scores[idx] = np.minimum(1.0, 1.0/(bins[idx]-item))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the inverse of the remaining capacity, and return the maximum score if the remaining capacity is less than a threshold, else return -1.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n threshold = bins.max() / 2\n scores = 1.0 / np.maximum(bins - item, 1)\n scores[bins < item] = -1\n scores[bins <= threshold] = np.maximum(scores[bins <= threshold], -1)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as the product of the bin's rest capacity and the exponential of the negative bin number, penalized by the number of bins that can fit the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[bins >= item]\n num_feasible_bins = len(feasible_bins)\n scores = feasible_bins * np.exp(-np.arange(num_feasible_bins))\n scores /= np.sum(scores)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of rest capacity and the reciprocal of bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * np.reciprocal(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the rest capacity with the inverse of the bin index, and subtracts the negative maximum rest capacity from the product to adjust the score for the maximum capacity bin and set it to 0 if feasible and -1 if infeasible.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculates the scores for each bin based on the item size and remaining bin capacities.\n\n Args:\n item: Size of the item to be assigned.\n bins: Array of remaining capacities for feasible bins.\n\n Returns:\n Array of scores for each bin.\n \"\"\"\n\n # Calculate the product of remaining capacity and inverse bin index.\n scores = bins * (1.0 / np.arange(1, len(bins) + 1))\n\n # Adjust scores for maximum capacity bin and infeasible bins.\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n scores[bins < item] = -1\n\n # Return the scores.\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "An algorithm that calculates the score of a bin as the product of the inverse of bin index, the inverse of bin rest capacity, and the size of the bin.",
"code": "import numpy as np\ndef score(item, bins):\n # Get valid bins with enough capacity\n valid_bins = bins[bins >= item]\n # Ensure no empty bin is used\n valid_bins = valid_bins[valid_bins != 0]\n # Calculate the score for each valid bin\n scores = (1 / np.arange(1, len(valid_bins) + 1)) * (1 / valid_bins) * item\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin as a weighted sum of its rest capacity and its ratio to the item size, where the weights are inversely proportional to the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score of a bin as a weighted sum of its rest capacity and its ratio to the item size, where the weights are inversely proportional to the bin index.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n weights = 1.0 / np.arange(1, len(bins) + 1)\n scores = weights * bins / item\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "New algorithm calculates scores based on a weighted average of bin rest capacity, maximum bin capacity, and bin number.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates scores for a set of bins to assign an item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin.\n rest_capacities = bins - item\n\n # Calculate the maximum bin capacity.\n max_capacity = np.max(bins)\n\n # Calculate the bin number.\n bin_number = np.arange(len(bins)) + 1\n\n # Calculate the scores.\n scores = 0.5 * rest_capacities / max_capacity + 0.25 * bin_number + 0.25\n\n return scores",
"objective": 0.04417,
"other_inf": null
},
{
"algorithm": "New algorithm: Prioritizes bins with slightly smaller rest capacity than item size and penalizes bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins, dtype=np.float32)\n scores[bins <= item] = -1e9\n scores[bins == bins.max()] = -1e9\n scores -= (bins - item)**2\n return scores",
"objective": 0.04779,
"other_inf": null
},
{
"algorithm": "Modified algorithm that calculates the ratio of the item to the bin capacity and penalizes full bins more harshly using an exponential function.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.maximum(bins - item, 0) / np.maximum(bins, 1e-8)\n scores /= np.exp(bins)\n return scores",
"objective": 0.05071,
"other_inf": null
},
{
"algorithm": "{ New algorithm: Calculate the scores for each bin by subtracting 1 from the rest capacity if it is less than the maximum capacity, subtracting 2 if it is equal to the maximum capacity, and subtracting 3 if the rest capacity is less than the item size. }",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.where(\n bins < item,\n -3,\n np.where(bins == item, -2, -1 * np.minimum(1, bins - item - 1))\n )\n return scores",
"objective": 0.05131,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score of each bin based on the current fill level, using a weighted average of the fill level and the inverse of the bin number, then score based on the fill level only.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n assert (bins >= item).all(), \"Bin capacity should be larger than or equal to the item size\"\n fill_level = 1 - bins / (bins + item)\n bin_number = np.arange(1, len(bins) + 1)\n scores = 0.5 * fill_level + 0.5 / bin_number\n scores[bins == item] = -np.inf # Exclude full bins\n return scores",
"objective": 0.05343,
"other_inf": null
},
{
"algorithm": "The new algorithm initializes scores for bins that have enough capacity as 1, and 0 otherwise, and then penalizes bins with a full capacity by decreasing their scores by 0.5.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones(len(bins))\n scores[bins < item] = 0\n scores[bins == item] -= 0.5\n return scores",
"objective": 0.05383,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the ratio of the item size to the bin's rest capacity, penalized by the number of bins that can fit the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n if len(bins) == 0:\n return np.array([[-1.]])\n ratios = item / bins\n penalty = 1 / (np.sum(ratios < 1) + 1)\n scores = penalty * ratios\n scores[np.argmax(scores)] = 0.\n return scores",
"objective": 0.05654,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_20.json
================================================
[
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n rest_capacities = bins - item\n scores = rest_capacities * np.exp(rest_capacities * np.arange(len(bins))) * (1 / np.abs(rest_capacities)) * np.sqrt(bins)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculates the score for each bin based on the given item size.\n\n The score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geom_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n exp_prod = np.exp(np.arange(len(bins)) * (bins - item))\n\n # Calculate the score for each bin.\n scores = inv_diff * geom_mean * exp_prod\n\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by multiplying the exponential of the difference between the item's size and the bin's rest capacity with the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the sum of the inverse of the absolute difference between the item's size and the bin's rest capacity and the square root of the bin's size",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacities = bins - item\n scores = np.exp(-np.abs(rest_capacities)) * np.sqrt(np.exp(rest_capacities * np.arange(1, len(bins) + 1))) * np.exp(1 / np.abs(rest_capacities) + np.sqrt(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates a score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n\n # Calculate the rest capacity of each bin.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = np.multiply(bins, np.exp(np.multiply(rest_capacities, np.arange(1, len(rest_capacities) + 1)))) / np.abs(rest_capacities)\n\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Main parameters of the existing algorithm include: inverse function, exponent, and bin size square. The new algorithm uses the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the cube of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_cap_idx = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_cap_idx = np.exp(prod_cap_idx)\n\n # Calculate the cube of the bin's size.\n cube_size = np.power(bins, 3)\n\n # Calculate the score for each bin.\n scores = inv_diff * exp_cap_idx * cube_size\n\n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "A comprehensive score that combines the geometric mean of the bin's size and rest capacity, the exponential of the product of the bin's index and rest capacity, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item to.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are\n larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n size_rest_capacity_gm = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n index_rest_capacity_exp = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the inverse of the absolute difference between the item size and the\n # bin's rest capacity.\n item_rest_capacity_diff_inv = 1 / np.abs(bins - item)\n\n # Combine the three scores into a comprehensive score.\n scores = size_rest_capacity_gm * index_rest_capacity_exp * item_rest_capacity_diff_inv\n\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The backbone idea in the provided algorithms is to calculate the score for each bin based on the product or multiplication of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity. A new algorithm that has a totally different form can be designed by using the sum or addition of the functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the sum of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse function of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the sum of the functions of the bin's rest capacity and its index and the inverse function of the absolute difference.\n scores = bins + np.arange(len(bins)) + inv_abs_diff\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / diff**2\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_cap_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the square of the bin's size\n bin_size_sq = bins**2\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_cap_idx * bin_size_sq\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "{Algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, and the square root of the bin's size}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.abs(bins - item) + np.exp(bins * np.arange(len(bins)) - 0.5 * item) + np.sqrt(bins)\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Score each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's size and its index, and the inverse of the absolute difference between the item size and the bin's capacity, divided by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins / item - 1))) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp = np.exp(np.multiply(bins, np.arange(len(bins))))\n\n # Calculate the score for each bin.\n scores = np.multiply(np.multiply(bins, exp), 1 / diff)\n\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_bin_rest_index = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_prod_bin_rest_index = np.exp(prod_bin_rest_index)\n\n # Calculate the square of the bin's size.\n bin_size_squared = np.square(bins)\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * exp_prod_bin_rest_index * bin_size_squared\n\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.multiply(1.0 / np.abs(item - bins), np.sqrt(bins)) * np.exp(bins * np.arange(bins.shape[0]))\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New algorithm: Score each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity, and the bin index.",
"code": "def score(item, bins):\n scores = bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins - item) + 1) * np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0165,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_21.json
================================================
[
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n rest_capacities = bins - item\n scores = rest_capacities * np.exp(rest_capacities * np.arange(len(bins))) * (1 / np.abs(rest_capacities)) * np.sqrt(bins)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculates the score for each bin based on the given item size.\n\n The score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geom_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n exp_prod = np.exp(np.arange(len(bins)) * (bins - item))\n\n # Calculate the score for each bin.\n scores = inv_diff * geom_mean * exp_prod\n\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score calculated based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size and the inverse of the square root of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((bins - item / 2) * np.arange(1, len(bins) + 1)) / np.sqrt(np.abs(item - bins))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by multiplying the exponential of the difference between the item's size and the bin's rest capacity with the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the sum of the inverse of the absolute difference between the item's size and the bin's rest capacity and the square root of the bin's size",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacities = bins - item\n scores = np.exp(-np.abs(rest_capacities)) * np.sqrt(np.exp(rest_capacities * np.arange(1, len(bins) + 1))) * np.exp(1 / np.abs(rest_capacities) + np.sqrt(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates a score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n\n # Calculate the rest capacity of each bin.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = np.multiply(bins, np.exp(np.multiply(rest_capacities, np.arange(1, len(rest_capacities) + 1)))) / np.abs(rest_capacities)\n\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Main parameters of the existing algorithm include: inverse function, exponent, and bin size square. The new algorithm uses the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the cube of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_cap_idx = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_cap_idx = np.exp(prod_cap_idx)\n\n # Calculate the cube of the bin's size.\n cube_size = np.power(bins, 3)\n\n # Calculate the score for each bin.\n scores = inv_diff * exp_cap_idx * cube_size\n\n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "A comprehensive score that combines the geometric mean of the bin's size and rest capacity, the exponential of the product of the bin's index and rest capacity, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item to.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are\n larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n size_rest_capacity_gm = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n index_rest_capacity_exp = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the inverse of the absolute difference between the item size and the\n # bin's rest capacity.\n item_rest_capacity_diff_inv = 1 / np.abs(bins - item)\n\n # Combine the three scores into a comprehensive score.\n scores = size_rest_capacity_gm * index_rest_capacity_exp * item_rest_capacity_diff_inv\n\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The backbone idea in the provided algorithms is to calculate the score for each bin based on the product or multiplication of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity. A new algorithm that has a totally different form can be designed by using the sum or addition of the functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the sum of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse function of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the sum of the functions of the bin's rest capacity and its index and the inverse function of the absolute difference.\n scores = bins + np.arange(len(bins)) + inv_abs_diff\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / diff**2\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_cap_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the square of the bin's size\n bin_size_sq = bins**2\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_cap_idx * bin_size_sq\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "{Algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, and the square root of the bin's size}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.abs(bins - item) + np.exp(bins * np.arange(len(bins)) - 0.5 * item) + np.sqrt(bins)\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Score each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's size and its index, and the inverse of the absolute difference between the item size and the bin's capacity, divided by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins / item - 1))) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity and its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp = np.exp(np.multiply(bins, np.arange(len(bins))))\n\n # Calculate the score for each bin.\n scores = np.multiply(np.multiply(bins, exp), 1 / diff)\n\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_bin_rest_index = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_prod_bin_rest_index = np.exp(prod_bin_rest_index)\n\n # Calculate the square of the bin's size.\n bin_size_squared = np.square(bins)\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * exp_prod_bin_rest_index * bin_size_squared\n\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the linear of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the linear of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_cap_idx = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_cap_idx = np.exp(prod_cap_idx)\n\n # Calculate the linear of the bin's size.\n linear_size = bins\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * exp_cap_idx * linear_size\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "The backbone idea is to combine the different operations, including exponential, square root, and division, in various ways to calculate the bin scores. Inspired by this idea, the new algorithm calculates the score as the sum of the exponential of the product of the bin's rest capacity and its index, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * np.arange(1, len(bins) + 1)) + np.sqrt(bins) + 1 / np.abs(bins - item)\n return scores",
"objective": 0.0164,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_22.json
================================================
[
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n rest_capacities = bins - item\n scores = rest_capacities * np.exp(rest_capacities * np.arange(len(bins))) * (1 / np.abs(rest_capacities)) * np.sqrt(bins)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculates the score for each bin based on the given item size.\n\n The score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geom_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n exp_prod = np.exp(np.arange(len(bins)) * (bins - item))\n\n # Calculate the score for each bin.\n scores = inv_diff * geom_mean * exp_prod\n\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score calculated based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size and the inverse of the square root of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((bins - item / 2) * np.arange(1, len(bins) + 1)) / np.sqrt(np.abs(item - bins))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by multiplying the exponential of the difference between the item's size and the bin's rest capacity with the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the sum of the inverse of the absolute difference between the item's size and the bin's rest capacity and the square root of the bin's size",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacities = bins - item\n scores = np.exp(-np.abs(rest_capacities)) * np.sqrt(np.exp(rest_capacities * np.arange(1, len(bins) + 1))) * np.exp(1 / np.abs(rest_capacities) + np.sqrt(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates a score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n\n # Calculate the rest capacity of each bin.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = np.multiply(bins, np.exp(np.multiply(rest_capacities, np.arange(1, len(rest_capacities) + 1)))) / np.abs(rest_capacities)\n\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Main parameters of the existing algorithm include: inverse function, exponent, and bin size square. The new algorithm uses the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the cube of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_cap_idx = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_cap_idx = np.exp(prod_cap_idx)\n\n # Calculate the cube of the bin's size.\n cube_size = np.power(bins, 3)\n\n # Calculate the score for each bin.\n scores = inv_diff * exp_cap_idx * cube_size\n\n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "A comprehensive score that combines the geometric mean of the bin's size and rest capacity, the exponential of the product of the bin's index and rest capacity, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Scores a set of bins to assign an item to.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are\n larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n size_rest_capacity_gm = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n index_rest_capacity_exp = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the inverse of the absolute difference between the item size and the\n # bin's rest capacity.\n item_rest_capacity_diff_inv = 1 / np.abs(bins - item)\n\n # Combine the three scores into a comprehensive score.\n scores = size_rest_capacity_gm * index_rest_capacity_exp * item_rest_capacity_diff_inv\n\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The backbone idea in the provided algorithms is to calculate the score for each bin based on the product or multiplication of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity. A new algorithm that has a totally different form can be designed by using the sum or addition of the functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the sum of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse function of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the sum of the functions of the bin's rest capacity and its index and the inverse function of the absolute difference.\n scores = bins + np.arange(len(bins)) + inv_abs_diff\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / diff**2\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_cap_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the square of the bin's size\n bin_size_sq = bins**2\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_cap_idx * bin_size_sq\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "{Algorithm: Calculate the score for each bin based on the sum of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, and the square root of the bin's size}",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1.0 / np.abs(bins - item) + np.exp(bins * np.arange(len(bins)) - 0.5 * item) + np.sqrt(bins)\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Score each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's size and its index, and the inverse of the absolute difference between the item size and the bin's capacity, divided by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins / item - 1))) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the division of the product of the bin's size and the exponential of the product of the bin's rest capacity with its index by the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(len(bins))) / np.abs(bins - item))\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "The common backbone idea is to comprehensively consider the bin's size, rest capacity, and its difference from the item size. My new algorithm calculates the score for each bin by multiplying the inverse of the absolute difference between the item size and the bin's rest capacity, the square of the bin's rest capacity, and the exponential of the product of the bin's index and its size.",
"code": "import numpy as np\n\ndef score(item, bins):\n diff = np.abs(bins - item)\n inv_diff = 1 / diff\n sq_rest = bins ** 2\n exp_idx_size = np.exp(bins * np.arange(len(bins)))\n scores = inv_diff * sq_rest * exp_idx_size\n return scores",
"objective": 0.0161,
"other_inf": null
},
{
"algorithm": "The bin score is the product of the inverse of the difference between the item size and the bin's rest capacity, the arithmetic mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score a set of bins to assign an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: A numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the difference between the item size and the bin's rest capacity.\n diff = bins - item\n\n # Calculate the inverse of the difference.\n inv_diff = 1.0 / diff\n\n # Calculate the arithmetic mean of the bin's size and rest capacity.\n mean = (bins + item) / 2.0\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n exp = np.exp(np.arange(len(bins)) * bins)\n\n # Calculate the score.\n scores = inv_diff * mean * exp\n\n return scores",
"objective": 0.0162,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size divided by the square of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the absolute difference between the item and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size divided by the square of the bin's index.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product.\n exp_prod = np.exp(prod)\n\n # Calculate the square of the bin's size.\n size_sq = bins**2\n\n # Calculate the square of the bin's index.\n index_sq = np.arange(1, len(bins) + 1)**2\n\n # Calculate the score for each bin.\n scores = inv_diff * exp_prod * (size_sq / index_sq)\n\n return scores",
"objective": 0.0163,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_23.json
================================================
[
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity to the power of its index, the exponential of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score for each bin based on the product of the bin's rest capacity to the power of its index, the exponential of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n scores = np.power(bins, np.arange(len(bins))) * np.exp(bins) * (1 / np.abs(bins - item))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n rest_capacities = bins - item\n scores = rest_capacities * np.exp(rest_capacities * np.arange(len(bins))) * (1 / np.abs(rest_capacities)) * np.sqrt(bins)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculates the score for each bin based on the given item size.\n\n The score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geom_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n exp_prod = np.exp(np.arange(len(bins)) * (bins - item))\n\n # Calculate the score for each bin.\n scores = inv_diff * geom_mean * exp_prod\n\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score calculated based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size and the inverse of the square root of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((bins - item / 2) * np.arange(1, len(bins) + 1)) / np.sqrt(np.abs(item - bins))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by multiplying the exponential of the difference between the item's size and the bin's rest capacity with the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the sum of the inverse of the absolute difference between the item's size and the bin's rest capacity and the square root of the bin's size",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacities = bins - item\n scores = np.exp(-np.abs(rest_capacities)) * np.sqrt(np.exp(rest_capacities * np.arange(1, len(bins) + 1))) * np.exp(1 / np.abs(rest_capacities) + np.sqrt(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus the item size, and the inverse of the square of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins * np.exp((bins - item) * np.arange(1, len(bins) + 1))) / np.square(np.abs(bins - item)))\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the square root of the inverse of the absolute difference between the item size and the bin's rest capacity, the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n bin_size = bins - item\n bin_idx = np.arange(len(bins))\n scores = np.sqrt(1 / np.abs(bin_size)) * bins * np.exp(bin_size * bin_idx - item / 2)\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Main parameters of the existing algorithm include: inverse function, exponent, and bin size square. The new algorithm uses the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the cube of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_cap_idx = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_cap_idx = np.exp(prod_cap_idx)\n\n # Calculate the cube of the bin's size.\n cube_size = np.power(bins, 3)\n\n # Calculate the score for each bin.\n scores = inv_diff * exp_cap_idx * cube_size\n\n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the product of the bin's size and the exponential of the product of the bin's rest capacity with its index by the inverse function of the absolute difference between the item size and the bin's rest capacity.",
"code": "def score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score for each bin based on the multiplication of the product of the bin's size and the exponential of the product of the bin's rest capacity with its index by the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n bin_sizes = bins - item\n scores = bin_sizes * np.exp(bins * np.arange(1, len(bins) + 1, 1)) / abs(bin_sizes)\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The backbone idea in the provided algorithms is to calculate the score for each bin based on the product or multiplication of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity. A new algorithm that has a totally different form can be designed by using the sum or addition of the functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the sum of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse function of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the sum of the functions of the bin's rest capacity and its index and the inverse function of the absolute difference.\n scores = bins + np.arange(len(bins)) + inv_abs_diff\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / diff**2\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_cap_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the square of the bin's size\n bin_size_sq = bins**2\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_cap_idx * bin_size_sq\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Main parameters of the provided algorithm: item size, bin rest capacity, bin index. New algorithm: Assign the item to the bin with the maximum score calculated based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size and the inverse of the square root of the absolute difference between the item size and the bin's rest capacity, divided by the sum of the exponentials of the products of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * np.arange(len(bins)) - 0.5 * item) / np.sqrt(np.abs(bins - item))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Score each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's size and its index, and the inverse of the absolute difference between the item size and the bin's capacity, divided by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins / item - 1))) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the division of the product of the bin's size and the exponential of the product of the bin's rest capacity with its index by the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(len(bins))) / np.abs(bins - item))\n return scores",
"objective": 0.016,
"other_inf": null
},
{
"algorithm": "The common backbone idea is to comprehensively consider the bin's size, rest capacity, and its difference from the item size. My new algorithm calculates the score for each bin by multiplying the inverse of the absolute difference between the item size and the bin's rest capacity, the square of the bin's rest capacity, and the exponential of the product of the bin's index and its size.",
"code": "import numpy as np\n\ndef score(item, bins):\n diff = np.abs(bins - item)\n inv_diff = 1 / diff\n sq_rest = bins ** 2\n exp_idx_size = np.exp(bins * np.arange(len(bins)))\n scores = inv_diff * sq_rest * exp_idx_size\n return scores",
"objective": 0.0161,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_24.json
================================================
[
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity to the power of its index, the exponential of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score for each bin based on the product of the bin's rest capacity to the power of its index, the exponential of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n scores = np.power(bins, np.arange(len(bins))) * np.exp(bins) * (1 / np.abs(bins - item))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n rest_capacities = bins - item\n scores = rest_capacities * np.exp(rest_capacities * np.arange(len(bins))) * (1 / np.abs(rest_capacities)) * np.sqrt(bins)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculates the score for each bin based on the given item size.\n\n The score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geom_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n exp_prod = np.exp(np.arange(len(bins)) * (bins - item))\n\n # Calculate the score for each bin.\n scores = inv_diff * geom_mean * exp_prod\n\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score calculated based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size and the inverse of the square root of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((bins - item / 2) * np.arange(1, len(bins) + 1)) / np.sqrt(np.abs(item - bins))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by multiplying the exponential of the difference between the item's size and the bin's rest capacity with the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the sum of the inverse of the absolute difference between the item's size and the bin's rest capacity and the square root of the bin's size",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacities = bins - item\n scores = np.exp(-np.abs(rest_capacities)) * np.sqrt(np.exp(rest_capacities * np.arange(1, len(bins) + 1))) * np.exp(1 / np.abs(rest_capacities) + np.sqrt(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus the item size, and the inverse of the square of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins * np.exp((bins - item) * np.arange(1, len(bins) + 1))) / np.square(np.abs(bins - item)))\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the square root of the inverse of the absolute difference between the item size and the bin's rest capacity, the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n bin_size = bins - item\n bin_idx = np.arange(len(bins))\n scores = np.sqrt(1 / np.abs(bin_size)) * bins * np.exp(bin_size * bin_idx - item / 2)\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Main parameters of the existing algorithm include: inverse function, exponent, and bin size square. The new algorithm uses the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the cube of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_cap_idx = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_cap_idx = np.exp(prod_cap_idx)\n\n # Calculate the cube of the bin's size.\n cube_size = np.power(bins, 3)\n\n # Calculate the score for each bin.\n scores = inv_diff * exp_cap_idx * cube_size\n\n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the product of the bin's size and the exponential of the product of the bin's rest capacity with its index by the inverse function of the absolute difference between the item size and the bin's rest capacity.",
"code": "def score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score for each bin based on the multiplication of the product of the bin's size and the exponential of the product of the bin's rest capacity with its index by the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n bin_sizes = bins - item\n scores = bin_sizes * np.exp(bins * np.arange(1, len(bins) + 1, 1)) / abs(bin_sizes)\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "{New algorithm: The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of a scaling factor, the bin's index, and rest capacity.}",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, \n the geometric mean of the bin's size and rest capacity, and the exponential of the product of a scaling factor, the bin's index, and rest capacity.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1.0 / abs_diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geo_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of a scaling factor, the bin's index, and rest capacity.\n exp_prod = np.exp(0.1 * np.arange(len(bins)) * bins)\n\n # Calculate the bin score.\n scores = inv_diff * geo_mean * exp_prod\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The backbone idea in the provided algorithms is to calculate the score for each bin based on the product or multiplication of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity. A new algorithm that has a totally different form can be designed by using the sum or addition of the functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the sum of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse function of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the sum of the functions of the bin's rest capacity and its index and the inverse function of the absolute difference.\n scores = bins + np.arange(len(bins)) + inv_abs_diff\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / diff**2\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_cap_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the square of the bin's size\n bin_size_sq = bins**2\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_cap_idx * bin_size_sq\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Main parameters of the provided algorithm: item size, bin rest capacity, bin index. New algorithm: Assign the item to the bin with the maximum score calculated based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size and the inverse of the square root of the absolute difference between the item size and the bin's rest capacity, divided by the sum of the exponentials of the products of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * np.arange(len(bins)) - 0.5 * item) / np.sqrt(np.abs(bins - item))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Score each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's size and its index, and the inverse of the absolute difference between the item size and the bin's capacity, divided by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins / item - 1))) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0156,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the division of the product of the bin's size and the exponential of the product of the bin's rest capacity with its index by the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(len(bins))) / np.abs(bins - item))\n return scores",
"objective": 0.016,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_25.json
================================================
[
{
"algorithm": "{New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index, and the inverse of the absolute difference between the item size and the bin's rest capacity.}",
"code": "import numpy as np\n\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the\n bin's size, the exponential of the product of the bin's rest\n capacity with its index, and the inverse of the absolute\n difference between the item size and the bin's rest capacity.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins,\n which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n max_bin = np.max(bins)\n min_bin = np.min(bins)\n avg_bin = np.mean(bins)\n scores = bins * np.exp(bins * np.arange(len(bins))) / np.abs(item - bins)\n\n # Penalize bins that are too full or too empty\n scores = scores * (1 - np.abs(bins - avg_bin) / (max_bin - min_bin))\n\n return scores",
"objective": 0.00624,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity to the power of its index, the exponential of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score for each bin based on the product of the bin's rest capacity to the power of its index, the exponential of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins for assignment.\n \"\"\"\n\n scores = np.power(bins, np.arange(len(bins))) * np.exp(bins) * (1 / np.abs(bins - item))\n return scores",
"objective": 0.00745,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, the inverse of the absolute difference between the item size and the bin's rest capacity, and the square root of the bin's size.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n rest_capacities = bins - item\n scores = rest_capacities * np.exp(rest_capacities * np.arange(len(bins))) * (1 / np.abs(rest_capacities)) * np.sqrt(bins)\n return scores",
"objective": 0.00785,
"other_inf": null
},
{
"algorithm": "The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculates the score for each bin based on the given item size.\n\n The score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of the bin's index and rest capacity.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geom_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of the bin's index and rest capacity.\n exp_prod = np.exp(np.arange(len(bins)) * (bins - item))\n\n # Calculate the score for each bin.\n scores = inv_diff * geom_mean * exp_prod\n\n return scores",
"objective": 0.00835,
"other_inf": null
},
{
"algorithm": "Assign the item to the bin with the maximum score calculated based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size and the inverse of the square root of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp((bins - item / 2) * np.arange(1, len(bins) + 1)) / np.sqrt(np.abs(item - bins))\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus half of the item size, and the inverse of the absolute difference between the item size and the bin's rest capacity.\n scores = bins * np.exp((bins - item / 2) * np.arange(len(bins))) / np.abs(bins - item)\n\n # Return the scores.\n return scores",
"objective": 0.00865,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_indicator = np.maximum(np.zeros(bins.size), bins - item)\n scores = 1 / np.abs(rest_indicator) * np.sqrt(bins) * np.exp(rest_indicator * np.arange(bins.size) - item * 0.5)\n return scores",
"objective": 0.00906,
"other_inf": null
},
{
"algorithm": "Calculate the score of each bin by multiplying the exponential of the difference between the item's size and the bin's rest capacity with the square root of the exponential of the product of the bin's rest capacity and its index, and the exponential of the sum of the inverse of the absolute difference between the item's size and the bin's rest capacity and the square root of the bin's size",
"code": "import numpy as np\n\ndef score(item, bins):\n rest_capacities = bins - item\n scores = np.exp(-np.abs(rest_capacities)) * np.sqrt(np.exp(rest_capacities * np.arange(1, len(bins) + 1))) * np.exp(1 / np.abs(rest_capacities) + np.sqrt(bins))\n return scores",
"objective": 0.00916,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the bin's size, the exponential of the product of the bin's rest capacity with its index minus the item size, and the inverse of the square of the absolute difference between the item size and the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = ((bins * np.exp((bins - item) * np.arange(1, len(bins) + 1))) / np.square(np.abs(bins - item)))\n return scores",
"objective": 0.00956,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size, the square root of the bin's size, and the inverse of the absolute difference between the item size and the bin's rest capacity",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * (np.arange(1, bins.size+1) - item/2)) * np.sqrt(bins) * 1/np.abs(bins - item)\n return scores",
"objective": 0.00976,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the square root of the inverse of the absolute difference between the item size and the bin's rest capacity, the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n bin_size = bins - item\n bin_idx = np.arange(len(bins))\n scores = np.sqrt(1 / np.abs(bin_size)) * bins * np.exp(bin_size * bin_idx - item / 2)\n return scores",
"objective": 0.01046,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Main parameters of the existing algorithm include: inverse function, exponent, and bin size square. The new algorithm uses the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the cube of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for assigning an item to a set of bins.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n diff = np.abs(item - bins)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1 / diff\n\n # Calculate the product of the bin's rest capacity and its index.\n prod_cap_idx = bins * np.arange(1, len(bins) + 1)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index.\n exp_cap_idx = np.exp(prod_cap_idx)\n\n # Calculate the cube of the bin's size.\n cube_size = np.power(bins, 3)\n\n # Calculate the score for each bin.\n scores = inv_diff * exp_cap_idx * cube_size\n\n return scores",
"objective": 0.01278,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the product of the bin's size and the exponential of the product of the bin's rest capacity with its index by the inverse function of the absolute difference between the item size and the bin's rest capacity.",
"code": "def score(item: int, bins: np.array) -> np.array:\n \"\"\"Calculate the score for each bin based on the multiplication of the product of the bin's size and the exponential of the product of the bin's rest capacity with its index by the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n bin_sizes = bins - item\n scores = bin_sizes * np.exp(bins * np.arange(1, len(bins) + 1, 1)) / abs(bin_sizes)\n return scores",
"objective": 0.01318,
"other_inf": null
},
{
"algorithm": "{New algorithm: The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the geometric mean of the bin's size and rest capacity, and the exponential of the product of a scaling factor, the bin's index, and rest capacity.}",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n The bin score is the product of the inverse of the absolute difference between the item size and the bin's rest capacity, \n the geometric mean of the bin's size and rest capacity, and the exponential of the product of a scaling factor, the bin's index, and rest capacity.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_diff = 1.0 / abs_diff\n\n # Calculate the geometric mean of the bin's size and rest capacity.\n geo_mean = np.sqrt(bins * (bins - item))\n\n # Calculate the exponential of the product of a scaling factor, the bin's index, and rest capacity.\n exp_prod = np.exp(0.1 * np.arange(len(bins)) * bins)\n\n # Calculate the bin score.\n scores = inv_diff * geo_mean * exp_prod\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the multiplication of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the product of the bin's size and the bin's rest capacity, and the exponential of the product of the bin's index with the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = (1 / np.abs(bins - item)) * np.sqrt(bins * (bins - item)) * np.exp(bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.01419,
"other_inf": null
},
{
"algorithm": "The backbone idea in the provided algorithms is to calculate the score for each bin based on the product or multiplication of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity. A new algorithm that has a totally different form can be designed by using the sum or addition of the functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the sum of functions of the bin's rest capacity and its index and the inverse function of the absolute difference between the item size and the bin's rest capacity.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse function of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the sum of the functions of the bin's rest capacity and its index and the inverse function of the absolute difference.\n scores = bins + np.arange(len(bins)) + inv_abs_diff\n\n return scores",
"objective": 0.01449,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the square of the bin's size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(bins - item)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / diff**2\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_cap_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the square of the bin's size\n bin_size_sq = bins**2\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_cap_idx * bin_size_sq\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "Main parameters of the provided algorithm: item size, bin rest capacity, bin index. New algorithm: Assign the item to the bin with the maximum score calculated based on the sum of the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size and the inverse of the square root of the absolute difference between the item size and the bin's rest capacity, divided by the sum of the exponentials of the products of the bin's rest capacity with the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.exp(bins * np.arange(len(bins)) - 0.5 * item) / np.sqrt(np.abs(bins - item))\n return scores",
"objective": 0.01549,
"other_inf": null
},
{
"algorithm": "Score each bin based on the product of the bin's rest capacity, the exponential of the product of the bin's size and its index, and the inverse of the absolute difference between the item size and the bin's capacity, divided by the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (bins * np.exp(bins * np.arange(1, len(bins) + 1)) * (1 / np.abs(bins / item - 1))) / np.arange(1, len(bins) + 1)\n return scores",
"objective": 0.0156,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_3.json
================================================
[
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with higher rest capacity and penalizes bins with rest capacity much larger than item size and equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n\n # Find feasible bins that can hold the 'item'.\n feasible_bins = bins[bins >= item]\n \n if len(feasible_bins) == 0:\n return np.zeros_like(bins)\n \n # Calculate the rest capacity after assigning the 'item'.\n rest_capacities = feasible_bins - item\n \n # Calculate the score for each feasible bin.\n scores = 1 / (rest_capacities + 1)\n \n # Penalize bins with rest capacity much larger than item size or equal to the maximum capacity.\n max_capacity = np.max(bins)\n scores -= (rest_capacities > max_capacity - item) * 0.5\n scores -= (rest_capacities > item) * 0.25\n \n # Normalize the scores.\n scores /= np.max(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Assign each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Assigns each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = 1 / (rest_capacities * np.arange(1, len(bins) + 1))\n\n # Return the scores.\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.\n\n Args:\n item (int): The size of current item.\n bins (Numpy array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Numpy array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of bin available capacity.\n inv_cap = 1 / (bins - item)\n\n # Calculate the inverse of square root of bin index.\n inv_sqrt_idx = 1 / np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score of each bin.\n scores = inv_cap * inv_sqrt_idx * bins\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "Modified version that calculates the ratio of the item to the bin capacity and penalizes full bins more harshly using a logarithmic function.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 - np.power(1 - item / bins, 2)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "The score function will prioritize bins with specific patterns in their rest capacities. The patterns are repeated but alternated by bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score bins based on their rest capacities and item size.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins.\n\n Returns:\n np.array: Scores for the bins.\n \"\"\"\n\n # Pattern 1: Prioritize bins with rest capacity equal to item size\n pattern1 = np.where(bins == item, np.full(bins.shape, 100), np.zeros(bins.shape))\n\n # Pattern 2: Prioritize bins with alternating rest capacities\n pattern2 = np.where(bins % (item * 2) == item, np.full(bins.shape, 50), np.zeros(bins.shape))\n\n # Combine patterns\n scores = pattern1 + pattern2\n\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "A score function that prioritized bins based on the ratio of their rest capacity to their index and penalized bins with a rest capacity much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins for assigning an item to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment. \n \"\"\"\n\n # Calculate ratio of rest capacity to bin index, penalized by large capacity.\n scores = bins / np.arange(1, len(bins) + 1)\n scores = scores / (1 + np.maximum(0, bins - item))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score of 1 divided by the difference between the maximum capacity and the bin's rest capacity, or 0 if the bin cannot accommodate the item.",
"code": "import numpy as np\ndef score(item, bins):\n scores = np.zeros_like(bins)\n idx = bins>=item\n scores[idx] = np.minimum(1.0, 1.0/(bins[idx]-item))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the inverse of the remaining capacity, and return the maximum score if the remaining capacity is less than a threshold, else return -1.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n threshold = bins.max() / 2\n scores = 1.0 / np.maximum(bins - item, 1)\n scores[bins < item] = -1\n scores[bins <= threshold] = np.maximum(scores[bins <= threshold], -1)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of a bin as the sum of the inverse of bin index multiplied by the size of the bin and the inverse of bin rest capacity multiplied by the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n bin_idx = np.argwhere(bins >= item).flatten()\n bin_idx_weight = 1 / (1 + bin_idx)\n bin_cap_weight = 1 / (1 + bins[bin_idx] - item)\n scores = bin_idx_weight * bin_cap_weight\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as the product of the bin's rest capacity and the exponential of the negative bin number, penalized by the number of bins that can fit the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[bins >= item]\n num_feasible_bins = len(feasible_bins)\n scores = feasible_bins * np.exp(-np.arange(num_feasible_bins))\n scores /= np.sum(scores)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of rest capacity and the reciprocal of bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * np.reciprocal(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "A novel score function that calculates the ratio of the item's size to a weighted sum of rest capacity, bin index, and a small constant to avoid division by zero.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"A novel score function that calculates the ratio of the item's size to a weighted sum of rest capacity, bin index, and a small constant to avoid division by zero.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment. \n \"\"\"\n\n # Avoid division by zero by adding a small constant to the denominator.\n constant = 1e-6\n\n # Calculate the weighted sum of rest capacity, bin index, and constant.\n denominators = bins + bins * np.log(np.arange(1, len(bins) + 1)) + constant\n\n # Calculate the scores.\n scores = item / denominators\n\n return scores",
"objective": 0.04236,
"other_inf": null
},
{
"algorithm": "The new algorithm multiplies the rest capacity with the inverse of the bin index, and subtracts the negative maximum rest capacity from the product to adjust the score for the maximum capacity bin and set it to 0 if feasible and -1 if infeasible.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Calculates the scores for each bin based on the item size and remaining bin capacities.\n\n Args:\n item: Size of the item to be assigned.\n bins: Array of remaining capacities for feasible bins.\n\n Returns:\n Array of scores for each bin.\n \"\"\"\n\n # Calculate the product of remaining capacity and inverse bin index.\n scores = bins * (1.0 / np.arange(1, len(bins) + 1))\n\n # Adjust scores for maximum capacity bin and infeasible bins.\n max_capacity = np.max(bins)\n scores[bins == max_capacity] = 0\n scores[bins < item] = -1\n\n # Return the scores.\n return scores",
"objective": 0.04246,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of bin index, and the size of the bin.",
"code": "def score(item, bins):\n scores = np.zeros(len(bins))\n available_bins = np.where(bins >= item)[0]\n if len(available_bins) > 0:\n scores[available_bins] = 1 / bins[available_bins] * 1 / np.arange(1, len(available_bins) + 1) * item\n return scores",
"objective": 0.04256,
"other_inf": null
},
{
"algorithm": "\nDescription: \nThe algorithm calculates the scores for each bin based on their rest capacities and assigns the item to the bin with the maximum score, minimizing the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.maximum((bins - item), 1)\n scores[bins == bins.max()] = 0\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "Modified Algorithm: Prioritize bins with rest capacities equal to item size and small alternating differences from the item size to minimize bin usage, using a combination of score functions.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Modified Algorithm: Prioritize bins with rest capacities equal to item size and small alternating differences from the item size to minimize bin usage, using a combination of score functions.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute differences between the item size and the bin capacities.\n abs_diffs = np.abs(bins - item)\n\n # Calculate the alternating differences between the item size and the bin capacities.\n alt_diffs = abs_diffs % 2\n\n # Calculate the scores for the bins.\n scores = 1 / (abs_diffs + 1) * (1 - alt_diffs)\n\n return scores",
"objective": 0.04357,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of a bin as a weighted sum of its rest capacity and its ratio to the item size, where the weights are inversely proportional to the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score of a bin as a weighted sum of its rest capacity and its ratio to the item size, where the weights are inversely proportional to the bin index.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n weights = 1.0 / np.arange(1, len(bins) + 1)\n scores = weights * bins / item\n return scores",
"objective": 0.04407,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the product of the bin's rest capacity and the sum of the inverse of the bin number and a small constant to avoid division by zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score for each bin as the product of the bin's rest capacity and the sum of the inverse of the bin number and a small constant to avoid division by zero.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of the bin numbers.\n inv_bin_nums = 1.0 / np.arange(1, bins.shape[0] + 1)\n\n # Calculate the scores.\n scores = bins * (inv_bin_nums + 0.0001)\n\n return scores",
"objective": 0.04417,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_4.json
================================================
[
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with higher rest capacity and penalizes bins with rest capacity much larger than item size and equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n\n # Find feasible bins that can hold the 'item'.\n feasible_bins = bins[bins >= item]\n \n if len(feasible_bins) == 0:\n return np.zeros_like(bins)\n \n # Calculate the rest capacity after assigning the 'item'.\n rest_capacities = feasible_bins - item\n \n # Calculate the score for each feasible bin.\n scores = 1 / (rest_capacities + 1)\n \n # Penalize bins with rest capacity much larger than item size or equal to the maximum capacity.\n max_capacity = np.max(bins)\n scores -= (rest_capacities > max_capacity - item) * 0.5\n scores -= (rest_capacities > item) * 0.25\n \n # Normalize the scores.\n scores /= np.max(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Assign each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Assigns each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = 1 / (rest_capacities * np.arange(1, len(bins) + 1))\n\n # Return the scores.\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.\n\n Args:\n item (int): The size of current item.\n bins (Numpy array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Numpy array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of bin available capacity.\n inv_cap = 1 / (bins - item)\n\n # Calculate the inverse of square root of bin index.\n inv_sqrt_idx = 1 / np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score of each bin.\n scores = inv_cap * inv_sqrt_idx * bins\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "The score of a bin is calculated as the product of the inverse of bin index, the inverse of bin available capacity after assigning the item, and the size of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score of a set of bins for assigning an item.\n\n The score of a bin is calculated as the product of the inverse of bin index, the inverse of bin available capacity after assigning the item, and the size of the bin.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of bin index and available capacity\n inv_index = 1.0 / np.arange(1, len(bins) + 1)\n inv_capacity = 1.0 / (bins - item)\n\n # Calculate the scores\n scores = inv_index * inv_capacity * bins\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The proposed scoring function calculates the score of each bin as the reciprocal of the sum of its rest capacity and the ratio of the item's size to the bin's rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / (bins + item / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "A novel score function that calculates the ratio of the item's size to a weighted sum of rest capacity, square root of bin index, and a small constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.sqrt(np.arange(1, bins.shape[0]+1)) + 1e-6))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "A score function that prioritized bins based on the ratio of their rest capacity to their index and penalized bins with a rest capacity much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins for assigning an item to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment. \n \"\"\"\n\n # Calculate ratio of rest capacity to bin index, penalized by large capacity.\n scores = bins / np.arange(1, len(bins) + 1)\n scores = scores / (1 + np.maximum(0, bins - item))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score of 1 divided by the difference between the maximum capacity and the bin's rest capacity, or 0 if the bin cannot accommodate the item.",
"code": "import numpy as np\ndef score(item, bins):\n scores = np.zeros_like(bins)\n idx = bins>=item\n scores[idx] = np.minimum(1.0, 1.0/(bins[idx]-item))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "The score of bin i is calculated as the product of the inverse of the difference between the bin's rest capacity and the item size, and the exponential of the negative bin number, divided by the number of feasible bins.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n This function calculates the score for each bin in 'bins' for assigning an item of size 'item'.\n The score is calculated as the product of the inverse of the difference between the bin's rest capacity and the item size, and the exponential of the negative bin number, divided by the number of feasible bins.\n The input 'bins' is a Numpy array of integers representing the rest capacities of the bins.\n The output 'scores' is a Numpy array of floats representing the scores for each bin.\n\n Args:\n item (int): The size of the item to be assigned.\n bins (np.ndarray): A Numpy array of integers representing the rest capacities of the bins.\n\n Returns:\n np.ndarray: A Numpy array of floats representing the scores for each bin.\n \"\"\"\n # Calculate the difference between the bin's rest capacity and the item size\n diff = bins - item\n\n # Calculate the inverse of the difference\n inv_diff = 1 / diff\n\n # Calculate the exponential of the negative bin number\n exp_neg_bin_num = np.exp(-np.arange(len(bins)))\n\n # Calculate the score for each bin\n scores = inv_diff * exp_neg_bin_num / len(bins)\n\n # Return the scores\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the inverse of the remaining capacity, and return the maximum score if the remaining capacity is less than a threshold, else return -1.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n threshold = bins.max() / 2\n scores = 1.0 / np.maximum(bins - item, 1)\n scores[bins < item] = -1\n scores[bins <= threshold] = np.maximum(scores[bins <= threshold], -1)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of a bin as the sum of the inverse of bin index multiplied by the size of the bin and the inverse of bin rest capacity multiplied by the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n bin_idx = np.argwhere(bins >= item).flatten()\n bin_idx_weight = 1 / (1 + bin_idx)\n bin_cap_weight = 1 / (1 + bins[bin_idx] - item)\n scores = bin_idx_weight * bin_cap_weight\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "A scoring function that calculates the score of a bin as the quotient of the sum of bin size and bin available capacity divided by the sum of bin index and bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[(bins >= item)]\n if len(feasible_bins):\n scores = np.array([(feasible_bins[i] + item) / (i + feasible_bins[i]) for i in range(len(feasible_bins))])\n else:\n scores = np.array([])\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign each bin a score that is inversely proportional to the ratio of the bin's rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = np.where(bins >= item)[0]\n scores[valid_bins] = 1 / (bins[valid_bins] / item)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity and the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n avail = np.array([max(b - item, 0) for b in bins])\n pos = np.arange(len(avail), dtype=np.int32)\n scores = np.reciprocal(np.maximum(avail, 1)) * pos\n return scores",
"objective": 0.04155,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin as the product of the bin's rest capacity and the exponential of the negative bin number, penalized by the number of bins that can fit the item.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[bins >= item]\n num_feasible_bins = len(feasible_bins)\n scores = feasible_bins * np.exp(-np.arange(num_feasible_bins))\n scores /= np.sum(scores)\n return scores",
"objective": 0.04216,
"other_inf": null
},
{
"algorithm": "Score bins based on the product of rest capacity and the reciprocal of bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * np.reciprocal(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "A novel score function that calculates the ratio of the item's size to a weighted sum of rest capacity, bin index, and a small constant to avoid division by zero.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"A novel score function that calculates the ratio of the item's size to a weighted sum of rest capacity, bin index, and a small constant to avoid division by zero.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment. \n \"\"\"\n\n # Avoid division by zero by adding a small constant to the denominator.\n constant = 1e-6\n\n # Calculate the weighted sum of rest capacity, bin index, and constant.\n denominators = bins + bins * np.log(np.arange(1, len(bins) + 1)) + constant\n\n # Calculate the scores.\n scores = item / denominators\n\n return scores",
"objective": 0.04236,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_5.json
================================================
[
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with higher rest capacity and penalizes bins with rest capacity much larger than item size and equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n\n # Find feasible bins that can hold the 'item'.\n feasible_bins = bins[bins >= item]\n \n if len(feasible_bins) == 0:\n return np.zeros_like(bins)\n \n # Calculate the rest capacity after assigning the 'item'.\n rest_capacities = feasible_bins - item\n \n # Calculate the score for each feasible bin.\n scores = 1 / (rest_capacities + 1)\n \n # Penalize bins with rest capacity much larger than item size or equal to the maximum capacity.\n max_capacity = np.max(bins)\n scores -= (rest_capacities > max_capacity - item) * 0.5\n scores -= (rest_capacities > item) * 0.25\n \n # Normalize the scores.\n scores /= np.max(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "Assign each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Assigns each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = 1 / (rest_capacities * np.arange(1, len(bins) + 1))\n\n # Return the scores.\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.\n\n Args:\n item (int): The size of current item.\n bins (Numpy array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Numpy array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of bin available capacity.\n inv_cap = 1 / (bins - item)\n\n # Calculate the inverse of square root of bin index.\n inv_sqrt_idx = 1 / np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score of each bin.\n scores = inv_cap * inv_sqrt_idx * bins\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of bin index, and the size of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of bin available capacity\n inv_cap = 1.0 / np.maximum(bins - item, 1e-9)\n\n # Calculate the inverse of bin index\n inv_idx = 1.0 / np.arange(1, len(bins) + 1)\n\n # Calculate the score of each bin\n scores = inv_cap * inv_idx * bins\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Assign each bin a score that is a weighted sum of the inverse of the product of the bin's rest capacity and its index, and the inverse of the difference between the bin's size and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the following formula:\n\n score = w1 * (1 / (bin_rest_capacity * bin_index)) + w2 * (1 / (bin_size - item_size))\n\n Where:\n\n * bin_rest_capacity is the remaining capacity in the bin\n * bin_index is the index of the bin\n * bin_size is the size of the bin\n * item_size is the size of the item being assigned\n * w1 and w2 are weights that can be adjusted to prioritize different factors\n\n The bin with the highest score is selected for the item.\n\n Args:\n item (int): The size of the item being assigned.\n bins (np.array): A numpy array of the remaining capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for each bin.\n \"\"\"\n\n # Define the weights\n w1 = 0.5\n w2 = 0.5\n\n # Calculate the score for each bin\n scores = w1 * (1 / (bins * np.arange(1, len(bins) + 1))) + w2 * (1 / (bins - item))\n\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores (np.array): The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the remaining capacity of each bin and the item size.\n diff = bins - item\n\n # Calculate the score for each bin based on its remaining capacity and difference to the item size.\n scores = diff * (bins / diff)\n\n # Favor bins with lower remaining capacity.\n scores /= bins\n\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "{New algorithm: Compute the inverse of sum of the inverse of the difference of the item size and the remaining capacity and the inverse of the remaining capacity.}",
"code": "def score(item, bins):\n scores = 1.0 / (1.0 / (item - bins) + 1.0 / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "A novel score function that calculates the ratio of the item's size to a weighted sum of rest capacity, square root of bin index, and a small constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.sqrt(np.arange(1, bins.shape[0]+1)) + 1e-6))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "A score function that prioritized bins based on the ratio of their rest capacity to their index and penalized bins with a rest capacity much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins for assigning an item to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment. \n \"\"\"\n\n # Calculate ratio of rest capacity to bin index, penalized by large capacity.\n scores = bins / np.arange(1, len(bins) + 1)\n scores = scores / (1 + np.maximum(0, bins - item))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score of 1 divided by the difference between the maximum capacity and the bin's rest capacity, or 0 if the bin cannot accommodate the item.",
"code": "import numpy as np\ndef score(item, bins):\n scores = np.zeros_like(bins)\n idx = bins>=item\n scores[idx] = np.minimum(1.0, 1.0/(bins[idx]-item))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Score bins based on the normalized product of the inverse of the difference between the bin's rest capacity and the item size, and the exponential of the negative bin number, divided by the number of feasible bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n eps = 1e-10\n feasible_idx = bins >= item\n feasible_bins = bins[feasible_idx]\n num_feasible_bins = len(feasible_bins)\n scores = np.zeros(len(bins))\n if num_feasible_bins > 0:\n scores[feasible_idx] = (feasible_bins - item + eps) ** (-1) * np.exp(-len(bins) + np.arange(num_feasible_bins)) / num_feasible_bins\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the inverse of the remaining capacity, and return the maximum score if the remaining capacity is less than a threshold, else return -1.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n threshold = bins.max() / 2\n scores = 1.0 / np.maximum(bins - item, 1)\n scores[bins < item] = -1\n scores[bins <= threshold] = np.maximum(scores[bins <= threshold], -1)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of a bin as the sum of the inverse of bin index multiplied by the size of the bin and the inverse of bin rest capacity multiplied by the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n bin_idx = np.argwhere(bins >= item).flatten()\n bin_idx_weight = 1 / (1 + bin_idx)\n bin_cap_weight = 1 / (1 + bins[bin_idx] - item)\n scores = bin_idx_weight * bin_cap_weight\n return scores",
"objective": 0.04055,
"other_inf": null
},
{
"algorithm": "The revised scoring function considers the sum of the inverse square of the bin index and inverse of the available capacity, multiplied by the square root of the bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Revised scoring function.\n\n Args:\n item (int): Size of current item.\n bins (np.array): Rest capacities of feasible bins, larger than the item size.\n\n Returns:\n np.array: Scores for the bins for assignment.\n \"\"\"\n\n bin_index = np.arange(len(bins)) + 1\n available_capacity = np.maximum(bins - item, 0)\n bin_size = np.where(available_capacity > 0, bins, np.inf)\n scores = (1 / bin_index**2 + 1 / available_capacity) * np.sqrt(bin_size)\n return scores",
"objective": 0.04065,
"other_inf": null
},
{
"algorithm": "A scoring function that calculates the score of a bin as the quotient of the sum of bin size and bin available capacity divided by the sum of bin index and bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n feasible_bins = bins[(bins >= item)]\n if len(feasible_bins):\n scores = np.array([(feasible_bins[i] + item) / (i + feasible_bins[i]) for i in range(len(feasible_bins))])\n else:\n scores = np.array([])\n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "New Algorithm: Assign each bin a score that is inversely proportional to the ratio of the bin's rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n valid_bins = np.where(bins >= item)[0]\n scores[valid_bins] = 1 / (bins[valid_bins] / item)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nNew algorithm: The score function will calculate the scores for each bin based on the remaining capacity, with a penalty for bins with maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n scores = (max_capacity - bins) + (bins == max_capacity) * item\n return scores",
"objective": 0.04105,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_6.json
================================================
[
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "The new algorithm utilizes a score function that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes a score for each bin that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array containing the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array containing the scores for the bins.\n \"\"\"\n\n # Compute the rest capacity ratio for each bin.\n ratio = bins / item\n\n # Compute the score for each bin.\n scores = ratio / (np.arange(len(bins)) + 1)\n\n # Penalize bins with a low rest capacity ratio.\n scores[ratio < 1.5] /= ratio[ratio < 1.5]\n\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with higher rest capacity and penalizes bins with rest capacity much larger than item size and equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n\n # Find feasible bins that can hold the 'item'.\n feasible_bins = bins[bins >= item]\n \n if len(feasible_bins) == 0:\n return np.zeros_like(bins)\n \n # Calculate the rest capacity after assigning the 'item'.\n rest_capacities = feasible_bins - item\n \n # Calculate the score for each feasible bin.\n scores = 1 / (rest_capacities + 1)\n \n # Penalize bins with rest capacity much larger than item size or equal to the maximum capacity.\n max_capacity = np.max(bins)\n scores -= (rest_capacities > max_capacity - item) * 0.5\n scores -= (rest_capacities > item) * 0.25\n \n # Normalize the scores.\n scores /= np.max(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign each bin a score that is a weighted sum of the inverse of the product of the bin's rest capacity and its index, and the inverse of the square of the difference between the bin's size and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score each bin based on its rest capacity and size difference with the item.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array of the rest capacities of feasible bins.\n\n Returns:\n A Numpy array of scores for the bins.\n \"\"\"\n\n # Calculate the inverse of the product of the bin's rest capacity and its index.\n rest_capacity_index_inv = 1 / (bins * np.arange(1, len(bins) + 1))\n\n # Calculate the inverse of the square of the difference between the bin's size and the item's size.\n size_diff_inv_squared = 1 / ((bins - item) ** 2)\n\n # Calculate the weighted sum of the two scores.\n scores = rest_capacity_index_inv + size_diff_inv_squared\n\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Calculates the score of a bin as the product of the inverse of bin index, the inverse of bin available capacity, and a function of item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(1 + np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Assign each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Assigns each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = 1 / (rest_capacities * np.arange(1, len(bins) + 1))\n\n # Return the scores.\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.\n\n Args:\n item (int): The size of current item.\n bins (Numpy array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Numpy array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of bin available capacity.\n inv_cap = 1 / (bins - item)\n\n # Calculate the inverse of square root of bin index.\n inv_sqrt_idx = 1 / np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score of each bin.\n scores = inv_cap * inv_sqrt_idx * bins\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of bin index, and the size of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the inverse of bin available capacity\n inv_cap = 1.0 / np.maximum(bins - item, 1e-9)\n\n # Calculate the inverse of bin index\n inv_idx = 1.0 / np.arange(1, len(bins) + 1)\n\n # Calculate the score of each bin\n scores = inv_cap * inv_idx * bins\n\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Assign each bin a score that is a weighted sum of the inverse of the product of the bin's rest capacity and its index, and the inverse of the difference between the bin's size and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculates the score for each bin based on the following formula:\n\n score = w1 * (1 / (bin_rest_capacity * bin_index)) + w2 * (1 / (bin_size - item_size))\n\n Where:\n\n * bin_rest_capacity is the remaining capacity in the bin\n * bin_index is the index of the bin\n * bin_size is the size of the bin\n * item_size is the size of the item being assigned\n * w1 and w2 are weights that can be adjusted to prioritize different factors\n\n The bin with the highest score is selected for the item.\n\n Args:\n item (int): The size of the item being assigned.\n bins (np.array): A numpy array of the remaining capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n np.array: A numpy array of the scores for each bin.\n \"\"\"\n\n # Define the weights\n w1 = 0.5\n w2 = 0.5\n\n # Calculate the score for each bin\n scores = w1 * (1 / (bins * np.arange(1, len(bins) + 1))) + w2 * (1 / (bins - item))\n\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores (np.array): The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the remaining capacity of each bin and the item size.\n diff = bins - item\n\n # Calculate the score for each bin based on its remaining capacity and difference to the item size.\n scores = diff * (bins / diff)\n\n # Favor bins with lower remaining capacity.\n scores /= bins\n\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "{New algorithm: Compute the inverse of sum of the inverse of the difference of the item size and the remaining capacity and the inverse of the remaining capacity.}",
"code": "def score(item, bins):\n scores = 1.0 / (1.0 / (item - bins) + 1.0 / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "A novel score function that calculates the ratio of the item's size to a weighted sum of rest capacity, square root of bin index, and a small constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.sqrt(np.arange(1, bins.shape[0]+1)) + 1e-6))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "A score function that prioritized bins based on the ratio of their rest capacity to their index and penalized bins with a rest capacity much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins for assigning an item to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment. \n \"\"\"\n\n # Calculate ratio of rest capacity to bin index, penalized by large capacity.\n scores = bins / np.arange(1, len(bins) + 1)\n scores = scores / (1 + np.maximum(0, bins - item))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score of 1 divided by the difference between the maximum capacity and the bin's rest capacity, or 0 if the bin cannot accommodate the item.",
"code": "import numpy as np\ndef score(item, bins):\n scores = np.zeros_like(bins)\n idx = bins>=item\n scores[idx] = np.minimum(1.0, 1.0/(bins[idx]-item))\n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "Score bins based on the normalized product of the inverse of the difference between the bin's rest capacity and the item size, and the exponential of the negative bin number, divided by the number of feasible bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n eps = 1e-10\n feasible_idx = bins >= item\n feasible_bins = bins[feasible_idx]\n num_feasible_bins = len(feasible_bins)\n scores = np.zeros(len(bins))\n if num_feasible_bins > 0:\n scores[feasible_idx] = (feasible_bins - item + eps) ** (-1) * np.exp(-len(bins) + np.arange(num_feasible_bins)) / num_feasible_bins\n return scores",
"objective": 0.04025,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score of each bin as the inverse of the remaining capacity, and return the maximum score if the remaining capacity is less than a threshold, else return -1.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.array) -> np.array:\n threshold = bins.max() / 2\n scores = 1.0 / np.maximum(bins - item, 1)\n scores[bins < item] = -1\n scores[bins <= threshold] = np.maximum(scores[bins <= threshold], -1)\n return scores",
"objective": 0.04045,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score of a bin as the sum of the inverse of bin index multiplied by the size of the bin and the inverse of bin rest capacity multiplied by the difference between the bin capacity and the item size.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n bin_idx = np.argwhere(bins >= item).flatten()\n bin_idx_weight = 1 / (1 + bin_idx)\n bin_cap_weight = 1 / (1 + bins[bin_idx] - item)\n scores = bin_idx_weight * bin_cap_weight\n return scores",
"objective": 0.04055,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_7.json
================================================
[
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "{New algorithm: Calculate the score for each bin based on the following: the inverse of the square of the difference between the item size and the bin's rest capacity, the exponential of the product of the bin's index and its rest capacity, and the square root of the bin's size.}",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the following:\n the inverse of the square of the difference between the item size and the bin's rest capacity,\n the exponential of the product of the bin's index and its rest capacity,\n and the square root of the bin's size.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the item size and the bin's rest capacity.\n diff = item - bins\n\n # Calculate the inverse of the square of the difference.\n inv_diff_sq = 1 / (diff ** 2)\n\n # Calculate the exponential of the product of the bin's index and its rest capacity.\n exp_idx_cap = np.exp(np.arange(len(bins)) * bins)\n\n # Calculate the square root of the bin's size.\n sqrt_size = np.sqrt(bins)\n\n # Calculate the score for each bin.\n scores = inv_diff_sq * exp_idx_cap * sqrt_size\n\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate bin score.\n\n Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = 1.0 / available_capacity**2 + np.sqrt(available_capacity / item) / np.arange(1.0, len(bins) + 1.0)\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "The new algorithm utilizes a score function that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes a score for each bin that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array containing the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array containing the scores for the bins.\n \"\"\"\n\n # Compute the rest capacity ratio for each bin.\n ratio = bins / item\n\n # Compute the score for each bin.\n scores = ratio / (np.arange(len(bins)) + 1)\n\n # Penalize bins with a low rest capacity ratio.\n scores[ratio < 1.5] /= ratio[ratio < 1.5]\n\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with higher rest capacity and penalizes bins with rest capacity much larger than item size and equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n\n # Find feasible bins that can hold the 'item'.\n feasible_bins = bins[bins >= item]\n \n if len(feasible_bins) == 0:\n return np.zeros_like(bins)\n \n # Calculate the rest capacity after assigning the 'item'.\n rest_capacities = feasible_bins - item\n \n # Calculate the score for each feasible bin.\n scores = 1 / (rest_capacities + 1)\n \n # Penalize bins with rest capacity much larger than item size or equal to the maximum capacity.\n max_capacity = np.max(bins)\n scores -= (rest_capacities > max_capacity - item) * 0.5\n scores -= (rest_capacities > item) * 0.25\n \n # Normalize the scores.\n scores /= np.max(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Assign each bin a score that is the sum of the inverse of the square of the difference between the bin's size and the item's size, and the inverse of the product of the bin's rest capacity and its index. ",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = 1 / (bins - item) ** 2 + 1 / (bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Calculates the score of a bin as the product of the inverse of bin index, the inverse of bin available capacity, and a function of item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(1 + np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Assign each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Assigns each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = 1 / (rest_capacities * np.arange(1, len(bins) + 1))\n\n # Return the scores.\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.\n\n Args:\n item (int): The size of current item.\n bins (Numpy array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Numpy array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of bin available capacity.\n inv_cap = 1 / (bins - item)\n\n # Calculate the inverse of square root of bin index.\n inv_sqrt_idx = 1 / np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score of each bin.\n scores = inv_cap * inv_sqrt_idx * bins\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the following: the inverse of the square of the difference between the item size and the bin's rest capacity, the inverse of the product of the bin's index and its rest capacity, and the square of the bin's size.",
"code": "def score(item, bins):\n # Calculate the score for each bin\n scores = (1 / ((item - bins) ** 2)) * (1 / (np.arange(1, bins.size + 1) * bins)) * (bins ** 2)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "The proposed algorithm calculates the score for each bin based on the inverse of the difference between the bin's rest capacity and the item size, divided by the square root of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Calculate the score for each bin based on the inverse of the difference between the bin's rest capacity and the item size, divided by the square root of the bin's index.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the bin's rest capacity and the item size\n diff = bins - item\n\n # Calculate the inverse of the difference\n inv_diff = 1 / diff\n\n # Calculate the square root of the bin's index\n sqrt_index = np.sqrt(np.arange(1, len(bins) + 1))\n\n # Calculate the score\n scores = inv_diff / sqrt_index\n\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign each bin a score that is the sum of the inverse of the product of the bin's rest capacity and its index, and the inverse of the difference between the bin's size and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of the product of the bin's rest capacity and its index.\n inv_prod_cap_idx = 1 / (bins * np.arange(1, len(bins) + 1))\n\n # Calculate the inverse of the difference between the bin's size and the item's size.\n inv_diff_size = 1 / (bins - item)\n\n # Sum the two inverse values to get the score for each bin.\n scores = inv_prod_cap_idx + inv_diff_size\n\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores (np.array): The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the remaining capacity of each bin and the item size.\n diff = bins - item\n\n # Calculate the score for each bin based on its remaining capacity and difference to the item size.\n scores = diff * (bins / diff)\n\n # Favor bins with lower remaining capacity.\n scores /= bins\n\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "{New algorithm: Compute the inverse of sum of the inverse of the difference of the item size and the remaining capacity and the inverse of the remaining capacity.}",
"code": "def score(item, bins):\n scores = 1.0 / (1.0 / (item - bins) + 1.0 / bins)\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "A novel score function that calculates the ratio of the item's size to a weighted sum of rest capacity, square root of bin index, and a small constant.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (item / (bins + np.sqrt(np.arange(1, bins.shape[0]+1)) + 1e-6))\n return scores",
"objective": 0.03994,
"other_inf": null
},
{
"algorithm": "A score function that prioritized bins based on the ratio of their rest capacity to their index and penalized bins with a rest capacity much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score bins for assigning an item to minimize the number of used bins.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment. \n \"\"\"\n\n # Calculate ratio of rest capacity to bin index, penalized by large capacity.\n scores = bins / np.arange(1, len(bins) + 1)\n scores = scores / (1 + np.maximum(0, bins - item))\n return scores",
"objective": 0.04004,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns a score of 1 divided by the difference between the maximum capacity and the bin's rest capacity, or 0 if the bin cannot accommodate the item.",
"code": "import numpy as np\ndef score(item, bins):\n scores = np.zeros_like(bins)\n idx = bins>=item\n scores[idx] = np.minimum(1.0, 1.0/(bins[idx]-item))\n return scores",
"objective": 0.04014,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_8.json
================================================
[
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the following: the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the exponential of the product of the bin's rest capacity and its index, and the cubic root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the following:\n - the inverse of the square of the absolute difference between the item size and the bin's rest capacity\n - the exponential of the product of the bin's rest capacity and its index\n - the cubic root of the bin's size\n\n Args:\n item: The size of the current item\n bins: The rest capacities of feasible bins, which are larger than the item size\n\n Returns:\n scores: The scores for the bins for assignment\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diff = np.abs(item - bins)\n\n # Calculate the inverse of the square of the absolute difference\n inv_diff_sq = 1 / np.square(diff)\n\n # Calculate the exponential of the product of the bin's rest capacity and its index\n exp_rc_idx = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the cubic root of the bin's size\n cube_size = np.power(bins, 1 / 3)\n\n # Calculate the score for each bin\n scores = inv_diff_sq * exp_rc_idx * cube_size\n\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the inverse of the distance between the item size and the bin's rest capacity, the square of the exponential of the product of the bin's rest capacity and its index, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item) * np.square(np.exp(bins * np.arange(1, len(bins) + 1))) * np.sqrt(bins)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate bin score.\n\n Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = 1.0 / available_capacity**2 + np.sqrt(available_capacity / item) / np.arange(1.0, len(bins) + 1.0)\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "The new algorithm utilizes a score function that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes a score for each bin that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array containing the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array containing the scores for the bins.\n \"\"\"\n\n # Compute the rest capacity ratio for each bin.\n ratio = bins / item\n\n # Compute the score for each bin.\n scores = ratio / (np.arange(len(bins)) + 1)\n\n # Penalize bins with a low rest capacity ratio.\n scores[ratio < 1.5] /= ratio[ratio < 1.5]\n\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "New algorithm prioritizes bins with higher rest capacity and penalizes bins with rest capacity much larger than item size and equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n\n # Find feasible bins that can hold the 'item'.\n feasible_bins = bins[bins >= item]\n \n if len(feasible_bins) == 0:\n return np.zeros_like(bins)\n \n # Calculate the rest capacity after assigning the 'item'.\n rest_capacities = feasible_bins - item\n \n # Calculate the score for each feasible bin.\n scores = 1 / (rest_capacities + 1)\n \n # Penalize bins with rest capacity much larger than item size or equal to the maximum capacity.\n max_capacity = np.max(bins)\n scores -= (rest_capacities > max_capacity - item) * 0.5\n scores -= (rest_capacities > item) * 0.25\n \n # Normalize the scores.\n scores /= np.max(scores)\n \n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Assign each bin a score that is the sum of the inverse of the square of the difference between the bin's size and the item's size, and the inverse of the product of the bin's rest capacity and its index. ",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = 1 / (bins - item) ** 2 + 1 / (bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Calculates the score of a bin as the product of the inverse of bin index, the inverse of bin available capacity, and a function of item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(1 + np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "Assign each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Assigns each bin a score that is inversely proportional to the product of the bin's rest capacity and its index.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n np.array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the rest capacity of each bin after assigning the item.\n rest_capacities = bins - item\n\n # Calculate the score for each bin.\n scores = 1 / (rest_capacities * np.arange(1, len(bins) + 1))\n\n # Return the scores.\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of bin available capacity, the inverse of square root of bin index, and the size of the bin.\n\n Args:\n item (int): The size of current item.\n bins (Numpy array): The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Numpy array: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of bin available capacity.\n inv_cap = 1 / (bins - item)\n\n # Calculate the inverse of square root of bin index.\n inv_sqrt_idx = 1 / np.sqrt(np.arange(len(bins)) + 1)\n\n # Calculate the score of each bin.\n scores = inv_cap * inv_sqrt_idx * bins\n\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the following: the inverse of the square of the difference between the item size and the bin's rest capacity, the inverse of the product of the bin's index and its rest capacity, and the square of the bin's size.",
"code": "def score(item, bins):\n # Calculate the score for each bin\n scores = (1 / ((item - bins) ** 2)) * (1 / (np.arange(1, bins.size + 1) * bins)) * (bins ** 2)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's rest capacity, and the inverse of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diffs = np.abs(bins - item)\n # Calculate the inverse of the square of the absolute difference\n inv_sq_diffs = 1 / diffs**2\n # Calculate the square root of the bin's rest capacity\n sqrt_capacities = np.sqrt(bins)\n # Calculate the inverse of the bin's index\n inv_indices = 1 / np.arange(1, bins.size + 1)\n # Calculate the score for each bin\n scores = inv_sq_diffs * sqrt_capacities * inv_indices\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index and the square root of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin score for an item.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n\n available_capacity = np.maximum(bins - item, 0)\n ratio = np.maximum(available_capacity / item, 1)\n scores = (1 / available_capacity**2 + np.sqrt(ratio)) / np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign each bin a score that is the sum of the inverse of the product of the bin's rest capacity and its index, and the inverse of the difference between the bin's size and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of the product of the bin's rest capacity and its index.\n inv_prod_cap_idx = 1 / (bins * np.arange(1, len(bins) + 1))\n\n # Calculate the inverse of the difference between the bin's size and the item's size.\n inv_diff_size = 1 / (bins - item)\n\n # Sum the two inverse values to get the score for each bin.\n scores = inv_prod_cap_idx + inv_diff_size\n\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores (np.array): The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the remaining capacity of each bin and the item size.\n diff = bins - item\n\n # Calculate the score for each bin based on its remaining capacity and difference to the item size.\n scores = diff * (bins / diff)\n\n # Favor bins with lower remaining capacity.\n scores /= bins\n\n return scores",
"objective": 0.03964,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign each bin a score that is the sum of the inverse of the product of the bin's rest capacity and its index, inverse of the difference between the bin's size and the item's size, and the inverse of the sum of the bin's rest capacity and the item's size.",
"code": "def score(item, bins):\n reciprocal_product = 1 / (bins * np.arange(1, len(bins) + 1))\n reciprocal_diff = 1 / np.maximum(bins - item, 1e-6)\n reciprocal_sum = 1 / np.maximum(bins + item, 1e-6)\n scores = reciprocal_product + reciprocal_diff + reciprocal_sum\n return scores",
"objective": 0.03974,
"other_inf": null
},
{
"algorithm": "Calculate the score by adding the inverse of the available capacity divided by the bin size, and multiplying it by the bin size.",
"code": "def score(item, bins):\n scores = bins / (bins - item + 1e-9) * item\n return scores",
"objective": 0.03984,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_LLMs/TC2T2Cgemini+gemini/Run3/population_generation_9.json
================================================
[
{
"algorithm": "New algorithm: Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with the bin's index minus half of the item size",
"code": "import numpy as np\n\ndef score(item, bins):\n inv_abs_diff = 1 / np.abs(bins - item)\n sqrt_size = np.sqrt(bins)\n exp_product = np.exp((bins - item/2) * np.arange(len(bins)))\n scores = inv_abs_diff * sqrt_size * exp_product\n return scores",
"objective": 0.00845,
"other_inf": null
},
{
"algorithm": "Assign to bins that are closer to their maximum capacity without violating the given constraint, and penalize bins for being much larger than the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = (1 - bins / item) * (bins <= 2 * item) * (bins != 0)\n return scores",
"objective": 0.01157,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with its index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate the score for each bin based on the product of the inverse of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's size, and the exponential of the product of the bin's rest capacity with its index.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the absolute difference between the item size and the bin's rest capacity.\n abs_diff = np.abs(bins - item)\n\n # Calculate the inverse of the absolute difference.\n inv_abs_diff = 1 / abs_diff\n\n # Calculate the square root of the bin's size.\n sqrt_size = np.sqrt(bins)\n\n # Calculate the exponential of the product of the bin's rest capacity with its index.\n exp_product = np.exp(bins * np.arange(len(bins)))\n\n # Calculate the score for each bin.\n scores = inv_abs_diff * sqrt_size * exp_product\n\n return scores",
"objective": 0.0164,
"other_inf": null
},
{
"algorithm": "New Algorithm: Calculate the score for each bin based on the inverse of the distance between the item size and the bin's rest capacity, the square of the exponential of the product of the bin's rest capacity and its index, and the square root of the bin's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = 1 / np.abs(bins - item) * np.square(np.exp(bins * np.arange(1, len(bins) + 1))) * np.sqrt(bins)\n return scores",
"objective": 0.02797,
"other_inf": null
},
{
"algorithm": "New algorithm: calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.",
"code": "import math\nimport numpy as np\n\ndef score(item, bins):\n \"\"\"Calculates the score of a bin as the product of the inverse of the square root of bin available capacity, sqrt of bin index, and the size of the bin.\n\n Args:\n item: Size of current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = np.sqrt(1.0 / (np.sqrt(available_capacity) * np.sqrt(np.arange(len(bins)) + 1))) * bins\n return scores",
"objective": 0.02898,
"other_inf": null
},
{
"algorithm": "Adjusted algorithm: Penalize bins based on their remaining capacity and their difference to the item size by combining the ideas from algorithms 1 and 3.\nCode:\nimport numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / (1. + remaining) * 1. / (1. + np.abs(remaining - item))\n return scores",
"objective": 0.03109,
"other_inf": null
},
{
"algorithm": "Prioritize bins based on their remaining capacity while penalizing bins with large differences between their remaining capacity and the item size by combining the ideas from algorithms 1, 2, and 4.",
"code": "import numpy as np\ndef score(item, bins):\n remaining = bins - item\n scores = 1. / ((1. + remaining) * (1. + np.abs(remaining - item)))\n return scores",
"objective": 0.03129,
"other_inf": null
},
{
"algorithm": "Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"Calculate bin score.\n\n Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index.\n\n Args:\n item: The size of current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n The scores for the bins for assignment.\n \"\"\"\n available_capacity = bins - item\n scores = 1.0 / available_capacity**2 + np.sqrt(available_capacity / item) / np.arange(1.0, len(bins) + 1.0)\n return scores",
"objective": 0.03471,
"other_inf": null
},
{
"algorithm": "The new algorithm utilizes a score function that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Computes a score for each bin that is proportional to the bin's rest capacity and inversely proportional to its index, but with a penalty determined by the ratio between the bin's rest capacity and the item size.\n\n Args:\n item: The size of the current item.\n bins: A Numpy array containing the rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array containing the scores for the bins.\n \"\"\"\n\n # Compute the rest capacity ratio for each bin.\n ratio = bins / item\n\n # Compute the score for each bin.\n scores = ratio / (np.arange(len(bins)) + 1)\n\n # Penalize bins with a low rest capacity ratio.\n scores[ratio < 1.5] /= ratio[ratio < 1.5]\n\n return scores",
"objective": 0.03703,
"other_inf": null
},
{
"algorithm": "New algorithm uses the product of the bins' inverse index, the inverse of the bins' available capacity, and a weighted sum of the item size and the bin size as the score function.",
"code": "import numpy as np\ndef score(item, bins):\n scores = bins / (np.array(range(len(bins))) + 1) * (1/(bins - item) + 1./item + 1.)\n return scores",
"objective": 0.03803,
"other_inf": null
},
{
"algorithm": " Assign each bin a score that is the sum of the inverse of the square of the difference between the bin's size and the item's size, and the inverse of the product of the bin's rest capacity and its index. ",
"code": "import numpy as np\n\ndef score(item: int, bins: np.ndarray) -> np.ndarray:\n scores = 1 / (bins - item) ** 2 + 1 / (bins * np.arange(1, len(bins) + 1))\n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "Calculates the score of a bin as the product of the inverse of bin index, the inverse of bin available capacity, and a function of item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / np.log(1 + np.arange(1, len(bins) + 1)) / (bins - item)\n return scores",
"objective": 0.03864,
"other_inf": null
},
{
"algorithm": "New algorithm: Score function is the product of inverse square root of the bin available capacity, the inverse of the square root of the bin index, and the bin size.",
"code": "import numpy as np\n\ndef score(item, bins):\n available_capacity = bins - item\n scores = (1 / np.sqrt(available_capacity)) * (1 / np.sqrt(np.arange(1, len(bins) + 1))) * item\n return scores",
"objective": 0.03884,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the bin score as the product of the exponent of the inverse of the difference between the bin size and the item size, and the exponent of the inverse of the product of the bin size and the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.power(1 / (bins - item), 2) * np.power(1 / (bins * np.arange(1, len(bins) + 1)), 2)\n return scores",
"objective": 0.03904,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate the score for each bin based on the following: the inverse of the square of the difference between the item size and the bin's rest capacity, the inverse of the product of the bin's index and its rest capacity, and the square of the bin's size.",
"code": "def score(item, bins):\n # Calculate the score for each bin\n scores = (1 / ((item - bins) ** 2)) * (1 / (np.arange(1, bins.size + 1) * bins)) * (bins ** 2)\n return scores",
"objective": 0.03914,
"other_inf": null
},
{
"algorithm": "Calculate the score for each bin as the product of the inverse of the square of the absolute difference between the item size and the bin's rest capacity, the square root of the bin's rest capacity, and the inverse of the bin's index.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the absolute difference between the item size and the bin's rest capacity\n diffs = np.abs(bins - item)\n # Calculate the inverse of the square of the absolute difference\n inv_sq_diffs = 1 / diffs**2\n # Calculate the square root of the bin's rest capacity\n sqrt_capacities = np.sqrt(bins)\n # Calculate the inverse of the bin's index\n inv_indices = 1 / np.arange(1, bins.size + 1)\n # Calculate the score for each bin\n scores = inv_sq_diffs * sqrt_capacities * inv_indices\n return scores",
"objective": 0.03924,
"other_inf": null
},
{
"algorithm": "New algorithm: Calculate bin score as the sum of the inverse square of available capacity and the square root of the rest capacity to item size ratio, and divide by the bin index and the square root of the bin index.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Calculate bin score for an item.\n\n Args:\n item: Size of the current item.\n bins: Rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n Scores for the bins for assignment.\n \"\"\"\n\n available_capacity = np.maximum(bins - item, 0)\n ratio = np.maximum(available_capacity / item, 1)\n scores = (1 / available_capacity**2 + np.sqrt(ratio)) / np.sqrt(np.arange(len(bins)) + 1)\n return scores",
"objective": 0.03934,
"other_inf": null
},
{
"algorithm": "New algorithm: Assign each bin a score that is the sum of the inverse of the product of the bin's rest capacity and its index, and the inverse of the difference between the bin's size and the item's size.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"Score a set of bins to assign an item.\n\n Args:\n item: The size of the current item.\n bins: The rest capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores: The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the inverse of the product of the bin's rest capacity and its index.\n inv_prod_cap_idx = 1 / (bins * np.arange(1, len(bins) + 1))\n\n # Calculate the inverse of the difference between the bin's size and the item's size.\n inv_diff_size = 1 / (bins - item)\n\n # Sum the two inverse values to get the score for each bin.\n scores = inv_prod_cap_idx + inv_diff_size\n\n return scores",
"objective": 0.03944,
"other_inf": null
},
{
"algorithm": "The new algorithm computes the score of a bin as the product of the inverse of the bin's rest capacity and the sum of the inverse of the absolute difference between the bin's size and the item's size and the inverse of the product of the bin's rest capacity and its index.",
"code": "def score(item: int, bins: np.ndarray) -> np.ndarray:\n \"\"\"\n Compute the score of each bin for assigning an item.\n\n Args:\n item: The size of the item to be assigned.\n bins: A Numpy array of the rest capacities of the feasible bins, which are larger than the item size.\n\n Returns:\n A Numpy array of the scores for the bins.\n \"\"\"\n # Compute the absolute difference between the bin sizes and the item size.\n diff = np.abs(bins - item)\n\n # Compute the inverse of the bin rest capacities.\n inv_cap = 1 / bins\n\n # Compute the inverse of the absolute difference between the bin sizes and the item size.\n inv_diff = 1 / diff\n\n # Compute the inverse of the product of the bin rest capacities and their indices.\n inv_prod = 1 / (bins * np.arange(1, len(bins) + 1))\n\n # Compute the score for each bin.\n scores = inv_cap * (inv_diff + inv_prod)\n\n return scores",
"objective": 0.03954,
"other_inf": null
},
{
"algorithm": "Modified algorithm: Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n \"\"\"\n Score bins based on their remaining capacity multiplied by their difference to the item size, then favor bins with lower remaining capacity.\n\n Args:\n item (int): The size of the current item.\n bins (np.array): The remaining capacities of feasible bins, which are larger than the item size.\n\n Returns:\n scores (np.array): The scores for the bins for assignment.\n \"\"\"\n\n # Calculate the difference between the remaining capacity of each bin and the item size.\n diff = bins - item\n\n # Calculate the score for each bin based on its remaining capacity and difference to the item size.\n scores = diff * (bins / diff)\n\n # Favor bins with lower remaining capacity.\n scores /= bins\n\n return scores",
"objective": 0.03964,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_0.json
================================================
[
{
"algorithm": "\nNew algorithm: Calculate the score for each bin by taking the number of items that can fit into the bin without exceeding its capacity, and subtracting the rest capacity of the bin from the maximum capacity.\n\nSteps:\n1. Create an empty numpy array named 'scores' with the same shape as the 'bins' array.\n2. Iterate through each bin in the 'bins' array.\n3. Calculate the score for the bin by subtracting the rest capacity of the bin from the maximum capacity.\n4. Replace the corresponding element in the 'scores' array with the calculated score.\n5. Return the 'scores' array.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n scores[i] = max_capacity - bins[i]\n \n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns items to bins based on a score function that maximizes the score. It avoids using bins with rest capacity equal to the maximum capacity to minimize the number of used bins.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n mask = (bins < np.max(bins)) # Create a mask to exclude bins with rest capacity equal to the maximum capacity\n scores[mask] = item / bins[mask] # Calculate scores for the remaining bins using the formula item / capacity\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm is as follows: First, calculate the remaining capacity of each bin after considering the current item. Next, calculate the score for each bin by multiplying the remaining capacity by the number of unused bins (i.e., bins with remaining capacity equal to the maximum capacity). Finally, return the scores for all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n unused_bins = np.sum(remaining_capacity == max_capacity)\n scores = remaining_capacity * unused_bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "\nMy algorithm calculates the score for each bin by dividing the rest capacity of each bin by the item size, and if the rest capacity equals the maximum capacity, the score is set to -1. \nNext, it returns a Numpy array of the calculated scores.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty_like(bins)\n max_capacity = np.max(bins)\n \n for i in range(len(bins)):\n if bins[i] == max_capacity:\n scores[i] = -1\n else:\n scores[i] = bins[i] / item\n \n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "We will assign a score to each bin based on the ratio of the bin capacity to the item size, making sure that bins with no remaining capacity have a score of zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores with zeros\n scores[bins > item] = bins[bins > item] / item # Calculate scores based on the ratio of bin capacity to item size\n scores[bins == np.max(bins)] = 0 # Set scores of bins with maximum capacity to zero\n return scores",
"objective": 0.06912,
"other_inf": null
},
{
"algorithm": "'The new algorithm scores a set of bins to assign an item by maximizing the score of each bin, while ensuring that bins with maximum capacity are not used.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins / item\n scores[bins == np.max(bins)] = -1\n return scores",
"objective": 0.13211,
"other_inf": null
},
{
"algorithm": "The algorithm consists of the following steps:\n- Calculate the remaining capacities of the bins after considering the current item.\n- Assign a score of 0 to bins that have a remaining capacity equal to the maximum capacity.\n- For the rest of the bins, calculate the score as the ratio of remaining capacity to the difference between the maximum and current capacity.\n- Return the scores as a Numpy array.",
"code": "import numpy as np\n\ndef score(item, bins):\n max_capacity = np.max(bins)\n remaining_capacities = bins - item\n scores = np.zeros_like(bins)\n scores[remaining_capacities == max_capacity] = 0\n scores[remaining_capacities != max_capacity] = remaining_capacities[remaining_capacities != max_capacity] / (max_capacity - remaining_capacities[remaining_capacities != max_capacity])\n return scores",
"objective": 0.79445,
"other_inf": null
},
{
"algorithm": "This algorithm assigns an item to a bin by calculating a score for each bin based on its remaining capacity and minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n # Calculate the remaining capacity of each bin\n remaining_capacity = bins - item\n \n # Initialize an array to store the scores for each bin\n scores = np.zeros_like(bins)\n \n # Calculate the score for each bin based on remaining capacity\n scores = np.where(remaining_capacity > 0, remaining_capacity, np.inf)\n \n # Exclude bins with maximum capacity from being used\n max_capacity = np.max(bins)\n scores = np.where(bins == max_capacity, np.inf, scores)\n \n # Return the scores for the bins\n return scores",
"objective": 0.89597,
"other_inf": null
},
{
"algorithm": "\nAlgorithm:\n1. Create an empty Numpy array 'scores' to store the scores for the bins.\n2. Calculate the maximum capacity 'max_capacity' from the 'bins' array.\n3. If 'max_capacity' is equal to 'item', return 'scores' array as it implies the bin with maximum capacity will not be used.\n4. Otherwise, create a mask of feasible bins where the rest capacity is greater than 'item'.\n5. Use the mask to select the feasible bins from the 'bins' array.\n6. Calculate the scores for each feasible bin by dividing the rest capacity by the difference between 'max_capacity' and 'item'. This will prioritize bins with higher rest capacity and lower difference from 'max_capacity'.\n7. Assign the calculated scores to the respective indices in the 'scores' array.\n8. Return the 'scores' array as the output.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.empty(len(bins), dtype=np.float64) # Step 1\n \n max_capacity = np.max(bins) # Step 2\n \n if max_capacity == item: # Step 3\n return scores\n \n feasible_mask = bins > item # Step 4\n feasible_bins = bins[feasible_mask] # Step 5\n \n scores[feasible_mask] = feasible_bins / (max_capacity - item) # Step 6\n \n return scores",
"objective": 1.1474,
"other_inf": null
},
{
"algorithm": "\nThe algorithm assigns an item to the bin with the largest score, while ensuring that the bin's remaining capacity is not equal to the maximum capacity. The main steps are: Initialize an array of scores with zeros, iterate over the bins, calculate the score for each bin based on its remaining capacity and whether it is already full, and return the array of scores.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros(bins.shape)\n for i in range(len(bins)):\n remaining_capacity = bins[i] - item\n scores[i] = remaining_capacity if remaining_capacity < bins[i] else -np.inf\n return scores",
"objective": 1.51534,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_1.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the product of the rest capacity and the item size, and subtracting the square of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item - bins**2\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by subtracting the absolute difference between the rest capacity and the item size from the square root of the rest capacity, and if the rest capacity is less than the item size, the score is set to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n diff = bins - item\n \n scores[diff >= 0] = np.sqrt(bins[diff >= 0]) - np.abs(diff[diff >= 0])\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "New algorithm description: The new algorithm is as follows: First, calculate the remaining capacity of each bin after considering the current item. Next, calculate the score for each bin by dividing the remaining capacity by the number of unused bins (i.e., bins with remaining capacity equal to the maximum capacity), and then multiplying it by the square root of the remaining capacity. Finally, return the scores for all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n unused_bins = np.sum(remaining_capacity == max_capacity)\n scores = (remaining_capacity / unused_bins) * np.sqrt(remaining_capacity)\n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "The new algorithm is as follows: First, calculate the remaining capacity of each bin after considering the current item. Next, calculate the score for each bin by multiplying the remaining capacity by the number of unused bins (i.e., bins with remaining capacity equal to the maximum capacity). Finally, return the scores for all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n unused_bins = np.sum(remaining_capacity == max_capacity)\n scores = remaining_capacity * unused_bins\n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "The new algorithm is as follows: \n1. Multiply the item size by the remaining capacity of each bin.\n2. Divide the result by the number of unused bins (i.e., bins with remaining capacity equal to the maximum capacity).\n3. Subtract the item size from the remaining capacity of each bin.\n4. Take the square root of the result obtained in step 3.\n5. Multiply the result obtained in step 2 by the result obtained in step 4.\n6. Return the scores for all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n unused_bins = np.sum(remaining_capacity == max_capacity)\n scores = (item * remaining_capacity) / unused_bins\n scores -= np.sqrt(remaining_capacity - item)\n scores *= np.sqrt(remaining_capacity)\n\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns items to bins based on a modified score function that takes into account both the item size and the remaining capacity of each bin. It aims to maximize the score while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n mask = (bins < np.max(bins)) # Create a mask to exclude bins with rest capacity equal to the maximum capacity\n scores[mask] = (item / bins[mask]) * np.exp(1 - bins[mask] / np.max(bins)) # Calculate modified scores for the remaining bins\n return scores",
"objective": 0.04326,
"other_inf": null
},
{
"algorithm": "My new algorithm first calculates the ratio between each bin's rest capacity and the item size, and then takes the square root of the ratio. Bins with rest capacity equal to the maximum capacity are assigned a score of zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = (bins < np.max(bins)) \n scores[mask] = np.sqrt(bins[mask] / item)\n return scores",
"objective": 0.04769,
"other_inf": null
},
{
"algorithm": "My new algorithm first calculates the ratio between each bin's rest capacity and the item size, and then takes the square root of the ratio. Bins with rest capacity equal to the maximum capacity are assigned a score of zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = (bins < np.max(bins)) \n scores[mask] = bins[mask] / item\n return scores",
"objective": 0.05987,
"other_inf": null
},
{
"algorithm": "We will assign a score to each bin based on the ratio of the bin capacity to the item size, making sure that bins with no remaining capacity have a score of zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores with zeros\n scores[bins > item] = bins[bins > item] / item # Calculate scores based on the ratio of bin capacity to item size\n scores[bins == np.max(bins)] = 0 # Set scores of bins with maximum capacity to zero\n return scores",
"objective": 0.06912,
"other_inf": null
},
{
"algorithm": "My new algorithm first calculates the difference between each bin's rest capacity and the item size, adds the square of this difference to the bin's index position, and assigns a score of zero to bins with rest capacity equal to the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n mask = (bins < np.max(bins)) \n scores[mask] = (bins[mask] - item) ** 2 + np.arange(bins.shape[0])[mask]\n return scores",
"objective": 0.1307,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_10.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the squared root of the remaining capacity and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.sqrt(remaining_capacity[mask]) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] * item_inverse\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the natural logarithm of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.log(remaining_capacity[mask]) * (1/item)\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the product of the log base 10 of the remaining capacity and the cube root of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.log10(remaining_capacity[mask]) * (item**(1/3)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the reciprocal of the difference between the rest capacity and the item size by the logarithm of the rest capacity, and if the rest capacity is less than the item size, the score is set to a large negative value.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n diff = bins - item\n \n # Revised algorithm parameters\n k = 1.5 * np.log(item) / np.log(np.max(bins))\n m = 0.5 * np.log(item) / np.log(np.max(bins))\n \n scores[diff >= 0] = k * np.log(bins[diff >= 0]) / ((diff[diff >= 0] + 1e-6) ** m)\n scores[diff < 0] = -1e6\n \n return scores",
"objective": 0.03823,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by multiplying the reciprocal of the difference between the rest capacity and the item size by the logarithm of the rest capacity, and if the rest capacity is less than the item size, the score is set to a large negative value.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n diff = bins - item\n \n # New algorithm parameters\n k = 1.5\n m = 0.5\n \n scores[diff >= 0] = k * np.log(bins[diff >= 0]) / ((diff[diff >= 0] + 1e-6) ** m)\n scores[diff < 0] = -1e6\n \n return scores",
"objective": 0.03843,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by taking the reciprocal of the difference between the rest capacity and the item size, multiplied by the square root of the rest capacity, and if the rest capacity is less than the item size, the score is set to a large negative value.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n diff = bins - item\n \n scores[diff >= 0] = np.sqrt(bins[diff >= 0]) / (diff[diff >= 0] + 1e-6)\n scores[diff < 0] = -1e6\n \n return scores",
"objective": 0.03884,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_11.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the squared root of the remaining capacity and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.sqrt(remaining_capacity[mask]) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by taking the square root of the product of the remaining capacity and the inverse of the item size, multiplied by the difference between the remaining capacity and the item size, only for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sqrt(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the natural logarithm of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.log(remaining_capacity[mask]) * (1/item)\n\n return scores",
"objective": 0.03159,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the product of the natural logarithm of the remaining capacity and the item size, multiplied by the difference between the remaining capacity and the item size, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.log(remaining_capacity[mask]) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.03169,
"other_inf": null
},
{
"algorithm": "The new algorithm will calculate the score for each bin by taking the reciprocal of the difference between the rest capacity and the item size, multiplied by the square root of the maximum capacity minus the rest capacity, and assigning a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n \n scores[mask] = np.sqrt(bins.max() - remaining_capacity[mask]) / (remaining_capacity[mask] + 1e-6)\n scores[~mask] = 0\n \n return scores",
"objective": 0.03793,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_12.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the squared root of the remaining capacity and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.sqrt(remaining_capacity[mask]) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by taking the square root of the product of the remaining capacity and the inverse of the item size, multiplied by the difference between the remaining capacity and the item size, only for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sqrt(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by summing the square of the item size and the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = item**2 + remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the natural logarithm of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.log(remaining_capacity[mask]) * (1/item)\n\n return scores",
"objective": 0.03159,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_13.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by taking the square root of the product of the remaining capacity and the inverse of the item size, multiplied by the difference between the remaining capacity and the item size, only for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sqrt(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by summing the square of the item size and the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = item**2 + remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.03028,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the natural logarithm of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.log(remaining_capacity[mask]) * (1/item)\n\n return scores",
"objective": 0.03159,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_14.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by taking the square root of the product of the remaining capacity and the inverse of the item size, multiplied by the difference between the remaining capacity and the item size, only for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sqrt(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01841,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the product of the inverse of the remaining capacity and the item size, and incorporating the square root and natural logarithm of the remaining capacity and item size, respectively, multiplied by the inverse of the item size, only for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = ((remaining_capacity[mask]**0.5) * np.log(remaining_capacity[mask]) * (1 / item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.02395,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by summing the square of the item size and the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = item**2 + remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.03028,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_15.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by taking the square root of the product of the remaining capacity and the inverse of the item size, multiplied by the difference between the remaining capacity and the item size, only for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sqrt(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01841,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_16.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by taking the square root of the product of the remaining capacity and the inverse of the item size, multiplied by the difference between the remaining capacity and the item size, only for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sqrt(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01539,
"other_inf": null
},
{
"algorithm": "scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sin(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01841,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_17.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n scores = (bins - item)**0.5 * (bins - 2*item) / (2*item)\n scores[bins >= bins.max()] = 0\n \n return scores",
"objective": 0.01509,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin by taking the square root of the product of the remaining capacity and the inverse of the item size, multiplied by the difference between the remaining capacity and the item size, only for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sqrt(remaining_capacity[mask] * (1/item)) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01539,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_18.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n scores = (bins - item)**0.5 * (bins - 2*item) / (2*item)\n scores[bins >= bins.max()] = 0\n \n return scores",
"objective": 0.01509,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_19.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n scores = (bins - item)**0.5 * (bins - 2*item) / (2*item)\n scores[bins >= bins.max()] = 0\n \n return scores",
"objective": 0.01509,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_2.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n item_inverse = 1 / item\n \n mask = (bins < max_capacity)\n scores[mask] = (remaining_capacity[mask] - item) * np.sqrt(remaining_capacity[mask]) * item_inverse\n \n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the product of the rest capacity and the item size, and subtracting the square of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item - bins**2\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by subtracting the absolute difference between the rest capacity and the item size from the square root of the rest capacity, and if the rest capacity is less than the item size, the score is set to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n diff = bins - item\n \n scores[diff >= 0] = np.sqrt(bins[diff >= 0]) - np.abs(diff[diff >= 0])\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "np.log(bins) * np.exp(item/bins)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n \n mask = (bins < np.max(bins)) # Create a mask to exclude bins with rest capacity equal to the maximum capacity\n scores[mask] = np.log(bins[mask]) * np.exp(item/bins[mask]) # Calculate scores for the remaining bins\n \n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by first calculating the ratio of the rest capacity of the bin to the item size, then taking the inverse of the square root of the ratio. If the rest capacity is less than the item size, the score is set to zero. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n ratio = bins / item\n scores[ratio >= 1] = 1 / np.sqrt(ratio[ratio >= 1])\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by subtracting the absolute difference between the rest capacity and the item size from the square root of the rest capacity, and if the rest capacity is less than the item size, the score is set to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n \n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin as the product of the square root of the bin capacity and the inverse of the item size, excluding bins with no remaining capacity or the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n mask = (bins < np.max(bins)) # Create a mask to exclude bins with rest capacity equal to the maximum capacity\n scores[mask] = np.sqrt(bins[mask]) * (1/item) # Calculate scores for the remaining bins\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the product of the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n item_inverse = 1 / item\n \n mask = (bins < max_capacity)\n scores[mask] = np.sqrt(remaining_capacity[mask]) * item_inverse\n \n return scores",
"objective": 0.04276,
"other_inf": null
},
{
"algorithm": "The new algorithm is as follows: \n1. Multiply the item size by the remaining capacity of each bin.\n2. Divide the result by the number of unused bins (i.e., bins with remaining capacity equal to the maximum capacity).\n3. Subtract the item size from the remaining capacity of each bin.\n4. Take the square root of the result obtained in step 3.\n5. Multiply the result obtained in step 2 by the result obtained in step 4.\n6. Return the scores for all bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n unused_bins = np.sum(remaining_capacity == max_capacity)\n scores = (item * remaining_capacity) / unused_bins\n scores -= np.sqrt(remaining_capacity - item)\n scores *= np.sqrt(remaining_capacity)\n\n return scores",
"objective": 0.04306,
"other_inf": null
},
{
"algorithm": "My new algorithm assigns items to bins based on a modified score function that takes into account both the item size and the remaining capacity of each bin. It aims to maximize the score while minimizing the number of used bins.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n mask = (bins < np.max(bins)) # Create a mask to exclude bins with rest capacity equal to the maximum capacity\n scores[mask] = (item / bins[mask]) * np.exp(1 - bins[mask] / np.max(bins)) # Calculate modified scores for the remaining bins\n return scores",
"objective": 0.04326,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_20.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_21.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_22.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_23.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
},
{
"algorithm": "\nNew Algorithm Description: My new algorithm calculates the score for each bin by taking the product of the remaining capacity and the logarithm base 2 of the item size, multiplied by the difference between the remaining capacity and the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = remaining_capacity[mask] * np.log2(item) * (remaining_capacity[mask] - item)\n\n return scores",
"objective": 0.01499,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_24.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_25.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "A new algorithm assigns a score to each bin based on the difference between the square root of the remaining capacity and the square root of the item size, multiplied by the square root of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (np.sqrt(remaining_capacity[mask]) - np.sqrt(item)) * np.sqrt(remaining_capacity[mask])\n\n return scores",
"objective": 0.01439,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_26.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity. The new algorithm modifies the parameter settings of the score function by multiplying the square root of the item size with the logarithm of the remaining capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * np.sqrt(item_sqrt_inverse) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01399,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_27.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity. The new algorithm modifies the parameter settings of the score function by multiplying the square root of the item size with the logarithm of the remaining capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * np.sqrt(item_sqrt_inverse) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01399,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_28.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity. The new algorithm modifies the parameter settings of the score function by multiplying the square root of the item size with the logarithm of the remaining capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * np.sqrt(item_sqrt_inverse) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01399,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_29.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity. The new algorithm modifies the parameter settings of the score function by multiplying the square root of the item size with the logarithm of the remaining capacity.\n\nCode:\n\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * np.sqrt(item_sqrt_inverse) * (remaining_capacity[mask] - item) * item_inverse\n\n return scores",
"objective": 0.01399,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_3.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.sqrt(remaining_capacity[mask]) * item_inverse\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the product of the rest capacity and the item size, and subtracting the square of the rest capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = bins * item - bins**2\n return scores",
"objective": 0.03984,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by subtracting the absolute difference between the rest capacity and the item size from the square root of the rest capacity, and if the rest capacity is less than the item size, the score is set to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n diff = bins - item\n \n scores[diff >= 0] = np.sqrt(bins[diff >= 0]) - np.abs(diff[diff >= 0])\n \n return scores",
"objective": 0.04014,
"other_inf": null
},
{
"algorithm": "np.log(bins) * np.exp(item/bins)",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n \n mask = (bins < np.max(bins)) # Create a mask to exclude bins with rest capacity equal to the maximum capacity\n scores[mask] = np.log(bins[mask]) * np.exp(item/bins[mask]) # Calculate scores for the remaining bins\n \n return scores",
"objective": 0.04085,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by first calculating the ratio of the rest capacity of the bin to the item size, then taking the inverse of the square root of the ratio. If the rest capacity is less than the item size, the score is set to zero. ",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n \n ratio = bins / item\n scores[ratio >= 1] = 1 / np.sqrt(ratio[ratio >= 1])\n \n return scores",
"objective": 0.04095,
"other_inf": null
},
{
"algorithm": "\nMy new algorithm calculates the score for each bin as the square root of the difference between the maximum capacity and the item size divided by the remaining capacity of the bin, excluding bins with no remaining capacity or the maximum capacity, and if the rest capacity is less than the item size or the item size is equal to the maximum capacity, the score is set to zero.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n mask = (bins < np.max(bins)) # Create a mask to exclude bins with rest capacity equal to the maximum capacity\n \n scores[mask] = np.sqrt((np.max(bins) - item) / (bins[mask])) # Calculate scores for the remaining bins\n \n scores[bins < item] = 0 # Set score to zero for bins with rest capacity less than item size\n scores[item == np.max(bins)] = 0 # Set score to zero for bins with rest capacity equal to maximum capacity\n \n return scores",
"objective": 0.04145,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin as the difference between the maximum capacity and the item size divided by the remaining capacity of the bin, excluding bins with no remaining capacity or the maximum capacity, and if the rest capacity is less than the item size, the score is set to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n mask = (bins < np.max(bins)) # Create a mask to exclude bins with rest capacity equal to the maximum capacity\n \n scores[mask] = (np.max(bins) - item) / (bins[mask]) # Calculate scores for the remaining bins\n \n scores[bins < item] = 0 # Set score to zero for bins with rest capacity less than item size\n \n return scores",
"objective": 0.04206,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by subtracting the absolute difference between the rest capacity and the item size from the square root of the rest capacity, and if the rest capacity is less than the item size, the score is set to zero.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.ones_like(bins)\n \n return scores",
"objective": 0.04226,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin as the square root of the bin capacity divided by the item size, excluding bins with no remaining capacity or the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins) # Initialize scores array with zeros\n mask = (bins < np.max(bins)) # Create a mask to exclude bins with rest capacity equal to the maximum capacity\n scores[mask] = np.sqrt(bins[mask]) / item # Calculate scores for the remaining bins\n \n return scores",
"objective": 0.04266,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the product of the square root of the remaining capacity and the inverse of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n max_capacity = np.max(bins)\n item_inverse = 1 / item\n \n mask = (bins < max_capacity)\n scores[mask] = np.sqrt(remaining_capacity[mask]) * item_inverse\n \n return scores",
"objective": 0.04276,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_30.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the sigmoid function of the natural logarithm of the remaining capacity divided by the item size, for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef sigmoid(x):\n return 1 / (1 + np.exp(-x))\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * sigmoid(np.log(remaining_capacity[mask]) / item)\n\n return scores",
"objective": 0.01358,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_31.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the sigmoid function of the natural logarithm of the remaining capacity divided by the item size, for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef sigmoid(x):\n return 1 / (1 + np.exp(-x))\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * sigmoid(np.log(remaining_capacity[mask]) / item)\n\n return scores",
"objective": 0.01358,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_32.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01328,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the inverse of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n item_inverse = 1 / item\n item_sqrt_inverse = 1 / (item**0.5)\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * item_inverse * item_sqrt_inverse\n\n return scores",
"objective": 0.01338,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the remaining capacity of the bin and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively. Additionally, it takes into account the reciprocal of the square root of the item size and the logarithm of the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * np.log2(item) * (remaining_capacity[mask] - item) * (1/item) * (1/(item**0.5)) * np.log(item)\n\n return scores",
"objective": 0.01348,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the sigmoid function of the natural logarithm of the remaining capacity divided by the item size, for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef sigmoid(x):\n return 1 / (1 + np.exp(-x))\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * sigmoid(np.log(remaining_capacity[mask]) / item)\n\n return scores",
"objective": 0.01358,
"other_inf": null
}
]
================================================
FILE: docs/Results/Ablation_EoH_PopSize/10run1/population_generation_33.json
================================================
[
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the hyperbolic tangent function of the natural logarithm of the remaining capacity and the square of the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * np.tanh(np.log(remaining_capacity[mask]) * item**2)\n\n return scores",
"objective": 0.00704,
"other_inf": null
},
{
"algorithm": "\nThe new algorithm calculates the score for each bin based on the ratio of the remaining capacity to the square of the item size, multiplied by the difference between the remaining capacity and the item size, and then takes the square root of the result.\n",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = np.sqrt((remaining_capacity[mask] / (item**2)) * (remaining_capacity[mask] - item))\n\n return scores",
"objective": 0.00885,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01107,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the difference between remaining capacity and item size, divided by the sum of remaining capacity and item size, and then multiplied by the remaining capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n threshold = 0.8 # Set a threshold value\n\n mask = (bins < threshold * bins.max()) # Simplified mask condition\n scores[mask] = (remaining_capacity[mask] - item) / (remaining_capacity[mask] + item) * remaining_capacity[mask]\n\n return scores",
"objective": 0.01127,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask]**0.5) * (remaining_capacity[mask] - item) / item\n\n return scores",
"objective": 0.01238,
"other_inf": null
},
{
"algorithm": "My new algorithm calculates the score for each bin by taking the difference between the remaining capacity and the item size, multiplied by the remaining capacity squared and divided by the item size for bins where the remaining capacity is not equal to the maximum capacity, and assigns a score of zero for bins with the maximum capacity.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * (remaining_capacity[mask]**2) / item\n\n return scores",
"objective": 0.01258,
"other_inf": null
},
{
"algorithm": "The new algorithm assigns scores based on the product of remaining capacity, inverse of item size, and the difference between remaining capacity and item size.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = (bins < bins.max())\n scores[mask] = (remaining_capacity[mask] - item) * remaining_capacity[mask] / item\n\n return scores",
"objective": 0.01288,
"other_inf": null
},
{
"algorithm": "The new algorithm calculates the score for each bin based on the inverse of the remaining capacity and the item size, and incorporates the square root and logarithm of the remaining capacity and item size, respectively.",
"code": "import numpy as np\n\ndef score(item, bins):\n scores = np.zeros_like(bins)\n remaining_capacity = bins - item\n\n mask = np.where(bins <